summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBilal Alsharifi <bilal.alsharifi@gmail.com>2019-03-12 10:42:02 -0400
committerBilal Alsharifi <bilal.alsharifi@gmail.com>2019-03-12 10:42:02 -0400
commit85cf432c1add5fe1e74d20657fb2e7af2914df15 (patch)
treea82af92efbacb67232f018f77272b5b9e14e0a57
parented59f1ff4f0a392105b59aee66a8fbe8926177b5 (diff)
downloadsdl_android-85cf432c1add5fe1e74d20657fb2e7af2914df15.tar.gz
Add bintray to javaSE
-rw-r--r--javaSE/bintray.gradle96
-rw-r--r--javaSE/bintray.properties8
-rw-r--r--javaSE/build.gradle19
3 files changed, 119 insertions, 4 deletions
diff --git a/javaSE/bintray.gradle b/javaSE/bintray.gradle
new file mode 100644
index 000000000..abf86b8b6
--- /dev/null
+++ b/javaSE/bintray.gradle
@@ -0,0 +1,96 @@
+apply plugin: "com.jfrog.bintray"
+apply plugin: 'maven-publish'
+apply plugin: 'maven'
+
+def siteUrl = 'https://github.com/smartdevicelink/sdl_android' // Homepage URL of the library
+def gitUrl = 'https://github.com/smartdevicelink/sdl_android.git' // Git repository URL
+group = "com.smartdevicelink" // Maven Group ID for the artifact
+def libDescription = 'SmartDeviceLink mobile library'
+
+task sourcesJar(type: Jar, dependsOn: classes) {
+ classifier = 'sources'
+ from sourceSets.main.allSource
+}
+
+javadoc.failOnError = false
+task javadocJar(type: Jar, dependsOn: javadoc) {
+ classifier = 'javadoc'
+ from javadoc.destinationDir
+}
+
+artifacts {
+ archives sourcesJar
+ archives javadocJar
+}
+
+bintray {
+ Properties props = new Properties()
+ props.load(new FileInputStream("$projectDir/bintray.properties"))
+
+ // Authorization
+ user = props.getProperty("bintray.user")
+ key = props.getProperty("bintray.key")
+ version = props.getProperty("bintray.version")
+ publications = ['mavenPublication']
+
+
+ pkg {
+ repo = props.getProperty("bintray.repo")
+ name = props.getProperty("bintray.artifact")
+ websiteUrl = siteUrl
+ vcsUrl = gitUrl
+ userOrg = props.getProperty("bintray.userorg")
+ licenses = ["BSD 3-Clause"]
+ publish = props.getProperty("bintray.publish") // Will upload to jCenter
+ version {
+ name = props.getProperty("bintray.version") // Change to release version
+ desc = libDescription
+ released = new Date() // Will be the current date & time
+ vcsTag = props.getProperty("bintray.vcs") // Should match git tag
+ }
+ }
+}
+
+def pomConfig = {
+ Properties props = new Properties()
+ props.load(new FileInputStream("$projectDir/bintray.properties"))
+
+ licenses {
+ license {
+ name 'BSD 3-Clause'
+ url 'https://opensource.org/licenses/BSD-3-Clause'
+ distribution "repo"
+ }
+ }
+
+ scm {
+ url siteUrl
+ }
+}
+
+publishing {
+ publications {
+ mavenPublication(MavenPublication) {
+ Properties props = new Properties()
+ props.load(new FileInputStream("$projectDir/bintray.properties"))
+
+ from components.java
+ artifact sourcesJar {
+ classifier "sources"
+ }
+ artifact javadocJar {
+ classifier "javadoc"
+ }
+ groupId props.getProperty("bintray.userorg")
+ artifactId props.getProperty("bintray.artifact")
+ version props.getProperty("bintray.vcs")
+ pom.withXml {
+ def root = asNode()
+ root.appendNode('description', libDescription)
+ root.appendNode('name', props.getProperty("bintray.artifact"))
+ root.appendNode('url', siteUrl)
+ root.children().last() + pomConfig
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/javaSE/bintray.properties b/javaSE/bintray.properties
new file mode 100644
index 000000000..760f99904
--- /dev/null
+++ b/javaSE/bintray.properties
@@ -0,0 +1,8 @@
+bintray.user=username
+bintray.key=apikey
+bintray.repo=sdl_android
+bintray.artifact=sdl_android
+bintray.userorg=smartdevicelink
+bintray.publish=true
+bintray.version=X.X.X
+bintray.vcs=X.X.X \ No newline at end of file
diff --git a/javaSE/build.gradle b/javaSE/build.gradle
index 1477d9094..4f8b00ee2 100644
--- a/javaSE/build.gradle
+++ b/javaSE/build.gradle
@@ -1,12 +1,20 @@
-plugins {
- id 'java-library'
-}
+apply plugin: 'java-library'
group 'com.smartdevicelink'
version '4.7.2'
sourceCompatibility = 1.8
+
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
+ }
+}
+
repositories {
google()
jcenter()
@@ -49,4 +57,7 @@ public final class BuildConfig {
}""")
}
}
-compileJava.dependsOn generateSources \ No newline at end of file
+
+compileJava.dependsOn generateSources
+
+apply from: 'bintray.gradle'