Skip to content

Commit

Permalink
Upgrade to gl-native 10.19.2, common 23.11.2 and NDK 27 artifacts (#2…
Browse files Browse the repository at this point in the history
…886)
  • Loading branch information
jush authored Dec 13, 2024
1 parent c419546 commit 99aafb6
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 21 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 🏁
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 13 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 10 additions & 5 deletions buildSrc/src/main/kotlin/Project.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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}"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
7 changes: 7 additions & 0 deletions gradle/commonlibs.versions.toml
Original file line number Diff line number Diff line change
@@ -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"
9 changes: 7 additions & 2 deletions gradle/sdk-registry.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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}" {
Expand Down Expand Up @@ -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"))
Expand Down
6 changes: 3 additions & 3 deletions sdk-base/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
import org.jetbrains.dokka.gradle.DokkaTask

plugins {
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion sdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 8 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ pluginManagement {
}
}

dependencyResolutionManagement {
versionCatalogs {
create("commonLibs") {
from(files("gradle/commonlibs.versions.toml"))
}
}
}

include(
":android-auto-app",
":compose-app",
Expand Down

0 comments on commit 99aafb6

Please sign in to comment.