This repository has been archived by the owner on Feb 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zongjingyao
committed
Oct 5, 2016
1 parent
e308f77
commit 2efe53b
Showing
4 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,3 +38,4 @@ captures/ | |
|
||
# Keystore files | ||
*.jks | ||
bintray.properties |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
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 | ||
|
@@ -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 '[email protected]' | ||
} | ||
} | ||
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 | ||
} | ||
} |
This file contains 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