Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release-agua' back to master.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-guerra committed Jan 4, 2018
2 parents 5bfa20d + 187b6dc commit 6fa57b7
Show file tree
Hide file tree
Showing 125 changed files with 3,235 additions and 655 deletions.
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -608,32 +608,32 @@ run-android-unit-test: platform/android/configuration.gradle
run-android-unit-test-%: platform/android/configuration.gradle
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none :MapboxGLAndroidSDK:testDebugUnitTest --tests "$*"

# Run Instrumentation tests on AWS device farm, requires additional authentication through gradle.properties
.PHONY: run-android-ui-test-aws
run-android-ui-test-aws: platform/android/configuration.gradle
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=all devicefarmUpload

# Builds a release package of the Android SDK
.PHONY: apackage
apackage: platform/android/configuration.gradle
make android-lib-arm-v5 && make android-lib-arm-v7 && make android-lib-arm-v8 && make android-lib-x86 && make android-lib-x86-64 && make android-lib-mips
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=all assemble$(BUILDTYPE)

# Build test app instrumentation tests apk and test app apk for all abi's
.PHONY: android-ui-test
android-ui-test: platform/android/configuration.gradle
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=all :MapboxGLAndroidSDKTestApp:assembleDebug :MapboxGLAndroidSDKTestApp:assembleAndroidTest

# 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
android-gfxinfo:
adb shell dumpsys gfxinfo com.mapbox.mapboxsdk.testapp reset

# Runs Android UI tests on all connected devices using Spoon
.PHONY: run-android-ui-test-spoon
run-android-ui-test-spoon: platform/android/configuration.gradle
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis="$(MBGL_ANDROID_ACTIVE_ARCHS)" spoon

# Generates Activity sanity tests
.PHONY: test-code-android
test-code-android:
Expand Down
15 changes: 4 additions & 11 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ jobs:
- run:
name: Run Clang checks
command: make check
no_output_timeout: 20m

# ------------------------------------------------------------------------------
android-debug-arm-v7:
Expand All @@ -256,6 +257,9 @@ jobs:
- *restore-cache
- *restore-gradle-cache
- *reset-ccache-stats
- run:
name: Check code style
command: make android-check
- run:
name: Build libmapbox-gl.so for arm-v7
command: make android-lib-arm-v7
Expand All @@ -268,17 +272,6 @@ jobs:
- run:
name: Generate Espresso sanity tests
command: make test-code-android
- run:
name: Check Java code style
command: make android-checkstyle
- run:
name: Check Android modules for potential bugs (Lint SDK)
command: |
make android-lint-sdk
- run:
name: Check Android modules for potential bugs (Lint Test App)
command: |
make android-lint-test-app
- run:
name: Build Test APK
command: |
Expand Down
44 changes: 43 additions & 1 deletion platform/android/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,49 @@

Mapbox welcomes participation and contributions from everyone. If you'd like to do so please see the [`Contributing Guide`](https://github.com/mapbox/mapbox-gl-native/blob/master/CONTRIBUTING.md) first to get started.

## 5.2.0 - TBA
## 5.3.0 - December 20, 2017
- Add support for TinySDF [#10706](https://github.com/mapbox/mapbox-gl-native/pull/10706)
- Save restore MyLocationViewSettings [#10746](https://github.com/mapbox/mapbox-gl-native/pull/10746)
- Post animation callback invocation [#10664](https://github.com/mapbox/mapbox-gl-native/pull/10664)
- Allow configuring Http logging [#10681](https://github.com/mapbox/mapbox-gl-native/pull/10681)
- Fix reverse scale gesture [#10688](https://github.com/mapbox/mapbox-gl-native/pull/10688)
- Update offline region metadata documentation [#10693](https://github.com/mapbox/mapbox-gl-native/pull/10693)
- Post camera listener invocation [#10690](https://github.com/mapbox/mapbox-gl-native/pull/10690)
- Activate filesource for offline region creation [#10718](https://github.com/mapbox/mapbox-gl-native/pull/10718)
- Update Spanish/Vietnamese translations [#10740](https://github.com/mapbox/mapbox-gl-native/pull/10740)
- Update instrumented make target [#10724](https://github.com/mapbox/mapbox-gl-native/pull/10724)
- Remove black flash on start for fragments [#10717](https://github.com/mapbox/mapbox-gl-native/pull/10717)
- CompassView decode crash [#10717](https://github.com/mapbox/mapbox-gl-native/pull/10717)
- Android SDK renaming [#10609](https://github.com/mapbox/mapbox-gl-native/pull/10609)
- Map touch listener based lists [#10749](https://github.com/mapbox/mapbox-gl-native/pull/10749)

## 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)

## 5.2.0-beta.5 - November 14, 2017

- MapSnapshot attribution [#10362](https://github.com/mapbox/mapbox-gl-native/pull/10362)
- Downgrade min sdk to 14 [#10355](https://github.com/mapbox/mapbox-gl-native/pull/10355)
- Harden deselection mechanism for markers [#10403](https://github.com/mapbox/mapbox-gl-native/pull/10403)
- Cherry picks to agua [#10442](https://github.com/mapbox/mapbox-gl-native/pull/10442)
- Rework test activity gen script setup [#10365](https://github.com/mapbox/mapbox-gl-native/pull/10365)
- Fix broken android unit tests, update test make target to SDK [#10387](https://github.com/mapbox/mapbox-gl-native/pull/10387)
- Check for null value when calling mapboxMap.clear [#10388](https://github.com/mapbox/mapbox-gl-native/pull/10388)

## 5.2.0-beta.4 - November 3, 2017

Expand Down
5 changes: 4 additions & 1 deletion platform/android/MapboxGLAndroidSDK/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies {
testImplementation rootProject.ext.dep.lost
testImplementation rootProject.ext.dep.junit
testImplementation rootProject.ext.dep.mockito
testImplementation rootProject.ext.dep.robolectric
}

android {
Expand Down Expand Up @@ -119,7 +120,9 @@ android {
}

testOptions {
unitTests.returnDefaultValues = true
unitTests{
returnDefaultValues = true
}
}

buildTypes {
Expand Down
74 changes: 29 additions & 45 deletions platform/android/MapboxGLAndroidSDK/gradle-publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,17 @@ repositories {
mavenCentral()
}

// From https://raw.github.com/mcxiaoke/gradle-mvn-push/master/jar.gradle
android.libraryVariants.all { variant ->
def jarTask = project.tasks.create(name: "jar${variant.name.capitalize()}", type: Jar) {
from variant.javaCompile.destinationDir
exclude "**/R.class"
exclude "**/BuildConfig.class"
}
jarTask.dependsOn variant.javaCompile
artifacts.add('archives', jarTask);
}

// 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 @@ -40,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 @@ -50,22 +49,6 @@ def getRepositoryPassword() {
(hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : "")
}

task apklib(type: Zip) {
appendix = extension = 'apklib'

from 'AndroidManifest.xml'
into('res') {
from 'res'
}
into('src') {
from 'src'
}
}

artifacts {
archives apklib
}

afterEvaluate { project ->
uploadArchives {
repositories {
Expand All @@ -76,24 +59,16 @@ afterEvaluate { project ->
pom.artifactId = POM_ARTIFACT_ID
pom.version = VERSION_NAME

repository(url: getReleaseRepositoryUrl()) {
authentication(userName: getRepositoryUsername(),
password: getRepositoryPassword())
}
snapshotRepository(url: getSnapshotRepositoryUrl()) {
authentication(userName: getRepositoryUsername(),
password: getRepositoryPassword())
}

/*
// 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 @@ -151,3 +126,12 @@ afterEvaluate { project ->
archives androidJavadocsJar
}
}

// 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)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mapbox.mapboxsdk">
xmlns:tools="http://schemas.android.com/tools"
package="com.mapbox.mapboxsdk">

<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<uses-feature android:name="android.hardware.wifi" android:required="false" /> <!-- Implied by ACCESS_WIFI_STATE. -->
<uses-feature android:name="android.hardware.location.gps" android:required="false"/>

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

<uses-sdk tools:overrideLibrary="com.mapzen.lost"/>

<application>
<!-- Include the telemetry service to simplify set up (https://www.mapbox.com/telemetry) -->
<service android:name="com.mapbox.services.android.telemetry.service.TelemetryService"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package com.mapbox.mapboxsdk.attribution;

public class Attribution {

private static final String OPENSTREETMAP = "OpenStreetMap";
private static final String OPENSTREETMAP_ABBR = "OSM";
static final String TELEMETRY = "Telemetry Settings";

static final String IMPROVE_MAP_URL = "https://www.mapbox.com/map-feedback/";
static final String MAPBOX_URL = "https://www.mapbox.com/about/maps/";
static final String TELEMETRY_URL = "https://www.mapbox.com/telemetry/";

private String title;
private String url;

Attribution(String title, String url) {
this.title = title;
this.url = url;
}

public String getTitle() {
return title;
}

public String getTitleAbbreviated() {
if (title.equals(OPENSTREETMAP)) {
return OPENSTREETMAP_ABBR;
}
return title;
}

public String getUrl() {
return url;
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}

Attribution that = (Attribution) o;

if (title != null ? !title.equals(that.title) : that.title != null) {
return false;
}
return url != null ? url.equals(that.url) : that.url == null;
}

@Override
public int hashCode() {
int result = title != null ? title.hashCode() : 0;
result = 31 * result + (url != null ? url.hashCode() : 0);
return result;
}
}
Loading

0 comments on commit 6fa57b7

Please sign in to comment.