summaryrefslogtreecommitdiffstats
path: root/gradle/publishing.gradle
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2020-04-09 22:52:33 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-04-09 22:52:33 +0000
commit833231bb26846c62c77ad5f21cb9f1fb80115ec0 (patch)
treeb88ceec0eaf4b7c3e0e213f45cbfd2d678bfbb7c /gradle/publishing.gradle
parentc4d97985b3787276d6b391510250246c9ca94541 (diff)
parent1581a8da5e293c9096aaef3398c58aa52e642489 (diff)
downloadplatform_external_jcommander-833231bb26846c62c77ad5f21cb9f1fb80115ec0.tar.gz
platform_external_jcommander-833231bb26846c62c77ad5f21cb9f1fb80115ec0.tar.bz2
platform_external_jcommander-833231bb26846c62c77ad5f21cb9f1fb80115ec0.zip
Upgrade JCommander to '1.71' am: cdfd109c35 am: 1581a8da5e
Change-Id: Iec86f7e62826120b548ebb2b67b8a3751bc6b302
Diffstat (limited to 'gradle/publishing.gradle')
-rw-r--r--gradle/publishing.gradle63
1 files changed, 63 insertions, 0 deletions
diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle
new file mode 100644
index 0000000..e65a133
--- /dev/null
+++ b/gradle/publishing.gradle
@@ -0,0 +1,63 @@
+import java.text.SimpleDateFormat
+
+Date buildTimeAndDate = new Date()
+ext {
+ buildTime = new SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
+ buildDate = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
+ cedricVersion = '1.51'
+}
+
+apply plugin: 'maven-publish'
+apply plugin: 'com.jfrog.bintray'
+
+jar {
+ manifest {
+ attributes(
+ 'Built-By': System.properties['user.name'],
+ 'Created-By': System.properties['java.version'] + " (" + System.properties['java.vendor'] + " " + System.getProperty("java.vm.version") + ")",
+ 'Build-Date': project.buildTime,
+ 'Build-Time': project.buildDate,
+ 'Specification-Title': project.name,
+ 'Specification-Version': project.version,
+ )
+ }
+}
+
+publishing {
+ publications {
+ mavenCustom(MavenPublication) {
+ from components.java
+ artifact sourceJar
+
+ groupId 'com.beust'
+ artifactId 'jcommander'
+ version project.version
+
+// pom.withXml {
+// asNode().children().last() + pomConfig
+// }
+ }
+ }
+}
+
+task install(dependsOn: publishToMavenLocal)
+
+Properties properties = new Properties()
+properties.load(project.rootProject.file('local.properties').newDataInputStream())
+
+bintray {
+ user = properties.getProperty("bintray.user")
+ key = properties.getProperty("bintray.apikey")
+ publications = ['mavenCustom']
+ pkg {
+ repo = 'maven'
+ name = 'jcommander'
+ desc = 'Command line parsing for Java'
+ licenses = ['Apache-2.0']
+ labels = ['java']
+
+ version {
+ name = project.version //Bintray logical version name
+ }
+ }
+}