11apply plugin : ' com.android.library'
2- apply plugin : ' com.github.dcendents.android-maven'
3- apply plugin : ' com.jfrog.bintray'
2+ apply plugin : ' com.novoda.bintray-release'
43
54def siteUrl = ' https://github.com/DovSnier/cacheKit'
65def gitUrl = ' git@github.com:DovSnier/cacheKit.git'
@@ -25,6 +24,10 @@ android {
2524 proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
2625 }
2726 }
27+
28+ lintOptions {
29+ abortOnError false
30+ }
2831}
2932
3033dependencies {
@@ -36,48 +39,6 @@ dependencies {
3639 testCompile " junit:junit:${ rootProject.ext.junit_version} "
3740}
3841
39- /*
40- * Could not upload to 'https://api.bintray.com/content/dovsnier/AndroidComponent/cacheLib/0.0.5/cacheKit/cacheLib/unspecified/cacheLib-unspecified.pom': HTTP/1.1 400 Bad Request [mes
41- sage:Unable to upload files: Maven group, artifact or version defined in the pom file do not match the file path 'cacheKit/cacheLib/unspecified/cacheLib-unspecified.pom']
42-
43- * */
44- group = ' com.dvsnier'
45- // version = rootProject.ext.version_name
46-
47- install {
48- repositories. mavenInstaller {
49- pom {
50- project {
51- packaging ' aar'
52- name ' cacheLib'
53- description ' the android cache lib.'
54- url siteUrl
55-
56- licenses {
57- license {
58- name ' The Apache Software License, Version 2.0'
59- url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
60- }
61- }
62-
63- developers {
64- developer {
65- id ' dovsnier'
66- name ' dovsnier'
67- email ' dovsnier@qq.com'
68- }
69- }
70-
71- scm {
72- connection gitUrl
73- developerConnection gitUrl
74- url siteUrl
75- }
76- }
77- }
78- }
79- }
80-
8142task sourcesJar (type : Jar ) {
8243 from android. sourceSets. main. java. srcDirs
8344 classifier = ' sources'
@@ -91,36 +52,28 @@ task javadoc(type: Javadoc) {
9152
9253task javadocJar (type : Jar , dependsOn : javadoc) {
9354 classifier = ' javadoc'
55+ // noinspection GroovyAccessibility
9456 from javadoc. destinationDir
9557}
9658
9759artifacts {
9860 archives javadocJar
9961 archives sourcesJar
10062}
101-
10263Properties properties = new Properties ()
10364properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
104- bintray {
105- user = properties. getProperty(" bintray.user" )
106- key = properties. getProperty(" bintray.apikey" )
107-
108- configurations = [' archives' ]
109- pkg {
110- repo = " AndroidComponent"
111- name = " cacheLib"
112- userOrg = ' dovsnier'
113- websiteUrl = siteUrl
114- vcsUrl = gitUrl
115- licenses = [" Apache-2.0" ]
116- publish = true
117- publicDownloadNumbers = true
118- // dryRun = true
119- version {
120- name = rootProject. ext. version_name
121- desc = " cacheLib ${ rootProject.ext.version_name} "
122- released = new Date ()
123- vcsTag = rootProject. ext. version_name
124- }
125- }
65+ def user = properties. getProperty(" bintray.user" )
66+ def key = properties. getProperty(" bintray.apikey" )
67+ publish {
68+ repoName = ' AndroidComponent'
69+ userOrg = ' dovsnier'
70+ groupId = ' com.dvsnier'
71+ artifactId = ' cacheLib'
72+ publishVersion = rootProject. ext. version_name
73+ desc = " the android cache lib that version is ${ rootProject.ext.version_name} "
74+ website = siteUrl
75+ repository = gitUrl
76+ autoPublish = true
77+ bintrayUser = user
78+ bintrayKey = key
12679}
0 commit comments