From a3fa7ec9f8f74c0710f1645264761453f53a5471 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Wed, 26 Feb 2020 12:06:29 +0100 Subject: [PATCH] publish to bintray, so I can test compatibility with gradle6 --- plugin/core/publish.gradle | 93 ++++++++++++++++++++------------------ 1 file changed, 49 insertions(+), 44 deletions(-) diff --git a/plugin/core/publish.gradle b/plugin/core/publish.gradle index c7682a0..955da08 100644 --- a/plugin/core/publish.gradle +++ b/plugin/core/publish.gradle @@ -7,62 +7,67 @@ buildscript { jcenter() } dependencies { - classpath 'com.novoda:gradle-build-properties-plugin:0.4.1' +// classpath 'com.novoda:gradle-build-properties-plugin:0.4.1' classpath 'com.novoda:bintray-release:+' } } -apply plugin: 'com.novoda.build-properties' +//apply plugin: 'com.novoda.build-properties' apply plugin: 'com.novoda.bintray-release' -buildProperties { - cli { - using(project) - } - - bintray { - using(bintrayCredentials()).or(cli) - description = '''This should contain the following properties: - - bintrayOrg: name of the Bintray organisation to deploy the artifacts to - - bintrayRepo: name of the repo of the organisation to deploy the artifacts to - - bintrayUser: name of the account used to deploy the artifacts - - bintrayKey: API key of the account used to deploy the artifacts - '''.stripIndent() - } - - publish { - using(['version': "${generateVersion()}"]).or(project.buildProperties.bintray) - } -} +//buildProperties { +// cli { +// using(project) +// } +// +// bintray { +// using(bintrayCredentials()).or(cli) +// description = '''This should contain the following properties: +// - bintrayOrg: name of the Bintray organisation to deploy the artifacts to +// - bintrayRepo: name of the repo of the organisation to deploy the artifacts to +// - bintrayUser: name of the account used to deploy the artifacts +// - bintrayKey: API key of the account used to deploy the artifacts +// '''.stripIndent() +// } +// +// publish { +// using(['version': "${generateVersion()}"]).or(project.buildProperties.bintray) +// } +//} +// publish to https://dl.bintray.com/maranda/maven publish { groupId = 'com.novoda' artifactId = rootProject.name desc = 'Super duper easy way to release your Android and other artifacts to bintray' - website = "https://github.com/novoda/${rootProject.name}" + website = "https://github.com/marandaneto/${rootProject.name}" - version = project.buildProperties.publish['version'].string - publishVersion = project.buildProperties.publish['version'].string - bintrayUser = project.buildProperties.publish['bintrayUser'].string - bintrayKey = project.buildProperties.publish['bintrayKey'].string - repoName = project.buildProperties.publish['bintrayRepo'].string - userOrg = project.buildProperties.publish['bintrayOrg'].string -} - -def bintrayCredentials() { - return isDryRun() ? - ['bintrayOrg': 'n/a', 'bintrayRepo': 'n/a', 'bintrayUser': 'n/a', 'bintrayKey': 'n/a'] : - new File("${System.getenv('BINTRAY_PROPERTIES')}") -} +// version = project.buildProperties.publish['version'].string +// publishVersion = project.buildProperties.publish['version'].string +// bintrayUser = project.buildProperties.publish['bintrayUser'].string +// bintrayKey = project.buildProperties.publish['bintrayKey'].string +// repoName = project.buildProperties.publish['bintrayRepo'].string +// userOrg = project.buildProperties.publish['bintrayOrg'].string -def generateVersion() { - return isSnapshot() ? "develop-${System.getenv('BUILD_NUMBER') ?: 'LOCAL'}" : project.version + version = '1.0.0' + publishVersion = '1.0.0' + userOrg = 'maranda' } -boolean isDryRun() { - project.buildProperties.cli['dryRun'].or(true).boolean -} - -boolean isSnapshot() { - project.buildProperties.cli['bintraySnapshot'].or(false).boolean -} +//def bintrayCredentials() { +// return isDryRun() ? +// ['bintrayOrg': 'n/a', 'bintrayRepo': 'n/a', 'bintrayUser': 'n/a', 'bintrayKey': 'n/a'] : +// new File("${System.getenv('BINTRAY_PROPERTIES')}") +//} +// +//def generateVersion() { +// return isSnapshot() ? "develop-${System.getenv('BUILD_NUMBER') ?: 'LOCAL'}" : project.version +//} +// +//boolean isDryRun() { +// project.buildProperties.cli['dryRun'].or(true).boolean +//} +// +//boolean isSnapshot() { +// project.buildProperties.cli['bintraySnapshot'].or(false).boolean +//}