Skip to content

Instantly share code, notes, and snippets.

@bitristan
Created June 9, 2015 03:13
Show Gist options
  • Save bitristan/5f1b63eb670ad3e0eb7e to your computer and use it in GitHub Desktop.
Save bitristan/5f1b63eb670ad3e0eb7e to your computer and use it in GitHub Desktop.
use gradle upload library to bintrary
//classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
//classpath 'com.github.dcendents:android-maven-plugin:1.2'
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
version '1.5.0'
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName version
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
}
group = 'com.github.moraisigor'
install {
repositories.mavenInstaller {
pom {
project {
packaging 'aar'
name 'SlidingDrawer'
description 'SlidingDrawer hides content out of the screen and allows the user to drag a handle to bring the content on screen.'
url 'https://github.com/MoraisIgor/SlidingDrawer'
licenses {
license {
name 'Apache Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0'
}
}
developers {
developer {
id 'MoraisIgor'
name 'Igor Morais'
email '[email protected]'
}
}
scm {
url 'https://github.com/MoraisIgor/SlidingDrawer'
connection 'https://github.com/MoraisIgor/SlidingDrawer.git'
developerConnection 'https://github.com/MoraisIgor/SlidingDrawer.git'
}
}
}
}
}
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
}
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
artifacts {
archives javadocJar
archives sourcesJar
}
bintray {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
user = properties.getProperty('bintray.user')
key = properties.getProperty('bintray.key')
configurations = ['archives']
publish = true
pkg {
repo = 'Maven'
name = 'SlidingDrawer'
desc = 'SlidingDrawer hides content out of the screen and allows the user to drag a handle to bring the content on screen.'
websiteUrl = 'https://github.com/MoraisIgor/SlidingDrawer'
issueTrackerUrl = 'https://github.com/MoraisIgor/SlidingDrawer/issues'
vcsUrl = 'https://github.com/MoraisIgor/SlidingDrawer.git'
licenses = ['Apache-2.0']
labels = ['android']
version {
gpg {
sign = true
passphrase = properties.getProperty('bintray.password')
}
/* mavenCentralSync {
sync = true
user = properties.getProperty('sonatype.user')
password = properties.getProperty('sonatype.password')
close = '1'
} */
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment