From 5cd4c55ce868046b1edede39af508993ca2e6a0e Mon Sep 17 00:00:00 2001 From: dzmitryfomchyn Date: Fri, 29 Aug 2025 01:08:47 +0200 Subject: [PATCH 1/3] Support NDK 27 --- .circleci/config.yml | 1 - Makefile | 7 +++++-- changelog/unreleased/features/7917.md | 1 + gradle/dependencies.gradle | 24 +++++++++++++++--------- gradle/publish.gradle | 12 ++++++++++-- 5 files changed, 31 insertions(+), 14 deletions(-) create mode 100644 changelog/unreleased/features/7917.md diff --git a/.circleci/config.yml b/.circleci/config.yml index 41ecf2594fc..d33fae31242 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -597,7 +597,6 @@ commands: command: | gcloud firebase test android run --type robo \ --app << parameters.module_target >>/build/outputs/apk/<< parameters.variant >>/<< parameters.module_target >>-<< parameters.variant >>.apk \ - --device model=hwALE-H,version=21,locale=es,orientation=portrait \ --device model=hammerhead,version=23,locale=fr,orientation=portrait \ --device model=q2q,version=31,locale=de,orientation=landscape \ --device model=panther,version=33,locale=it,orientation=landscape \ diff --git a/Makefile b/Makefile index b329ff6af78..9f7ae572228 100644 --- a/Makefile +++ b/Makefile @@ -176,14 +176,17 @@ ui-unit-tests-release-jacoco: .PHONY: publish-local publish-local: ./gradlew publishToMavenLocal + ./gradlew publishToMavenLocal -x libnavui-androidauto:mapboxSDKRegistryUpload -PndkMajor=27 .PHONY: upload-to-sdk-registry-snapshot upload-to-sdk-registry-snapshot: - ./gradlew mapboxSDKRegistryUpload -Psnapshot=true; + ./gradlew mapboxSDKRegistryUpload -Psnapshot=true + ./gradlew mapboxSDKRegistryUpload -x libnavui-androidauto:mapboxSDKRegistryUpload -Psnapshot=true -PndkMajor=27 .PHONY: upload-to-sdk-registry upload-to-sdk-registry: - ./gradlew mapboxSDKRegistryUpload -x libnavui-androidauto:mapboxSDKRegistryUpload; + ./gradlew mapboxSDKRegistryUpload -x libnavui-androidauto:mapboxSDKRegistryUpload + ./gradlew mapboxSDKRegistryUpload -x libnavui-androidauto:mapboxSDKRegistryUpload -PndkMajor=27 .PHONY: publish-to-sdk-registry publish-to-sdk-registry: diff --git a/changelog/unreleased/features/7917.md b/changelog/unreleased/features/7917.md new file mode 100644 index 00000000000..a176c89bddc --- /dev/null +++ b/changelog/unreleased/features/7917.md @@ -0,0 +1 @@ +- Added support for Android 16 KB page-size devices. To consume SDK compatible with NDK 27 you need to add `-ndk27` suffix to the artifact name, for example, `com.mapbox.navigation:android` -> `com.mapbox.navigation:android-ndk27` diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 2dba030c87d..77b2bad58d8 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -1,6 +1,12 @@ ext { def kotlinVersion = "1.5.31" + def ndkVersionSuffix = "" + if (project.hasProperty("ndkMajor")) { + ndkVersionSuffix = "-ndk${project.property("ndkMajor")}" + println("Building with NDK version suffix: " + ndkVersionSuffix) + } + androidVersions = [ minSdkVersion : 21, targetSdkVersion : 34, @@ -13,7 +19,7 @@ ext { // version which we should use in this build def mapboxNavigatorVersion = System.getenv("FORCE_MAPBOX_NAVIGATION_NATIVE_VERSION") if (mapboxNavigatorVersion == null || mapboxNavigatorVersion == '') { - mapboxNavigatorVersion = '206.0.0' + mapboxNavigatorVersion = '207.0.0' } println("Navigation Native version: " + mapboxNavigatorVersion) def androidXWorkManagerVersion = project.hasProperty('WORK_MANAGER_VERSION') ? project.property('WORK_MANAGER_VERSION') : '2.7.0' @@ -22,10 +28,10 @@ ext { println("AndroidX Lifecycle version: " + androidXLifecycleVersion) version = [ - mapboxMapSdk : '10.18.3', + mapboxMapSdk : '10.19.0', mapboxSdkServices : '7.1.0', mapboxNavigator : "${mapboxNavigatorVersion}", - mapboxCommonNative : '23.10.1', + mapboxCommonNative : '23.11.4', mapboxCrashMonitor : '2.0.0', mapboxAnnotationPlugin : '0.8.0', mapboxBaseAndroid : '0.8.0', @@ -73,15 +79,15 @@ ext { ] dependenciesList = [ // mapbox - mapboxMapSdk : "com.mapbox.maps:android:${version.mapboxMapSdk}", + mapboxMapSdk : "com.mapbox.maps:android$ndkVersionSuffix:${version.mapboxMapSdk}", mapboxSdkServices : "com.mapbox.mapboxsdk:mapbox-sdk-services:${version.mapboxSdkServices}", mapboxSdkServicesCore : "com.mapbox.mapboxsdk:mapbox-sdk-core:${version.mapboxSdkServices}", mapboxSdkGeoJSON : "com.mapbox.mapboxsdk:mapbox-sdk-geojson:${version.mapboxSdkServices}", mapboxSdkTurf : "com.mapbox.mapboxsdk:mapbox-sdk-turf:${version.mapboxSdkServices}", mapboxSdkDirectionsModels : "com.mapbox.mapboxsdk:mapbox-sdk-directions-models:${version.mapboxSdkServices}", mapboxSdkRefreshModels : "com.mapbox.mapboxsdk:mapbox-sdk-directions-refresh-models:${version.mapboxSdkServices}", - mapboxNavigator : "com.mapbox.navigator:mapbox-navigation-native:${version.mapboxNavigator}", - mapboxCommonNative : "com.mapbox.common:common:${version.mapboxCommonNative}", + mapboxNavigator : "com.mapbox.navigator:mapbox-navigation-native$ndkVersionSuffix:${version.mapboxNavigator}", + mapboxCommonNative : "com.mapbox.common:common$ndkVersionSuffix:${version.mapboxCommonNative}", mapboxMapsAndroidAuto : "com.mapbox.extension:maps-androidauto:${version.mapboxMapsAndroidAuto}", mapboxSearchAndroidAuto : "com.mapbox.search:mapbox-search-android:${version.mapboxSearchAndroidAuto}", @@ -89,7 +95,7 @@ ext { * explicitly define Mapbox OkHttp dependency so that we are sure it's in sync with the Common SDK version we define * and we're not relying on Mapbox OKHttp coming in transitively */ - mapboxCommonOkHttp : "com.mapbox.common:okhttp:${version.mapboxCommonNative}", + mapboxCommonOkHttp : "com.mapbox.common:okhttp$ndkVersionSuffix:${version.mapboxCommonNative}", mapboxAnnotationPlugin : "com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:${version.mapboxAnnotationPlugin}", mapboxCrashMonitor : "com.mapbox.crashmonitor:mapbox-crash-monitor-native:${version.mapboxCrashMonitor}", mapboxAnnotations : "com.mapbox.base:annotations:${version.mapboxBaseAndroid}", @@ -190,12 +196,12 @@ ext { // Used by license. Add this dependency explicitly, // because the version used by license has been removed from the repository. // This dependency may be removed when we bump license version. - kotlinHtmlJvm : '0.7.2', + kotlinHtmlJvm : '0.7.3', jacoco : '0.2', googleServices : '4.3.3', mapboxSdkVersions : '1.1.3', dokka : '1.6.21', - mapboxSdkRegistry : '0.7.0', + mapboxSdkRegistry : '1.4.1', mapboxAccessToken : '0.2.1', mapboxNativeDownload : '0.2.2', firebaseCrashlytics : '2.5.1' diff --git a/gradle/publish.gradle b/gradle/publish.gradle index 1091848257f..0a8d441a65a 100644 --- a/gradle/publish.gradle +++ b/gradle/publish.gradle @@ -3,13 +3,20 @@ apply plugin: 'com.mapbox.sdkRegistry' apply from: file("../gradle/artifact-settings.gradle") apply from: "../gradle/kdoc-settings.gradle" +def artifactName = "" +if (project.hasProperty("ndkMajor")) { + artifactName = "${project.ext.mapboxArtifactId}-ndk${project.property("ndkMajor")}" +} else { + artifactName = "${project.ext.mapboxArtifactId}" +} + afterEvaluate { publishing { publications { release(MavenPublication) { from components.release groupId project.ext.mapboxArtifactGroupId - artifactId project.ext.mapboxArtifactId + artifactId artifactName version project.ext.versionName artifact(androidSourcesJar) @@ -39,7 +46,7 @@ afterEvaluate { debug(MavenPublication) { from components.debug groupId project.ext.mapboxArtifactGroupId - artifactId project.ext.mapboxArtifactId + artifactId artifactName version project.ext.versionName artifact(androidSourcesJar) @@ -82,6 +89,7 @@ registry { publish = true publishMessage = "cc @mapbox/navigation-android" publications = ["release"] + additionalPackageSuffixes = ["-ndk27"] } task androidSourcesJar(type: Jar) { From b004ca78f948a1fa4b42c93ea14e0aef45a58e83 Mon Sep 17 00:00:00 2001 From: dzmitryfomchyn Date: Fri, 29 Aug 2025 15:34:27 +0200 Subject: [PATCH 2/3] Run androidauto tests of Firebase --- .circleci/config.yml | 49 ++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d33fae31242..5078775805a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -92,6 +92,7 @@ workflows: - assemble-old-deps-compat - assemble-instrumentation-test - assemble-instrumentation-test-internal + - assemble-androidauto-test - assemble-app-mincompile - changelog-verification: filters: @@ -159,7 +160,9 @@ workflows: suite: TestSuitePart6 requires: - assemble-instrumentation-test - - androidauto-test + - androidauto-test: + requires: + - assemble-androidauto-test - mobile-metrics-dry-run: type: approval - mobile-metrics-benchmarks: @@ -815,6 +818,20 @@ jobs: module_target: "libnavigator" - write-workspace + assemble-androidauto-test: + executor: ndk-r22-latest-executor + resource_class: medium+ + steps: + - checkout + - restore-gradle-cache + - assemble-module: + module_target: "app-tests-wrapper" + variant: "Debug" + - assemble-instrumentation-test: + module_target: "libnavui-androidauto" + inject_token: false + - write-workspace + unit-tests-core: executor: ndk-r22-latest-executor resource_class: medium+ @@ -1080,10 +1097,11 @@ jobs: command: python3 scripts/validate_billing_e2e_sessions.py androidauto-test: - executor: - name: android/android-machine - resource-class: xlarge - tag: default + executor: ndk-r22-latest-executor + environment: + JVM_OPTS: -Xmx3200m + BUILDTYPE: Debug + GRADLE_OPTS: -Xmx4096m -Dorg.gradle.daemon=false -Dkotlin.compiler.execution.strategy=in-process steps: - when: condition: @@ -1092,21 +1110,12 @@ jobs: pattern: "^add-changelog.*" value: << pipeline.git.branch >> steps: - - checkout - - android/start-emulator-and-run-tests: - post-emulator-launch-assemble-command: ./gradlew libnavui-androidauto:assembleDebugAndroidTest -Dorg.gradle.jvmargs=-Xmx3g - test-command: ./gradlew libnavui-androidauto:connectedDebugAndroidTest -Dorg.gradle.jvmargs=-Xmx3g - system-image: system-images;android-30;google_apis_playstore;x86 - wait-for-emulator: false - save-gradle-cache: false - - run: - name: Save test results - command: | - mkdir -p ~/mapbox_test/ - adb pull sdcard/Download/mapbox_test ~/mapbox_test/ - when: on_fail - - store_artifacts: - path: ~/mapbox_test/ + - read-workspace + - login-google-cloud-platform + - run-internal-firebase-instrumentation: + module_target: "libnavui-androidauto" + module_wrapper: "app-tests-wrapper" + variant: "debug" - run: exit 0 mobile-metrics-benchmarks: From 28d6608c15e0b282e5cf6ed3a9d34b316377af6d Mon Sep 17 00:00:00 2001 From: dzmitryfomchyn Date: Fri, 29 Aug 2025 16:47:14 +0200 Subject: [PATCH 3/3] Update firebase devices --- .circleci/config.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5078775805a..ca7a0dcdee8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -555,8 +555,7 @@ commands: gcloud firebase test android run --type instrumentation \ --app << parameters.module_wrapper >>/build/outputs/apk/<< parameters.variant >>/<< parameters.module_wrapper >>-<< parameters.variant >>.apk \ --test << parameters.module_target >>/build/outputs/apk/androidTest/<< parameters.variant >>/<< parameters.module_target >>-<< parameters.variant >>-androidTest.apk \ - --device model=hammerhead,version=23,locale=fr,orientation=portrait \ - --device model=q2q,version=31,locale=de,orientation=landscape \ + --device model=oriole,version=31,locale=de,orientation=landscape \ --device model=panther,version=33,locale=it,orientation=landscape \ --use-orchestrator \ --timeout 10m @@ -578,8 +577,7 @@ commands: --app instrumentation-tests/build/outputs/apk/<< parameters.variant >>/instrumentation-tests-<< parameters.variant >>.apk \ --test instrumentation-tests/build/outputs/apk/androidTest/<< parameters.variant >>/instrumentation-tests-<< parameters.variant >>-androidTest.apk \ --test-targets "class com.mapbox.navigation.instrumentation_tests.<< parameters.suite >>" \ - --device model=hammerhead,version=23,locale=fr,orientation=portrait \ - --device model=q2q,version=31,locale=de,orientation=landscape \ + --device model=oriole,version=31,locale=de,orientation=landscape \ --device model=panther,version=33,locale=it,orientation=landscape \ --use-orchestrator \ --directories-to-pull=/sdcard/Download/mapbox_test \ @@ -600,8 +598,7 @@ commands: command: | gcloud firebase test android run --type robo \ --app << parameters.module_target >>/build/outputs/apk/<< parameters.variant >>/<< parameters.module_target >>-<< parameters.variant >>.apk \ - --device model=hammerhead,version=23,locale=fr,orientation=portrait \ - --device model=q2q,version=31,locale=de,orientation=landscape \ + --device model=oriole,version=31,locale=de,orientation=landscape \ --device model=panther,version=33,locale=it,orientation=landscape \ --timeout 5m