Skip to content

Commit ba57229

Browse files
committed
the novoda plugins
1 parent 9ed3059 commit ba57229

File tree

4 files changed

+28
-71
lines changed

4 files changed

+28
-71
lines changed

bintrayUpload.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gradlew clean build publishToMavenLocal bintrayUpload -PdryRun=false > bintrayUpload.log

build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ buildscript {
1212

1313
// NOTE: Do not place your application dependencies here; they belong
1414
// in the individual module build.gradle files
15-
classpath "com.github.dcendents:android-maven-gradle-plugin:${android_maven_gradle_plugin}"
16-
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:${gradle_bintray_plugin}"
15+
classpath "com.novoda:bintray-release:${bintray_release_version}"
1716
}
1817
}
1918

@@ -23,6 +22,11 @@ allprojects {
2322
mavenCentral()
2423
google()
2524
}
25+
26+
tasks.withType(Javadoc) {
27+
options.addStringOption('Xdoclint:none', '-quiet')
28+
options.addStringOption('encoding', 'UTF-8')
29+
}
2630
}
2731

2832
task clean(type: Delete) {

cacheLib/build.gradle

Lines changed: 20 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
apply 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

54
def siteUrl = 'https://github.com/DovSnier/cacheKit'
65
def 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

3033
dependencies {
@@ -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-
8142
task sourcesJar(type: Jar) {
8243
from android.sourceSets.main.java.srcDirs
8344
classifier = 'sources'
@@ -91,36 +52,28 @@ task javadoc(type: Javadoc) {
9152

9253
task javadocJar(type: Jar, dependsOn: javadoc) {
9354
classifier = 'javadoc'
55+
//noinspection GroovyAccessibility
9456
from javadoc.destinationDir
9557
}
9658

9759
artifacts {
9860
archives javadocJar
9961
archives sourcesJar
10062
}
101-
10263
Properties properties = new Properties()
10364
properties.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
}

gradle.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,4 @@ org.gradle.parallel=true
1818
org.gradle.daemon=true
1919
org.gradle.cache=true
2020
build_gradle_version=3.1.3
21-
android_maven_gradle_plugin=2.0
22-
gradle_bintray_plugin=1.8.2
21+
bintray_release_version=0.8.0

0 commit comments

Comments
 (0)