Skip to content

Commit 0fee603

Browse files
committed
more gradle and circle tweaks
1 parent ed7fd2c commit 0fee603

File tree

13 files changed

+76
-39
lines changed

13 files changed

+76
-39
lines changed

Makefile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
MBGL_ANDROID_PLUGINS += traffic;plugin-traffic
2-
MBGL_ANDROID_PLUGINS += locationlayer;plugin-locationlayer
32
MBGL_ANDROID_PLUGINS += building;plugin-building
43
MBGL_ANDROID_PLUGINS += offline;plugin-offline
54
MBGL_ANDROID_PLUGINS += places;plugin-places
5+
MBGL_ANDROID_PLUGINS += annotation;plugin-annotation
66
MBGL_ANDROID_PLUGINS += localization;plugin-localization
7+
MBGL_ANDROID_PLUGINS += markerview;plugin-markerview
8+
MBGL_ANDROID_PLUGINS += scalebar;plugin-scalebar
79

810
checkstyle:
911
./gradlew checkstyle
@@ -22,6 +24,9 @@ javadoc:
2224
publish:
2325
export IS_LOCAL_DEVELOPMENT=false; ./gradlew bintrayUpload
2426

27+
publish-snapshot:
28+
export IS_LOCAL_DEVELOPMENT=false; ./gradlew artifactoryPublish
29+
2530
publish-local:
2631
# This publishes to ~/.m2/repository/com/mapbox/mapboxsdk
2732
export IS_LOCAL_DEVELOPMENT=true; ./gradlew bintrayUpload
@@ -50,11 +55,14 @@ javadoc-$1:
5055
./gradlew :$2:javadocrelease
5156

5257
publish-$1:
53-
export IS_LOCAL_DEVELOPMENT=false; ./gradlew :$2:uploadArchives
58+
export IS_LOCAL_DEVELOPMENT=false; ./gradlew :$2: bintrayUpload
59+
60+
publish-snapshot-$1:
61+
export IS_LOCAL_DEVELOPMENT=false; ./gradlew :$2: artifactoryPublish
5462

5563
publish-local-$1:
5664
# This publishes to ~/.m2/repository/com/mapbox/mapboxsdk
57-
export IS_LOCAL_DEVELOPMENT=true; ./gradlew :$2:uploadArchives
65+
export IS_LOCAL_DEVELOPMENT=true; ./gradlew :$2: bintrayUpload
5866

5967
endef
6068

build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ buildscript {
44
repositories {
55
google()
66
jcenter()
7-
maven { url "https://maven.google.com" }
7+
maven { url "https://maven.google.com" }
88
maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local/' }
99
}
1010

@@ -31,11 +31,8 @@ allprojects {
3131
subprojects {
3232
apply plugin: 'idea'
3333
apply from: "${rootDir}/gradle/dependencies.gradle"
34-
apply plugin: "com.jfrog.artifactory"
3534
}
3635

3736
task clean(type: Delete) {
3837
delete rootProject.buildDir
3938
}
40-
41-
//apply plugin: "com.jfrog.artifactory"

circle.yml

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,60 @@ jobs:
106106
- deploy:
107107
name: Publish Plugins SDK to Bintray
108108
command: |
109-
if [ -n "${BINTRAY_USER}" ]; then
110-
if [ "${CIRCLE_BRANCH}" == "master" ]; then
111-
make publish
109+
if [[ $CIRCLE_BRANCH == master ]] || [[ $CIRCLE_BRANCH == release-* ]] || [[ $CIRCLE_TAG == v*- ]]; then
110+
if [[ $version != *"SNAPSHOT"* ]]; then
111+
if [ "${CIRCLE_TAG}" == "v*-annotation" ]; then
112+
make publish-annotation
113+
fi
114+
if [ "${CIRCLE_TAG}" == "v*-localization" ]; then
115+
make publish-localization
116+
fi
117+
if [ "${CIRCLE_TAG}" == "v*-building" ]; then
118+
make publish-building
119+
fi
120+
if [ "${CIRCLE_TAG}" == "v*-markerview" ]; then
121+
make publish-markerview
122+
fi
123+
if [ "${CIRCLE_TAG}" == "v*-offline" ]; then
124+
make publish-offline
125+
fi
126+
if [ "${CIRCLE_TAG}" == "v*-places" ]; then
127+
make publish-places
128+
fi
129+
if [ "${CIRCLE_TAG}" == "v*-scalebar" ]; then
130+
make publish-scalebar
131+
fi
132+
if [ "${CIRCLE_TAG}" == "v*-traffic" ]; then
133+
make publish-traffic
134+
fi
135+
else
136+
if [ "${CIRCLE_TAG}" == "v*-annotation" ]; then
137+
make publish-snapshot-annotation
138+
fi
139+
if [ "${CIRCLE_TAG}" == "v*-localization" ]; then
140+
make publish-snapshot-localization
141+
fi
142+
if [ "${CIRCLE_TAG}" == "v*-building" ]; then
143+
make publish-snapshot-building
144+
fi
145+
if [ "${CIRCLE_TAG}" == "v*-markerview" ]; then
146+
make publish-snapshot-markerview
147+
fi
148+
if [ "${CIRCLE_TAG}" == "v*-offline" ]; then
149+
make publish-snapshot-offline
150+
fi
151+
if [ "${CIRCLE_TAG}" == "v*-places" ]; then
152+
make publish-snapshot-places
153+
fi
154+
if [ "${CIRCLE_TAG}" == "v*-scalebar" ]; then
155+
make publish-snapshot-scalebar
156+
fi
157+
if [ "${CIRCLE_TAG}" == "v*-traffic" ]; then
158+
make publish-snapshot-traffic
159+
fi
112160
fi
113161
fi
162+
114163
- store_artifacts:
115164
path: app/build/reports
116165
destination: reports

gradle/gradle-bintray-generic.gradle

Lines changed: 0 additions & 1 deletion
This file was deleted.

gradle/gradle-bintray.gradle

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ publishing {
1515
afterEvaluate {
1616
artifact("$buildDir/outputs/aar/${project.name}-release.aar")
1717
artifact(androidSourcesJar)
18-
// artifact(androidJavadocsJar)
19-
20-
artifact (androidJavadocsJar) {
21-
classifier = 'javadoc'
22-
}
18+
artifact(androidJavadocsJar)
2319
}
2420

2521
pom.withXml {
@@ -89,15 +85,11 @@ artifactory {
8985

9086
task androidSourcesJar(type: Jar) {
9187
classifier "sources"
88+
extension "aar"
9289
from android.sourceSets.main.java.srcDirs
9390
}
9491

9592
task androidJavadocs(type: Javadoc) {
96-
/*source = android.sourceSets.main.java.sourceFiles
97-
classpath = files(android.bootClasspath)
98-
failOnError = false*/
99-
100-
10193
source = android.sourceSets.main.java.srcDirs
10294
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
10395
android.libraryVariants.all { variant ->
@@ -119,10 +111,10 @@ tasks.withType(Javadoc) {
119111
options.addStringOption('charset', 'UTF-8')
120112
}
121113

122-
artifacts {
114+
/*artifacts {
123115
archives androidSourcesJar
124116
archives androidJavadocsJar
125-
}
117+
}*/
126118

127119
afterEvaluate { project ->
128120
android.libraryVariants.all { variant ->

plugin-annotation/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,4 @@ apply from: "${rootDir}/gradle/javadoc.gradle"
3636
apply from: "${rootDir}/gradle/checkstyle.gradle"
3737
apply from: "${rootDir}/gradle/nitpick.gradle"
3838
apply from: "${rootDir}/gradle/artifact-settings.gradle"
39-
apply from: "${rootDir}/gradle/gradle-bintray.gradle"
40-
apply from: "${rootDir}/gradle/gradle-bintray-generic.gradle"
39+
apply from: "${rootDir}/gradle/gradle-bintray.gradle"

plugin-building/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,4 @@ dependencies {
3333
apply from: "${rootDir}/gradle/javadoc.gradle"
3434
apply from: "${rootDir}/gradle/checkstyle.gradle"
3535
apply from: "${rootDir}/gradle/artifact-settings.gradle"
36-
apply from: "${rootDir}/gradle/gradle-bintray.gradle"
37-
apply from: "${rootDir}/gradle/gradle-bintray-generic.gradle"
36+
apply from: "${rootDir}/gradle/gradle-bintray.gradle"

plugin-localization/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,4 @@ dependencies {
3333
apply from: "${rootDir}/gradle/javadoc.gradle"
3434
apply from: "${rootDir}/gradle/checkstyle.gradle"
3535
apply from: "${rootDir}/gradle/artifact-settings.gradle"
36-
apply from: "${rootDir}/gradle/gradle-bintray.gradle"
37-
apply from: "${rootDir}/gradle/gradle-bintray-generic.gradle"
36+
apply from: "${rootDir}/gradle/gradle-bintray.gradle"

plugin-markerview/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,4 @@ dependencies {
3434
apply from: "${rootDir}/gradle/javadoc.gradle"
3535
apply from: "${rootDir}/gradle/checkstyle.gradle"
3636
apply from: "${rootDir}/gradle/artifact-settings.gradle"
37-
apply from: "${rootDir}/gradle/gradle-bintray.gradle"
38-
apply from: "${rootDir}/gradle/gradle-bintray-generic.gradle"
37+
apply from: "${rootDir}/gradle/gradle-bintray.gradle"

plugin-offline/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,4 @@ dependencies {
5252
apply from: "${rootDir}/gradle/javadoc.gradle"
5353
apply from: "${rootDir}/gradle/checkstyle.gradle"
5454
apply from: "${rootDir}/gradle/artifact-settings.gradle"
55-
apply from: "${rootDir}/gradle/gradle-bintray.gradle"
56-
apply from: "${rootDir}/gradle/gradle-bintray-generic.gradle"
55+
apply from: "${rootDir}/gradle/gradle-bintray.gradle"

0 commit comments

Comments
 (0)