Skip to content

Commit fdd5664

Browse files
authored
fixup bintray publish script, generate sources and javadoc jars (#1065)
1 parent ec22aa3 commit fdd5664

File tree

3 files changed

+23
-7
lines changed

3 files changed

+23
-7
lines changed

build.gradle

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ def RELEASE_MODULES = ["services",
9191

9292
subprojects { subproject ->
9393

94-
tasks.withType(Jar) { jarTask ->
95-
if (!jarTask.name.endsWith("SourcesJar")) {
94+
tasks.withType(Jar) { jarTask ->
95+
if (!jarTask.name.endsWith("sourcesJar")) {
9696
jarTask.exclude("**/*.java")
9797
}
9898
}
@@ -107,6 +107,21 @@ subprojects { subproject ->
107107
subproject.apply from: "${rootDir}/gradle/gradle-bintray.gradle"
108108
subproject.apply from: "${rootDir}/gradle/dependencies-graph.gradle"
109109
}
110+
111+
task sourcesJar(type: Jar, dependsOn: classes) {
112+
classifier = 'sources'
113+
from sourceSets.main.allSource
114+
}
115+
116+
task javadocJar(type: Jar, dependsOn: javadoc) {
117+
classifier = 'javadoc'
118+
from javadoc.destinationDir
119+
}
120+
121+
artifacts {
122+
archives sourcesJar
123+
archives javadocJar
124+
}
110125
}
111126

112127
task clean(type: Delete) {

circle.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ jobs:
5050
docker:
5151
- image: mbgl/android-ndk-r19:8e91a7ebab
5252
working_directory: ~/code
53-
environment:
5453
environment:
5554
BUILDTYPE: Release
5655
IS_LOCAL_DEVELOPMENT: false

gradle/gradle-bintray.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ publishing {
1313
artifactId project.ext.mapboxArtifactId
1414
version project.ext.versionName
1515

16-
afterEvaluate {
17-
artifact("$buildDir/outputs/aar/${project.ext.mapboxArtifactId}-release.aar")
18-
artifact sourcesJar
19-
artifact javadocJar
16+
artifact sourcesJar {
17+
classifier "sources"
18+
}
19+
20+
artifact javadocJar {
21+
classifier "javadoc"
2022
}
2123

2224
pom.withXml {

0 commit comments

Comments
 (0)