diff --git a/CHANGELOG.md b/CHANGELOG.md index 31aa20b877..f7deb67919 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,11 +3,16 @@ Mapbox welcomes participation and contributions from everyone. # 10.19.0 +## Features ✨ and improvements 🏁 +* Publish Mapbox Maps Android artifacts using NDK 27 and [support for 16 KB page sizes](https://developer.android.com/guide/practices/page-sizes). + * The new artifacts are available by appending `-ndk27` to the artifact ID (for example, `com.mapbox.maps:android-ndk27:10.19.0`). + ## Bug fixes 🐞 * Fix rare `android.content.res.Resources$NotFoundException` happening when creating a `MapView`. +* Fix tile prefetch for GeoJSON sources ## Dependencies -* Update gl-native to v10.19.1 and common to v23.11.0. +* Update gl-native to v10.19.2 and common to v23.11.2. # 10.18.4 September 06, 2024 ## Features ✨ and improvements 🏁 diff --git a/LICENSE.md b/LICENSE.md index 5145f1998d..7b690cb6c6 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -358,7 +358,7 @@ License: [The Apache Software License, Version 2.0](http://www.apache.org/licens =========================================================================== -### MapboxCoreMaps,10.19.0,Mapbox ToS,Mapbox,https://www.mapbox.com/ +### MapboxCoreMaps,10.19.2,Mapbox ToS,Mapbox,https://www.mapbox.com/ ``` Mapbox Core Maps version 10.0 diff --git a/Makefile b/Makefile index 6594def4b5..d930c9f493 100755 --- a/Makefile +++ b/Makefile @@ -13,6 +13,11 @@ sdk-build: ./gradlew assembleRelease -x app:assembleRelease -x android-auto-app:assembleRelease\ -x compose-app:assembleRelease -x extension-style-app:assembleRelease +.PHONY: sdk-build-ndk27 +sdk-build-ndk27: + ./gradlew -PndkMajor=27 assembleRelease -x app:assembleRelease -x android-auto-app:assembleRelease\ + -x compose-app:assembleRelease -x extension-style-app:assembleRelease + # Use `make checkApi TAG=ReleaseTag` to check the release tag or `make checkApi` to check current branch while running locally. # Note: if run locally, execute `mbx env` and `./gradlew assembleRelease` first. .PHONY: checkApi @@ -41,35 +46,35 @@ fix: .PHONY: sdkRegistryUpload sdkRegistryUpload: - ./gradlew mapboxSDKRegistryUpload -x extension-androidauto:mapboxSDKRegistryUpload --no-parallel --no-daemon; + ./gradlew mapboxSDKRegistryUpload -x extension-androidauto:mapboxSDKRegistryUpload --no-parallel --no-daemon $(NDK_MAJOR_PARAM); .PHONY: sdkRegistryPublicReleaseUpload sdkRegistryPublicReleaseUpload: - ./gradlew mapboxSDKRegistryPublicReleaseUpload -x extension-androidauto:mapboxSDKRegistryPublicReleaseUpload --no-parallel --no-daemon; + ./gradlew mapboxSDKRegistryPublicReleaseUpload -x extension-androidauto:mapboxSDKRegistryPublicReleaseUpload --no-parallel --no-daemon $(NDK_MAJOR_PARAM); .PHONY: sdkRegistryPrivateReleaseUpload sdkRegistryPrivateReleaseUpload: - ./gradlew mapboxSDKRegistryPrivateReleaseUpload -x extension-androidauto:mapboxSDKRegistryPrivateReleaseUpload --no-parallel --no-daemon; + ./gradlew mapboxSDKRegistryPrivateReleaseUpload -x extension-androidauto:mapboxSDKRegistryPrivateReleaseUpload --no-parallel --no-daemon $(NDK_MAJOR_PARAM); .PHONY: sdkRegistryPublish sdkRegistryPublish: - ./gradlew mapboxSDKRegistryPublishAll; + ./gradlew mapboxSDKRegistryPublishAll $(NDK_MAJOR_PARAM); .PHONY: sdkRegistryPublicReleasePublish sdkRegistryPublicReleasePublish: - ./gradlew mapboxSDKRegistryPublicReleasePublishAll; + ./gradlew mapboxSDKRegistryPublicReleasePublishAll $(NDK_MAJOR_PARAM); .PHONY: sdkRegistryPrivateReleasePublish sdkRegistryPrivateReleasePublish: - ./gradlew mapboxSDKRegistryPrivateReleasePublishAll; + ./gradlew mapboxSDKRegistryPrivateReleasePublishAll $(NDK_MAJOR_PARAM); .PHONY: sdkRegistryUploadPublicReleaseAndroidAutoExtension sdkRegistryUploadPublicReleaseAndroidAutoExtension: - ./gradlew extension-androidauto:mapboxSDKRegistryPublicReleaseUpload; + ./gradlew extension-androidauto:mapboxSDKRegistryPublicReleaseUpload $(NDK_MAJOR_PARAM); .PHONY: sdkRegistryPublishPublicReleaseAndroidAutoExtension sdkRegistryPublishPublicReleaseAndroidAutoExtension: - ./gradlew extension-androidauto:mapboxSDKRegistryPublicReleasePublish; + ./gradlew extension-androidauto:mapboxSDKRegistryPublicReleasePublish $(NDK_MAJOR_PARAM); .PHONY: clean clean: diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 1ce09238ab..8549a1b4e9 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -3,6 +3,7 @@ plugins { kotlin("android") id("com.mapbox.maps.token") id("io.gitlab.arturbosch.detekt").version(Versions.detekt) + id("com.mapbox.gradle.plugins.ndk") } apply { diff --git a/build.gradle.kts b/build.gradle.kts index 3401be7ba3..3c955a3c7c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -25,6 +25,7 @@ buildscript { classpath(Plugins.mapboxAccessToken) classpath(Plugins.mapboxSdkRegistry) classpath(Plugins.mapboxSdkVersionsPlugin) + classpath(Plugins.mapboxNdkPlugin) classpath(Plugins.pitestPlugin) classpath(Plugins.playPublisher) classpath(Plugins.gradleVersions) diff --git a/buildSrc/src/main/kotlin/Project.kt b/buildSrc/src/main/kotlin/Project.kt index 7f22d6b598..d70d05c99d 100644 --- a/buildSrc/src/main/kotlin/Project.kt +++ b/buildSrc/src/main/kotlin/Project.kt @@ -28,6 +28,7 @@ object Plugins { const val mapboxAccessToken = "com.mapbox.gradle.plugins:access-token:${Versions.mapboxAccessToken}" const val mapboxSdkRegistry = "com.mapbox.gradle.plugins:sdk-registry:${Versions.mapboxSdkRegistry}" const val mapboxSdkVersionsPlugin = "com.mapbox.mapboxsdk:mapbox-android-sdk-versions:${Versions.mapboxSdkVersionsPlugin}" + const val mapboxNdkPlugin = "com.mapbox.gradle.plugins:ndk:${Versions.mapboxNdkPlugin}" const val dokkaId = "org.jetbrains.dokka" const val binaryCompatibilityValidatorId = "org.jetbrains.kotlinx.binary-compatibility-validator" const val taskTreeId = "com.dorongold.task-tree" @@ -37,15 +38,18 @@ object Plugins { const val gradleVersions = "com.github.ben-manes:gradle-versions-plugin:${Versions.gradleVersionsPlugin}" } +object Modules { + const val mapboxGlNative = "com.mapbox.maps:android-core" + const val mapboxCoreCommon = "com.mapbox.common:common" + const val mapboxOkHttp = "com.mapbox.common:okhttp" +} + object Dependencies { const val mapboxBase = "com.mapbox.base:common:${Versions.mapboxBase}" const val mapboxAnnotations = "com.mapbox.base:annotations:${Versions.mapboxBase}" const val mapboxAnnotationsProcessor = "com.mapbox.base:annotations-processor:${Versions.mapboxBase}" const val mapboxJavaGeoJSON = "com.mapbox.mapboxsdk:mapbox-sdk-geojson:${Versions.mapboxJavaServices}" const val mapboxServices = "com.mapbox.mapboxsdk:mapbox-sdk-services:${Versions.mapboxJavaServices}" - const val mapboxGlNative = "com.mapbox.maps:android-core:${Versions.mapboxGlNative}" - const val mapboxCoreCommon = "com.mapbox.common:common:${Versions.mapboxCommon}" - const val mapboxOkHttp = "com.mapbox.common:okhttp:${Versions.mapboxCommon}" const val mapboxJavaTurf = "com.mapbox.mapboxsdk:mapbox-sdk-turf:${Versions.mapboxJavaServices}" const val mapboxGestures = "com.mapbox.mapboxsdk:mapbox-android-gestures:${Versions.mapboxGestures}" const val androidxAppCompat = "androidx.appcompat:appcompat:${Versions.androidxAppcompat}" @@ -114,8 +118,8 @@ object Versions { const val mapboxGestures = "0.9.1" // Required to support compile SDK 30 const val mapboxJavaServices = "5.4.1" const val mapboxBase = "0.8.0" - const val mapboxGlNative = "10.19.1" - const val mapboxCommon = "23.11.0" + const val mapboxGlNative = "10.19.2" + const val mapboxCommon = "23.11.2" const val androidxCore = "1.6.0" // Latest version that supports compile SDK 30 const val androidxFragmentTesting = "1.3.6" // Latest version that supports compile SDK 30 const val androidxAnnotation = "1.1.0" @@ -147,6 +151,7 @@ object Versions { const val equalsVerifier = "3.10.1" const val asyncInflater = "1.0.0" const val mapboxSdkVersionsPlugin = "1.1.3" + const val mapboxNdkPlugin = "0.1.1" const val pitest = "0.2.8" const val detekt = "1.20.0" const val compose = "1.1.0-beta03" diff --git a/gradle/commonlibs.versions.toml b/gradle/commonlibs.versions.toml new file mode 100644 index 0000000000..8b77aad039 --- /dev/null +++ b/gradle/commonlibs.versions.toml @@ -0,0 +1,7 @@ +[versions] + +# Mapbox NDK Gradle Plugin will read these versions to figure out what NDK versions are supported in +# this codebase. +defaultNdkMajor = "21" +ndkMajor21 = "21.4.7075529" +ndkMajor27 = "27.0.12077973" \ No newline at end of file diff --git a/gradle/sdk-registry.gradle b/gradle/sdk-registry.gradle index 96ef148d4c..4414075891 100644 --- a/gradle/sdk-registry.gradle +++ b/gradle/sdk-registry.gradle @@ -6,10 +6,15 @@ version = project.ext.versionName group = project.ext.mapboxArtifactGroupId afterEvaluate { def isSnapshot = project.ext.versionName.contains("-SNAPSHOT") + def ndkMajor = project.findProperty("ndkMajor")?.toString() + def mapboxArtifactId = project.ext.mapboxArtifactId + ((ndkMajor != null) ? "-ndk$ndkMajor" : "") + def mapboxRegistrySdkName = project.ext.mapboxRegistrySdkName + ((ndkMajor != null) ? "-ndk$ndkMajor" : "") + logger.lifecycle("Artifact ID: $mapboxArtifactId") components.findAll { it.name.endsWith("Release") }.forEach { currentComponent -> def flavor = currentComponent.name.substring(0, currentComponent.name.length() - "Release".length()) // Append `-private` if we're publishing a privateRelease variant - def componentRegistrySdkName = project.ext.mapboxRegistrySdkName + (flavor == "private" ? "-private" : "") + def componentRegistrySdkName = mapboxRegistrySdkName + (flavor == "private" ? "-private" : "") + logger.lifecycle("componentRegistrySdkName: $componentRegistrySdkName") registry { registryPublications { "${currentComponent.name}" { @@ -53,7 +58,7 @@ afterEvaluate { "$currentComponent.name"(MavenPublication) { from currentComponent groupId this.group - artifactId project.ext.mapboxArtifactId + artifactId mapboxArtifactId version this.version artifact(tasks.findByName("androidSources${currentComponent.name}Jar")) diff --git a/sdk-base/build.gradle.kts b/sdk-base/build.gradle.kts index e8419f308f..e0d2472a5f 100644 --- a/sdk-base/build.gradle.kts +++ b/sdk-base/build.gradle.kts @@ -1,4 +1,3 @@ -import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties import org.jetbrains.dokka.gradle.DokkaTask plugins { @@ -47,8 +46,9 @@ dependencies { api(project(":maps-core")) api(project(":common")) } else { - api(Dependencies.mapboxGlNative) - api(Dependencies.mapboxCoreCommon) + val ndkMajorSuffix = project.findProperty("ndkMajor")?.toString()?.run { "-ndk$this" } ?: "" + api("${Modules.mapboxGlNative}${ndkMajorSuffix}:${Versions.mapboxGlNative}") + api("${Modules.mapboxCoreCommon}${ndkMajorSuffix}:${Versions.mapboxCommon}") } testImplementation(Dependencies.junit) diff --git a/sdk/build.gradle.kts b/sdk/build.gradle.kts index a42e0f2b18..2c6983479a 100644 --- a/sdk/build.gradle.kts +++ b/sdk/build.gradle.kts @@ -65,7 +65,8 @@ dependencies { if (buildFromSource.toBoolean()) { api(project(":okhttp")) } else { - api(Dependencies.mapboxOkHttp) + val ndkMajorSuffix = project.findProperty("ndkMajor")?.toString()?.run { "-ndk$this" } ?: "" + api("${Modules.mapboxOkHttp}${ndkMajorSuffix}:${Versions.mapboxCommon}") } implementation(Dependencies.mapboxAnnotations) diff --git a/settings.gradle.kts b/settings.gradle.kts index e9cd2531b9..95ba0d2cb4 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -6,6 +6,14 @@ pluginManagement { } } +dependencyResolutionManagement { + versionCatalogs { + create("commonLibs") { + from(files("gradle/commonlibs.versions.toml")) + } + } +} + include( ":android-auto-app", ":compose-app",