Created
March 3, 2015 15:38
-
-
Save xianminx/d860969fdda132b6d892 to your computer and use it in GitHub Desktop.
publish android library to bintray jcenter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apply plugin: 'com.android.library' | |
| apply plugin: 'com.github.dcendents.android-maven' | |
| apply plugin: 'com.jfrog.bintray' | |
| // This is the library version used when deploying the artifact | |
| version = "0.0.1" | |
| group = "android.lucas" | |
| def siteUrl = 'https://github.com/xianminx/SwipeBack' | |
| def gitUrl = 'https://github.com/xianminx/SwipeBack.git' | |
| android { | |
| compileSdkVersion 21 | |
| buildToolsVersion "21.1.2" | |
| defaultConfig { | |
| minSdkVersion 15 | |
| targetSdkVersion 21 | |
| versionCode 1 | |
| versionName version | |
| } | |
| buildTypes { | |
| release { | |
| minifyEnabled false | |
| proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
| } | |
| } | |
| } | |
| dependencies { | |
| compile fileTree(dir: 'libs', include: ['*.jar']) | |
| } | |
| Properties properties = new Properties() | |
| properties.load(project.rootProject.file('local.properties').newDataInputStream()) | |
| bintray { | |
| user = properties.getProperty("bintray.user") | |
| key = properties.getProperty("bintray.apikey") | |
| configurations = ['archives'] | |
| pkg { | |
| repo = "maven" | |
| name = "SwipeBack" | |
| websiteUrl = siteUrl | |
| vcsUrl = gitUrl | |
| licenses = ["Apache-2.0"] | |
| publish = true | |
| } | |
| } | |
| install { | |
| repositories.mavenInstaller { | |
| pom { | |
| project { | |
| packaging 'aar' | |
| name 'Navigate back to the previous Activity by Swipe Gesture from the left edge of the screen. ' | |
| url siteUrl | |
| licenses { | |
| license { | |
| name 'The Apache Software License, Version 2.0' | |
| url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | |
| } | |
| } | |
| developers { | |
| developer { | |
| id 'xianminx' | |
| name 'Lucas Xu' | |
| email 'xianminx@gmail.com' | |
| } | |
| } | |
| scm { | |
| connection gitUrl | |
| developerConnection gitUrl | |
| url siteUrl | |
| } | |
| } | |
| } | |
| } | |
| } | |
| task sourcesJar(type: Jar) { | |
| from android.sourceSets.main.java.srcDirs | |
| classifier = 'sources' | |
| } | |
| task javadoc(type: Javadoc) { | |
| source = android.sourceSets.main.java.srcDirs | |
| classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | |
| } | |
| task javadocJar(type: Jar, dependsOn: javadoc) { | |
| classifier = 'javadoc' | |
| from javadoc.destinationDir | |
| } | |
| artifacts { | |
| archives javadocJar | |
| archives sourcesJar | |
| } | |
| task findConventions << { | |
| println project.getConvention() | |
| } | |
| // ./gradew bintrayUpload to upload archives to bintray. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment