Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.

Commit

Permalink
Merge branch 'mapbox_release5.2.1' into mappy_mergre_mapbox_5.2
Browse files Browse the repository at this point in the history
* mapbox_release5.2.1: (29 commits)
  [android] - update changelog for 5.2.1 release
  [ios, macos] Rename the iOS and macOS SDKs (mapbox#10610)
  [core, ios, qt, android] Close race condition in RunLoop (issue mapbox#9620) Because a message we queue from the foreground may cause the background to complete, exit, and tear down the AsyncTask, we have to block queue processing until we've finished our call to AsyncTask::send(). Broadening the scope of a mutex is scary, but I audited the code of our four implementations of AsyncTask and I don't see any way this could cause a deadlock.
  [android] - add FileSource activation/deactivation to MapSnapshotter, handle multiple deactivate scenario in FileSource (mapbox#10556)
  [android] - handle destroying activity programmatically as part of theme switching (mapbox#10589)
  [android] - use concurrent lists for camera change listeners (mapbox#10542)
  [android] - harden MarkerView integration by checking for null bitmap (mapbox#10532)
  [android] - activate filesource to list offline regions (mapbox#10531)
  [android] Enable map rendering when app is paused
  [ios, macos] Snapshot classes added to jazzy
  [android] remove unnecessary jar generation from gradle-publish.gradle (mapbox#10625)
  [ios, macos] Refactor snapshot attribution.
  [macos] Fixed logo view distortion on macOS High Sierra
  [ios, macos] Update changelogs.
  [ios, macos] Fix an issue that triggers didSelectAnnotations for MGLAnnotationImage based annotations.
  [ios] Fix minimumZoomLevel is not getting set.
  [android] - attribtuion anchor point calculation fix for short text with full logo on a MapSnapshot (mapbox#10558)
  [android] use location engine abstraction instead of location source (lost) in MyLocationView#init (mapbox#10579)
  [build] Added CircleCI macos-release-node{4,6} jobs
  [android] Set a larger limit for the HTTP dispatcher (mapbox#10567)
  ...

# Conflicts:
#	platform/android/CHANGELOG.md
#	platform/android/MapboxGLAndroidSDK/gradle-publish.gradle
#	platform/android/MapboxGLAndroidSDK/gradle.properties
  • Loading branch information
Tran Thuong Tien committed Dec 11, 2017
2 parents c266ba6 + 1ada238 commit 4567342
Show file tree
Hide file tree
Showing 91 changed files with 1,662 additions and 411 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
Each Mapbox GL Native SDK has a separate changelog that highlights changes relevant to their respective platforms:

* [Mapbox Android SDK](platform/android/CHANGELOG.md)
* [Mapbox iOS SDK](platform/ios/CHANGELOG.md)
* [Mapbox macOS SDK](platform/macos/CHANGELOG.md)
* [Mapbox Maps SDK for iOS](platform/ios/CHANGELOG.md)
* [Mapbox Maps SDK for macOS](platform/macos/CHANGELOG.md)
* [node-mapbox-gl-native](platform/node/CHANGELOG.md)
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ If you want to contribute code:

1. Pull requests are gladly accepted. If there are any changes that developers using one of the GL SDKs should be aware of, please update the **master** section of the relevant changelog(s):
* [Mapbox Android SDK](platform/android/CHANGELOG.md)
* [Mapbox iOS SDK](platform/ios/CHANGELOG.md)
* [Mapbox macOS SDK](platform/macos/CHANGELOG.md)
* [Mapbox Maps SDK for iOS](platform/ios/CHANGELOG.md)
* [Mapbox Maps SDK for macOS](platform/macos/CHANGELOG.md)
* [node-mapbox-gl-native](platform/node/CHANGELOG.md)

1. Prefix your commit messages with the platform(s) your changes affect: `[core]`, `[android]`, `[ios]`, `[macos]`, `[node]`, or `[qt]`.
Expand Down
6 changes: 3 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ dependencies:

See the relevant SDK documentation for next steps:

* [Mapbox Android SDK](platform/android/)
* [Mapbox iOS SDK](platform/ios/)
* [Mapbox macOS SDK](platform/macos/)
* [Maps SDK for Android](platform/android/)
* [Maps SDK for iOS](platform/ios/)
* [Maps SDK for iOS](platform/macos/)
* [Mapbox Qt SDK](platform/qt/)
* [Mapbox GL Native on Linux](platform/linux/)
* [node-mapbox-gl-native](platform/node/)
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,12 @@ apackage: platform/android/configuration.gradle
# Uploads the compiled Android SDK to Maven
.PHONY: run-android-upload-archives
run-android-upload-archives: platform/android/configuration.gradle
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=all :MapboxGLAndroidSDK:uploadArchives
cd platform/android && export IS_LOCAL_DEVELOPMENT=false && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=all :MapboxGLAndroidSDK:uploadArchives

# Uploads the compiled Android SDK to ~/.m2/repository/com/mapbox/mapboxsdk
.PHONY: run-android-upload-archives-local
run-android-upload-archives-local: platform/android/configuration.gradle
cd platform/android && export IS_LOCAL_DEVELOPMENT=true && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=all :MapboxGLAndroidSDK:uploadArchives

# Dump system graphics information for the test app
.PHONY: android-gfxinfo
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ This repository hosts the cross-platform Mapbox GL Native library, plus convenie
| SDK | Languages | Build status |
| --------------------------------------- | ---------------------------------- | ---------------------------------------- |
| [Mapbox GL Native](INSTALL.md) | C++14 | [![Circle CI build status](https://circleci.com/gh/mapbox/mapbox-gl-native.svg?style=shield)](https://circleci.com/gh/mapbox/workflows/mapbox-gl-native/tree/master) [![Coverage Status](https://coveralls.io/repos/github/mapbox/mapbox-gl-native/badge.svg?branch=master)](https://coveralls.io/github/mapbox/mapbox-gl-native?branch=master) |
| [Mapbox Android SDK](platform/android/) | Java | [![Circle CI build status](https://circleci.com/gh/mapbox/mapbox-gl-native.svg?style=shield)](https://circleci.com/gh/mapbox/workflows/mapbox-gl-native/tree/master) |
| [Mapbox iOS SDK](platform/ios/) | Objective-C or Swift | [![Bitrise](https://www.bitrise.io/app/7514e4cf3da2cc57.svg?token=OwqZE5rSBR9MVWNr_lf4sA&branch=master)](https://www.bitrise.io/app/7514e4cf3da2cc57) |
| [Mapbox macOS SDK](platform/macos/) | Objective-C, Swift, or AppleScript | [![Bitrise](https://www.bitrise.io/app/155ef7da24b38dcd.svg?token=4KSOw_gd6WxTnvGE2rMttg&branch=master)](https://www.bitrise.io/app/155ef7da24b38dcd) |
| [Mapbox Maps SDK for Android](platform/android/) | Java | [![Circle CI build status](https://circleci.com/gh/mapbox/mapbox-gl-native.svg?style=shield)](https://circleci.com/gh/mapbox/workflows/mapbox-gl-native/tree/master) |
| [Mapbox Maps SDK for iOS](platform/ios/) | Objective-C or Swift | [![Bitrise](https://www.bitrise.io/app/7514e4cf3da2cc57.svg?token=OwqZE5rSBR9MVWNr_lf4sA&branch=master)](https://www.bitrise.io/app/7514e4cf3da2cc57) |
| [Mapbox Maps SDK for macOS](platform/macos/) | Objective-C, Swift, or AppleScript | [![Bitrise](https://www.bitrise.io/app/155ef7da24b38dcd.svg?token=4KSOw_gd6WxTnvGE2rMttg&branch=master)](https://www.bitrise.io/app/155ef7da24b38dcd) |
| [node-mapbox-gl-native](platform/node/) | Node.js | [![Circle CI build status](https://circleci.com/gh/mapbox/mapbox-gl-native.svg?style=shield)](https://circleci.com/gh/mapbox/workflows/mapbox-gl-native/tree/master) |
| [Mapbox Qt SDK](platform/qt) | C++03 | [![Circle CI build status](https://circleci.com/gh/mapbox/mapbox-gl-native.svg?style=shield)](https://circleci.com/gh/mapbox/workflows/mapbox-gl-native/tree/master) |

Expand Down
122 changes: 116 additions & 6 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ workflows:
#- ios-sanitize-address
- ios-sanitize-thread
- macos-debug
- macos-debug-qt5
- macos-release-node4:
filters:
tags:
only: /node-.*/
- macos-release-node6:
filters:
tags:
only: /node-.*/

step-library:
- &generate-cache-key
Expand Down Expand Up @@ -119,24 +128,57 @@ step-library:

- &install-macos-dependencies
run:
name: Install dependencies
name: Install macOS dependencies
command: |
brew install cmake
brew install ccache
- &install-macos-node4-dependencies
run:
name: Install macOS Node@4 dependencies
command: |
brew install node@4
brew link node@4 --force --overwrite
- &run-node-tests
- &install-macos-node6-dependencies
run:
name: Install macOS Node@6 dependencies
command: |
brew install node@6
brew link node@6 --force --overwrite
- &install-macos-qt-dependencies
run:
name: Install macOS Qt dependencies
command: |
sudo chown -R $USER /usr/local
brew install qt
brew link qt --force
brew linkapps qt
export HOMEBREW_QT5_CELLAR=$(brew --cellar qt)
export HOMEBREW_QT5_VERSION=$(brew list --versions qt | rev | cut -d' ' -f1 | rev)
ln -s $HOMEBREW_QT5_CELLAR/$HOMEBREW_QT5_VERSION/mkspecs /usr/local/mkspecs
ln -s $HOMEBREW_QT5_CELLAR/$HOMEBREW_QT5_VERSION/plugins /usr/local/plugins
- &run-node-macos-tests
run:
name: Run node tests
command: make test-node

- &run-node-linux-tests
run:
name: Run node tests
command: |
xvfb-run --server-args="-screen 0 1024x768x24" \
logbt -- apitrace trace --api=egl -v make test-node
- &run-node-tests-recycle-map
- &run-node-linux-tests-recycle-map
run:
name: Run node tests (recycling the map object)
command: |
xvfb-run --server-args="-screen 0 1024x768x24" \
logbt -- apitrace trace --api=egl -v make test-node-recycle-map
- &run-unit-tests
run:
name: Run tests
Expand Down Expand Up @@ -187,6 +229,7 @@ jobs:
- run:
name: Run Clang checks
command: make check
no_output_timeout: 20m

# ------------------------------------------------------------------------------
android-debug-arm-v7:
Expand Down Expand Up @@ -342,7 +385,7 @@ jobs:
- *build-node
- *show-ccache-stats
- *save-cache
- *run-node-tests
- *run-node-linux-tests
- *publish-node-package
- *upload-render-tests

Expand All @@ -365,7 +408,7 @@ jobs:
- *build-node
- *show-ccache-stats
- *save-cache
- *run-node-tests
- *run-node-linux-tests
- *publish-node-package
- *upload-render-tests

Expand All @@ -388,7 +431,7 @@ jobs:
- *build-node
- *show-ccache-stats
- *save-cache
- *run-node-tests-recycle-map
- *run-node-linux-tests-recycle-map
- *publish-node-package
- *upload-render-tests-recycle-map

Expand Down Expand Up @@ -692,3 +735,70 @@ jobs:
- store_artifacts:
path: test/fixtures
destination: test/fixtures

# ------------------------------------------------------------------------------
macos-debug-qt5:
macos:
xcode: "9.0"
environment:
BUILDTYPE: Debug
HOMEBREW_NO_AUTO_UPDATE: 1
steps:
- checkout
- *install-macos-dependencies
- *install-macos-qt-dependencies
- *generate-cache-key
- *restore-cache
- *reset-ccache-stats
- *build-qt-app
- *build-qt-test
- run:
name: Run qt-test
command: make run-qt-test
- *show-ccache-stats
- *save-cache
- store_artifacts:
path: test/fixtures
destination: test/fixtures

# ------------------------------------------------------------------------------
macos-release-node4:
macos:
xcode: "9.0"
environment:
BUILDTYPE: RelWithDebInfo
HOMEBREW_NO_AUTO_UPDATE: 1
steps:
- checkout
- *install-macos-dependencies
- *install-macos-node4-dependencies
- *generate-cache-key
- *restore-cache
- *reset-ccache-stats
- *build-node
- *show-ccache-stats
- *save-cache
- *run-node-macos-tests
- *publish-node-package
- *upload-render-tests

# ------------------------------------------------------------------------------
macos-release-node6:
macos:
xcode: "9.0"
environment:
BUILDTYPE: RelWithDebInfo
HOMEBREW_NO_AUTO_UPDATE: 1
steps:
- checkout
- *install-macos-dependencies
- *install-macos-node6-dependencies
- *generate-cache-key
- *restore-cache
- *reset-ccache-stats
- *build-node
- *show-ccache-stats
- *save-cache
- *run-node-macos-tests
- *publish-node-package
- *upload-render-tests
14 changes: 14 additions & 0 deletions platform/android/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ Mapbox welcomes participation and contributions from everyone. If you'd like to

* TBA

## 5.2.1 - December 6, 2017
- Close race condition in RunLoop [#10537](https://github.com/mapbox/mapbox-gl-native/pull/10537)
- OkHttp 3.9.1 [#10515](https://github.com/mapbox/mapbox-gl-native/pull/10515)
- Attribution anchor point fix [#10558](https://github.com/mapbox/mapbox-gl-native/pull/10558)
- Pre API 19 VerifyError [#10579](https://github.com/mapbox/mapbox-gl-native/pull/10579)
- Set larger Http request limit [#10567](https://github.com/mapbox/mapbox-gl-native/pull/10567)
- Remove jar generation from maven publish [#10625](https://github.com/mapbox/mapbox-gl-native/pull/10625)
- Enable Map Rendering when paused for multiple window support [#10509](https://github.com/mapbox/mapbox-gl-native/pull/10509)
- Activate FileSource when listing offline regions [#10531](https://github.com/mapbox/mapbox-gl-native/pull/10531)
- Harden MarkerView integration by checking for null bitmap [#10532](https://github.com/mapbox/mapbox-gl-native/pull/10532)
- Use concurrent lists for camera change listeners [#10542](https://github.com/mapbox/mapbox-gl-native/pull/10542)
- Handle destroy activity as part of theme switching [#10589](https://github.com/mapbox/mapbox-gl-native/pull/10589)
- add FileSource activation/deactivation to MapSnapshotter [#10556](https://github.com/mapbox/mapbox-gl-native/pull/10556)

## 5.2.0 - November 17, 2017

- Monkey crashes [#10472](https://github.com/mapbox/mapbox-gl-native/pull/10472)
Expand Down
43 changes: 29 additions & 14 deletions platform/android/MapboxGLAndroidSDK/gradle-publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ repositories {
mavenCentral()
}

// From https://raw.github.com/mcxiaoke/gradle-mvn-push/master/jar.gradle

// From https://raw.github.com/mcxiaoke/gradle-mvn-push/master/gradle-mvn-push.gradle
def isReleaseBuild() {
return VERSION_NAME.contains("SNAPSHOT") == false
}

def isLocalBuild() {
if (System.getenv('IS_LOCAL_DEVELOPMENT') != null) {
return System.getenv('IS_LOCAL_DEVELOPMENT').toBoolean()
}
return true
}

def getReleaseRepositoryUrl() {
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL :
"https://oss.sonatype.org/service/local/staging/deploy/maven2/"
Expand All @@ -31,6 +35,10 @@ def getSnapshotRepositoryUrl() {
"https://oss.sonatype.org/content/repositories/snapshots/"
}

def obtainMavenLocalUrl() {
return getRepositories().mavenLocal().getUrl()
}

def getRepositoryUsername() {
return hasProperty('USERNAME') ? USERNAME :
(hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : "")
Expand All @@ -41,7 +49,6 @@ def getRepositoryPassword() {
(hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : "")
}


afterEvaluate { project ->
uploadArchives {
repositories {
Expand All @@ -51,17 +58,16 @@ afterEvaluate { project ->
pom.artifactId = POM_ARTIFACT_ID
pom.version = VERSION_NAME

repository(url: "file://${System.env.MAVEN}")

/*
// Leaving out as artifact was incorrectly named when found
addFilter('aar') { artifact, file ->
artifact.name == archivesBaseName
}
addFilter('apklib') { artifact, file ->
artifact.name == archivesBaseName + '-apklib'
if (isLocalBuild()) {
repository(url: obtainMavenLocalUrl())
} else {
repository(url: getReleaseRepositoryUrl()) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}
snapshotRepository(url: getSnapshotRepositoryUrl()) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}
}
*/

pom.project {
name POM_NAME
Expand Down Expand Up @@ -96,3 +102,12 @@ afterEvaluate { project ->


}

// See: https://github.com/chrisbanes/gradle-mvn-push/issues/43#issuecomment-84140513
afterEvaluate { project ->
android.libraryVariants.all { variant ->
tasks.androidJavadocs.doFirst {
classpath += files(variant.javaCompile.classpath.files)
}
}
}
2 changes: 1 addition & 1 deletion platform/android/MapboxGLAndroidSDK/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GROUP=com.mapbox.mapboxsdk
VERSION_NAME=5.2.0
VERSION_NAME=5.2.1

POM_DESCRIPTION=Mapbox GL Android SDK
POM_URL=https://github.com/mapbox/mapbox-gl-native
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public String getId() {
* @return The bitmap being used for the icon.
*/
public Bitmap getBitmap() {
if (mBitmap.getConfig() != Bitmap.Config.ARGB_8888) {
if (mBitmap != null && mBitmap.getConfig() != Bitmap.Config.ARGB_8888) {
mBitmap = mBitmap.copy(Bitmap.Config.ARGB_8888, false);
}
return mBitmap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public AttributionLayout execute(AttributionMeasure measure) {
float width = measure.getLogoContainerWidth() + measure.getTextViewShortContainerWidth();
boolean fitBounds = width <= measure.getMaxSizeShort();
if (fitBounds) {
PointF anchor = calculateAnchor(measure.snapshot, measure.textView, measure.margin);
PointF anchor = calculateAnchor(measure.snapshot, measure.textViewShort, measure.margin);
return new AttributionLayout(measure.logo, anchor, true);
}
return null;
Expand Down
Loading

0 comments on commit 4567342

Please sign in to comment.