Skip to content

Commit c5901aa

Browse files
committed
Prepare release 5.9.0
1 parent 41d4675 commit c5901aa

7 files changed

Lines changed: 83 additions & 48 deletions

File tree

circle.yml renamed to .circleci/config.yml

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,43 @@ workflows:
44
default:
55
jobs:
66
- build
7+
- test
8+
- release-snapshot:
9+
requires:
10+
- build
11+
- test
12+
filters:
13+
branches:
14+
only:
15+
- master
716
- release:
17+
requires:
18+
- build
19+
- test
820
filters:
921
tags:
10-
only: /v.*/
22+
only: /^v.*/
23+
branches:
24+
ignore: /.*/
25+
1126
jobs:
1227
build:
1328
working_directory: ~/code
1429
docker:
15-
- image: mbgl/android-ndk-r19:8e91a7ebab
16-
environment:
17-
JVM_OPTS: -Xmx3200m
18-
BUILDTYPE: Debug
19-
IS_LOCAL_DEVELOPMENT: false
30+
- image: mbgl/android-ndk-r19:latest
31+
steps:
32+
- checkout
33+
- run:
34+
name: Build libraries
35+
command: make build-release
36+
- run:
37+
name: Build command line interface
38+
command: make build-cli
39+
40+
test:
41+
working_directory: ~/code
42+
docker:
43+
- image: mbgl/android-ndk-r19:latest
2044
steps:
2145
- checkout
2246
- restore_cache:
@@ -44,43 +68,25 @@ jobs:
4468
command: |
4569
bash <(curl -s https://codecov.io/bash)
4670
47-
4871
# ------------------------------------------------------------------------------
49-
release:
50-
branch:
51-
only:
52-
- master
72+
release-snapshot:
5373
docker:
54-
- image: mbgl/android-ndk-r19:8e91a7ebab
74+
- image: mbgl/android-ndk-r19:latest
5575
working_directory: ~/code
56-
environment:
57-
BUILDTYPE: Release
58-
IS_LOCAL_DEVELOPMENT: false
5976
steps:
6077
- checkout
61-
- run:
62-
name: Generate Maven credentials
63-
command: |
64-
if [ -n "${BINTRAY_USER}" ]; then
65-
echo "BINTRAY_USER=$BINTRAY_USER
66-
BINTRAY_API_KEY=$BINTRAY_API_KEY
67-
GPG_PASSPHRASE=$GPG_PASSPHRASE"
68-
fi
69-
- run:
70-
name: Update version name
78+
- deploy:
79+
name: Publish Java snapshot libraries to Mapbox SDK Registry
7180
command: |
72-
if [[ $CIRCLE_TAG == v* ]]; then
73-
sed -i -e "s/^VERSION_NAME=.*/VERSION_NAME=${CIRCLE_TAG:1}/" gradle.properties
74-
fi
75-
- run:
76-
name: Build Java libraries
77-
command: make build-release
81+
make sdk-registry-publish-snapshot
82+
83+
release:
84+
docker:
85+
- image: mbgl/android-ndk-r19:latest
86+
working_directory: ~/code
87+
steps:
88+
- checkout
7889
- deploy:
79-
name: Publish Java libraries to Bintray
90+
name: Publish Java libraries to Mapbox SDK Registry
8091
command: |
81-
if [[ $CIRCLE_BRANCH == master ]] || [[ $CIRCLE_TAG == v* ]]; then
82-
version=$(cat gradle.properties | grep "VERSION_NAME")
83-
if [[ $version != *"SNAPSHOT"* ]]; then
84-
make publish-to-sdk-registry
85-
fi
86-
fi
92+
make sdk-registry-publish

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Mapbox welcomes participation and contributions from everyone.
44

55
### master
66

7+
### 5.9.0 - February 12, 2021
8+
- Stopped releasing artifacts to jfrog and now to Mapbox's sdk-registry
9+
710
### 5.9.0-alpha-1 - February 12, 2021
811
- Fixed `DirectionsRefreshResponse` flow: introduced `DirectionsRouteRefresh` and restricted dependency on `DirectionsRoute` which is a critical bug fixes. Even though this is a semver-breaking change, we're not considering it as one because the refresh feature was non-functional beforehand. [#1225](https://github.com/mapbox/mapbox-java/pull/1225)
912

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,22 @@ javadoc:
3030
./gradlew :services-turf:javadoc; mv services-turf/build/docs/javadoc/ ./documentation/turf/javadoc/ ; \
3131
./gradlew :services:javadoc; mv services/build/docs/javadoc/ ./documentation/services/javadoc/ ; \
3232

33-
publish-to-sdk-registry:
33+
sdk-registry-publish:
3434
./gradlew :services-core:mapboxSDKRegistryUpload ; \
3535
./gradlew :services-geojson:mapboxSDKRegistryUpload ; \
3636
./gradlew :services:mapboxSDKRegistryUpload ; \
3737
./gradlew :services-turf:mapboxSDKRegistryUpload ; \
3838
./gradlew :services-directions-models:mapboxSDKRegistryUpload ; \
3939
./gradlew :services-directions-refresh-models:mapboxSDKRegistryUpload ; \
4040

41+
sdk-registry-publish-snapshot:
42+
./gradlew :services-core:mapboxSDKRegistryUpload -Psnapshot=true ; \
43+
./gradlew :services-geojson:mapboxSDKRegistryUpload -Psnapshot=true ; \
44+
./gradlew :services:mapboxSDKRegistryUpload -Psnapshot=true ; \
45+
./gradlew :services-turf:mapboxSDKRegistryUpload -Psnapshot=true ; \
46+
./gradlew :services-directions-models:mapboxSDKRegistryUpload -Psnapshot=true ; \
47+
./gradlew :services-directions-refresh-models:mapboxSDKRegistryUpload -Psnapshot=true ; \
48+
4149
graphs:
4250
./gradlew :services-core:generateDependencyGraphMapboxLibraries
4351
./gradlew :services-geojson:generateDependencyGraphMapboxLibraries

gradle.properties

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# Project-wide Gradle settings.
2-
VERSION_NAME=5.8.0-SNAPSHOT
3-
41
# Specifies the JVM arguments used for the daemon process.
52
# The setting is particularly useful for tweaking memory settings.
63
org.gradle.jvmargs=-Xmx2048M

gradle/artifact-settings.gradle

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
ext {
2-
32
mapboxArtifactGroupId = 'com.mapbox.mapboxsdk'
43
mapboxArtifactId = project.hasProperty('POM_ARTIFACT_ID') ? project.property('POM_ARTIFACT_ID') : System.getenv('POM_ARTIFACT_ID')
54
mapboxArtifactTitle = 'Mapbox Java SDK'
@@ -14,5 +13,25 @@ ext {
1413
mapboxArtifactScmUrl = 'scm:git@github.com:mapbox/mapbox-java.git'
1514
mapboxArtifactLicenseName = 'The Apache Software License, Version 2.0'
1615
mapboxArtifactLicenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
17-
versionName = project.hasProperty('VERSION_NAME') ? project.property('VERSION_NAME') : System.getenv('VERSION_NAME')
18-
}
16+
versionName = getVersionName()
17+
}
18+
19+
def getVersionName() {
20+
def cmd = "git describe --tag --abbrev=0"
21+
def proc = cmd.execute()
22+
def version = proc.text.trim()
23+
return isSnapshot() ? getSnapshotVersion(version) : version
24+
}
25+
26+
def isSnapshot() {
27+
return project.hasProperty("snapshot")
28+
? project.property("snapshot").toBoolean()
29+
: false
30+
}
31+
32+
private static def getSnapshotVersion(String version) {
33+
def matcher = version =~ /^[v|V](\d+).(\d+)?.*/
34+
def major = (matcher[0][1] as Integer)
35+
def minor = (matcher[0][2] as Integer) + 1
36+
return "v${major}.${minor}.0-SNAPSHOT"
37+
}

gradle/publish.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,15 @@ registry {
6060
sdkName = sdkNameMap[project.name]
6161
production = true
6262
snapshot = project.ext.versionName.endsWith("-SNAPSHOT")
63-
override = snapshot ? true : false
63+
override = snapshot
6464
dryRun = false
6565
publish = true
6666
publications = ["MapboxJavaSDKPublication"]
6767
}
6868

69+
6970
tasks.withType(Javadoc) {
7071
options.addStringOption('encoding', 'UTF-8')
7172
options.addStringOption('docencoding', 'UTF-8')
7273
options.addStringOption('charset', 'UTF-8')
73-
}
74+
}

services-core/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ apply plugin: 'java-library'
44
// so that Maps SDK doesn't rely on them being served from the top level build.gradle
55
apply plugin: 'de.fuerstenau.buildconfig'
66
apply from: "../gradle/dependencies.gradle"
7+
apply from: file("${rootDir}/gradle/artifact-settings.gradle")
78

89
buildscript {
910
apply from: "../gradle/dependencies.gradle"
@@ -23,7 +24,7 @@ configurations {
2324

2425
buildConfig {
2526
packageName = 'com.mapbox.core'
26-
version = project.VERSION_NAME
27+
version = project.ext.versionName
2728
buildConfigField 'String', 'GIT_REVISION', getGitRevision()
2829
}
2930

0 commit comments

Comments
 (0)