123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- if (!project.rootProject.file('local.properties').exists()) {
- logger.warn("local.properties not found. Skipping Bintray Release setup.")
- return
- }
- apply plugin: "com.novoda.bintray-release"
- def getBintrayUserAndKey() {
- Properties properties = new Properties()
- properties.load(project.rootProject.file("local.properties").newDataInputStream())
- return [
- properties.getProperty("bintray.user"),
- properties.getProperty("bintray.apikey")
- ]
- }
- if (versions == null || versions.publish_version == null) {
- throw new IllegalStateException("Unable to reference publish_version!")
- } else if (module_group == null || module_name == null) {
- throw new IllegalStateException("Must provide module_group and module_name!")
- }
- task checkBintrayConfig {
- doLast {
- def (user, key) = getBintrayUserAndKey()
- if (user == null || user.isEmpty() ||
- key == null || key.isEmpty()) {
- throw new IllegalStateException("Must specify Bintray user/API key in your local.properties.")
- }
- }
- }
- afterEvaluate {
- bintrayUpload.dependsOn checkBintrayConfig
- }
- def (user, key) = getBintrayUserAndKey()
- publish {
- bintrayUser = user
- bintrayKey = key
- userOrg = "drummer-aidan"
- groupId = module_group
- uploadName = "material-dialogs:$module_name"
- artifactId = module_name
- publishVersion = versions.publish_version
- desc = "A beautiful, fluid, and customizable dialogs API."
- website = "https://github.com/afollestad/material-dialogs"
- dryRun = false
- }
|