Skip to content

Commit

Permalink
add source.jar
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangsl committed Oct 19, 2018
1 parent 2c3637a commit 17d4d64
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 9 deletions.
17 changes: 15 additions & 2 deletions jsonlube-annotations/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,16 @@ repositories {
mavenCentral()
}


Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def bintray_user = properties.getProperty('BINTRAY_USER')
def bintray_key = properties.getProperty('BINTRAY_KEY')


bintray {
user = '${BINTRAY_USER}'
key = '${BINTRAY_KEY}'
user = bintray_user
key = bintray_key
publish = true
override = true
publications = ['maven_android']
Expand All @@ -48,13 +55,19 @@ bintray {
}
}

task sourceJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}

publishing {
publications {
maven_android(MavenPublication) {
groupId "com.alibaba.android"
version "1.0.0.2"
artifactId "jsonlube-annotations"
artifact("$buildDir/libs/jsonlube-annotations.jar")
artifact(sourceJar)
}
}
}
Expand Down
15 changes: 13 additions & 2 deletions jsonlube-compiler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ apply plugin: 'com.jfrog.bintray'
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def bintray_user = properties.getProperty('BINTRAY_USER')
def bintray_key = properties.getProperty('BINTRAY_KEY')

repositories {
mavenCentral()
jcenter()
Expand All @@ -39,8 +44,8 @@ test {
}

bintray {
user = '${BINTRAY_USER}'
key = '${BINTRAY_KEY}'
user = bintray_user
key = bintray_key
publish = true
override = true
publications = ['maven_android']
Expand All @@ -59,13 +64,19 @@ bintray {
}
}

task sourceJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}

publishing {
publications {
maven_android(MavenPublication) {
groupId "com.alibaba.android"
version "1.0.0.0"
artifactId "jsonlube-compiler"
artifact("$buildDir/libs/jsonlube-compiler.jar")
artifact(sourceJar)
}
}
}
Expand Down
22 changes: 17 additions & 5 deletions jsonlube/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@ repositories {
}
}

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def bintray_user = properties.getProperty('BINTRAY_USER')
def bintray_key = properties.getProperty('BINTRAY_KEY')


bintray {
user = '${BINTRAY_USER}'
key = '${BINTRAY_KEY}'
user = bintray_user
key = bintray_key
publish = true
override = true
publications = ['maven_android']
Expand All @@ -44,21 +50,27 @@ bintray {
vcsUrl = 'https://github.com/alibaba/jsonlube'

version {
name = '1.0.0.3'
name = '1.0.0.2'
desc = 'A json parser generator in compile time.'
released = new Date()
vcsTag = '1.0.0.3'
vcsTag = '1.0.0.2'
}
}
}

task sourceJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

publishing {
publications {
maven_android(MavenPublication) {
groupId "com.alibaba.android"
version "1.0.0.3"
version "1.0.0.2"
artifactId "jsonlube"
artifact("$buildDir/outputs/aar/jsonlube-release.aar")
artifact(sourceJar)

pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
Expand Down

0 comments on commit 17d4d64

Please sign in to comment.