1+ group = PROJ_GROUP
2+ version = PROJ_VERSION
3+ project. archivesBaseName = PROJ_ARTIFACTID
4+ apply plugin : ' com.jfrog.bintray'
5+ apply plugin : ' maven-publish'
6+ task sourcesJar (type : Jar ) {
7+ from android. sourceSets. main. java. srcDirs
8+ classifier = ' sources'
9+ }
10+ task javadoc (type : Javadoc ) {
11+ source = android. sourceSets. main. java. srcDirs
12+ classpath + = configurations. compile
13+ classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
14+ }
15+ task javadocJar (type : Jar , dependsOn : javadoc) {
16+ classifier = ' javadoc'
17+ from javadoc. destinationDir
18+ }
19+ javadoc {
20+ options{
21+ encoding " UTF-8"
22+ charSet ' UTF-8'
23+ author true
24+ version true
25+ links " http://docs.oracle.com/javase/7/docs/api"
26+ title PROJ_ARTIFACTID
27+ }
28+ }
29+ artifacts {
30+ archives javadocJar
31+ archives sourcesJar
32+ }
33+ def pomConfig = {
34+ licenses {
35+ license {
36+ name " The Apache Software License, Version 2.0"
37+ url " http://www.apache.org/licenses/LICENSE-2.0.txt"
38+ distribution " repo"
39+ }
40+ }
41+ developers {
42+ developer {
43+ id DEVELOPER_ID
44+ name DEVELOPER_NAME
45+ email DEVELOPER_EMAIL
46+ }
47+ }
48+ }
49+ publishing {
50+ publications {
51+ mavenJava(MavenPublication ) {
52+ artifactId PROJ_ARTIFACTID
53+ pom{
54+ packaging ' aar'
55+ }
56+ pom. withXml {
57+ def root = asNode()
58+ root. appendNode(' description' , PROJ_DESCRIPTION )
59+ root. children(). last() + pomConfig
60+ }
61+ }
62+ }
63+ }
64+ bintray {
65+ user = hasProperty(" bintrayUser" )? getProperty(" bintrayUser" ): getProperty(" BINTRAY_USER" )
66+ key = hasProperty(" bintrayKey" )? getProperty(" bintrayKey" ): getProperty(" BINTRAY_KEY" )
67+ configurations = [' archives' ]
68+ publications = [' mavenJava' ]
69+ publish = true
70+ dryRun = true
71+ pkg {
72+ repo = ' maven'
73+ name = PROJ_NAME
74+ desc = PROJ_DESCRIPTION
75+ websiteUrl = PROJ_WEBSITEURL
76+ issueTrackerUrl = PROJ_ISSUETRACKERURL
77+ vcsUrl = PROJ_VCSURL
78+ licenses = [' Apache-2.0' ]
79+ publicDownloadNumbers = true
80+ }
81+ }
0 commit comments