1- apply plugin : ' com.jfrog.bintray'
2- apply plugin : ' com.github.dcendents.android-maven'
1+ apply plugin : ' com.novoda.bintray-release'
32
4- Properties properties = new Properties ()
5- boolean isHasFile = false
6- if (project. rootProject. findProject(' local.properties' ) != null ){
7- isHasFile = true
8- properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
3+ allprojects {
4+ repositories {
5+ jcenter()
6+ }
7+ tasks. withType(Javadoc ) {
8+ options{ encoding " UTF-8"
9+ charSet ' UTF-8'
10+ links " http://docs.oracle.com/javase/7/docs/api"
11+ }
12+ }
913}
1014
11- def gitUrl = ' https://github.com/JessYanCoding/RxErrorHandler.git' // Git仓库的url
12- def siteUrl = ' https://github.com/JessYanCoding/RxErrorHandler' // 项目的主页
13-
14- version = " 2.0.2"
15- group = " me.jessyan"
1615
16+ def siteUrl = ' https://github.com/JessYanCoding/RxErrorHandler' // 项目的主页
1717
18- bintray {
19- user = isHasFile ? properties. getProperty(" bintray.user" ) : System . getenv(" bintray_user" )
20- key = isHasFile ? properties. getProperty(" bintray.apikey" ) : System . getenv(" bintray_apikey" )
18+ publish {
19+ userOrg = ' jessyancoding' // bintray注册的用户名
20+ groupId = ' me.jessyan' // compile引用时的第1部分groupId
21+ artifactId = ' rxerrorhandler' // compile引用时的第2部分项目名
22+ publishVersion = ' 2.0.2' // compile引用时的第3部分版本号
23+ desc = ' Error Handle Of Rxjava'
24+ website = siteUrl
25+ }
2126
22- pkg {
23- repo = ' maven'
24- name = ' RxErrorHandler'
25- licenses = [" Apache-2.0" ]
26- websiteUrl = siteUrl
27- vcsUrl = gitUrl
28- publish = true // 是否是公开项目。
2927
30- version {
31- name = " 2.0.2"
32- desc = ' Error Handle Of Rxjava.'
33- released = new Date ()
34- vcsTag = ' v2.0.2'
35- attributes = [' gradle-plugin' : ' com.use.less:com.use.less.gradle:gradle-useless-plugin' ]
36- }
37- }
38- configurations = [' archives' ]
39- }
4028
4129
4230
43- install {
44- repositories. mavenInstaller {
45- // This generates POM.xml with proper parameters
46- pom {
47- project {
48- packaging ' aar'
49- // Add your description here
50- name ' RxErrorHandler'
51- description ' Error Handle Of Rxjava.'
52- url siteUrl
53- // Set your license
54- licenses {
55- license {
56- name ' The Apache Software License, Version 2.0'
57- url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
58- }
59- }
60- developers {
61- developer {
62- id ' JessYanCoding' // 填写bintray或者github的用户名
63- name ' jessyan' // 姓名,可以是中文
64- email ' jess.yan.effort@gmail.com'
65- }
66- }
67- scm {
68- connection gitUrl
69- developerConnection gitUrl
70- url siteUrl
71- }
72- }
73- }
74- }
75- }
7631
77- task sourcesJar (type : Jar ) {
78- from android. sourceSets. main. java. srcDirs
79- classifier = ' sources'
80- }
81- task javadoc (type : Javadoc ) {
82- failOnError false
83- source = android. sourceSets. main. java. srcDirs
84- classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
85- }
86- task javadocJar (type : Jar , dependsOn : javadoc) {
87- classifier = ' javadoc'
88- from javadoc. destinationDir
89- }
90- artifacts {
91- archives javadocJar
92- archives sourcesJar
93- }
0 commit comments