Skip to content

Commit

Permalink
Add bintray publish
Browse files Browse the repository at this point in the history
  • Loading branch information
satorufujiwara committed Aug 2, 2017
1 parent 826488f commit acb2250
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 5 deletions.
25 changes: 25 additions & 0 deletions binder-rx/android-artifacts.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
task androidJavadocs(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
ext.androidJar = "${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar"
classpath += files(ext.androidJar)
}

task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
classifier = 'javadoc'
from androidJavadocs.destinationDir
}

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

task androidJar(type: Jar) {
from 'build/intermediates/classes/release'
}

artifacts {
archives androidSourcesJar
archives androidJavadocsJar
archives androidJar
}
64 changes: 64 additions & 0 deletions binder-rx/bintray-publish.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'

publishing {
publications {
mavenJava(MavenPublication) {
groupId GROUP
version VERSION_NAME
artifactId 'recyclerview-binder-rx'
// artifact "build/outputs/aar/binder-release.aar"
artifact androidJar
artifact androidJavadocsJar
artifact androidSourcesJar
pom.withXml {
Node root = asNode()
root.appendNode('name', 'recyclerview-binder-rx')
root.appendNode('description', POM_DESCRIPTION)
root.appendNode('url', POM_URL)

def issues = root.appendNode('issueManagement')
issues.appendNode('system', 'github')
issues.appendNode('url', ISSUE_URL)

def scm = root.appendNode('scm')
scm.appendNode('url', POM_SCM_URL)
scm.appendNode('connection', POM_SCM_CONNECTION)
scm.appendNode('developerConnection', POM_SCM_DEV_CONNECTION)

def license = root.appendNode('licenses').appendNode('license')
license.appendNode('name', POM_LICENCE_NAME)
license.appendNode('url', POM_LICENCE_URL)
license.appendNode('distribution', POM_LICENCE_DIST)
}
}
}
}

def getBintrayUserProperty() {
return hasProperty('bintrayUser') ? bintrayUser : ""
}

def getBintrayApiKeyProperty() {
return hasProperty('bintrayApiKey') ? bintrayApiKey : ""
}

bintray {
user = bintrayUserProperty
key = bintrayApiKeyProperty
publications = ['mavenJava']

dryRun = false
publish = false
pkg {
repo = 'maven'
name = 'recyclerview-binder-rx'
licenses = ['Apache-2.0']
labels = ['android']

version {
name = VERSION_NAME
vcsTag = VERSION_NAME
}
}
}
3 changes: 3 additions & 0 deletions binder-rx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ dependencies {
compile project(':binder')
compile "io.reactivex.rxjava2:rxjava:$RX_JAVA_VERSION"
}

apply from: 'android-artifacts.gradle'
apply from: 'bintray-publish.gradle'
6 changes: 3 additions & 3 deletions binder/bintray-publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ publishing {
mavenJava(MavenPublication) {
groupId GROUP
version VERSION_NAME
artifactId ARTIFACT_ID
artifactId 'recyclerview-binder'
// artifact "build/outputs/aar/binder-release.aar"
artifact androidJar
artifact androidJavadocsJar
artifact androidSourcesJar
pom.withXml {
Node root = asNode()
root.appendNode('name', ARTIFACT_ID)
root.appendNode('name', 'recyclerview-binder')
root.appendNode('description', POM_DESCRIPTION)
root.appendNode('url', POM_URL)

Expand Down Expand Up @@ -52,7 +52,7 @@ bintray {
publish = false
pkg {
repo = 'maven'
name = ARTIFACT_ID
name = 'recyclerview-binder'
licenses = ['Apache-2.0']
labels = ['android']

Expand Down
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ TARGET_SDK_VERSION=23
SUPPORT_APP_COMPAT_VERSION=25.3.1
RX_JAVA_VERSION=2.1.2

VERSION_NAME=1.3.3
VERSION_NAME=2.0.0
VERSION_CODE=3
GROUP=jp.satorufujiwara
ARTIFACT_ID=recyclerview-binder

POM_DESCRIPTION=Android Library for RecyclerView to manage order of items and multiple view types.
POM_URL=https://github.com/satorufujiwara/recyclerview-binder
Expand Down

0 comments on commit acb2250

Please sign in to comment.