Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
publish to jcenter
Browse files Browse the repository at this point in the history
  • Loading branch information
zongjingyao committed Oct 5, 2016
1 parent e308f77 commit 2efe53b
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ captures/

# Keystore files
*.jks
bintray.properties
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 80 additions & 0 deletions actionsheet/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

version = "0.1"

android {
compileSdkVersion 23
Expand Down Expand Up @@ -29,3 +33,79 @@ dependencies {
compile 'com.android.support:appcompat-v7:23.0.0'
testCompile 'junit:junit:4.12'
}

def siteUrl = 'https://github.com/zongjingyao/AndroidActionSheet' // project homepage
def gitUrl = 'https://github.com/zongjingyao/AndroidActionSheet.git' // project git
group = "com.github.zongjingyao"

install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
name 'AndroidActionSheet'
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 'zongjingyao'
name 'Jingyao Zong'
email 'zongjingyao@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
}

Properties properties = new Properties()
boolean isHasFile = false
File file = project.rootProject.file('bintray.properties')
if (file.exists()){
isHasFile = true
properties.load(file.newDataInputStream())
}
bintray {
user = isHasFile ? properties.getProperty("bintray.user") : System.getenv("bintray.user")
key = isHasFile ? properties.getProperty("bintray.apikey") : System.getenv("bintray.apikey")
configurations = ['archives']
pkg {
repo = "maven"
name = "AndroidActionSheet" //project name in jcenter
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = ["Apache-2.0"]
publish = true
}
}
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down

0 comments on commit 2efe53b

Please sign in to comment.