Skip to content

Commit 5603c38

Browse files
Support NDK 27
1 parent 8eb10f1 commit 5603c38

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

DemoApps/SearchWithMaps/app/build.gradle

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ if (mapboxApiToken == null) {
1010

1111
android {
1212
namespace 'com.mapbox.demo.searchwithmaps'
13-
compileSdk 33
13+
compileSdk 36
1414

1515
defaultConfig {
1616
resValue "string", "mapbox_access_token", mapboxApiToken
1717

1818
applicationId "com.mapbox.demo.searchwithmaps"
19-
minSdk 21
20-
targetSdk 33
19+
minSdk 24
20+
targetSdk 36
2121
versionCode 1
2222
versionName "1.0"
2323

@@ -39,9 +39,16 @@ android {
3939
}
4040
}
4141

42+
def ndkVersionSuffix = ""
43+
if (project.hasProperty("ndkMajor")) {
44+
ndkVersionSuffix = "-ndk${project.property("ndkMajor")}"
45+
println("Building with NDK version suffix: " + ndkVersionSuffix)
46+
}
47+
4248
dependencies {
43-
implementation "com.mapbox.search:mapbox-search-android-ui:2.15.0-rc.1"
44-
implementation "com.mapbox.maps:android:11.15.0-rc.1"
49+
implementation "com.mapbox.search:mapbox-search-android-ui$ndkVersionSuffix:2.14.0"
50+
implementation "com.mapbox.maps:android$ndkVersionSuffix:11.14.0"
51+
implementation "com.mapbox.navigationcore:android$ndkVersionSuffix:3.11.0"
4552

4653
implementation 'androidx.core:core-ktx:1.6.0'
4754
implementation 'androidx.appcompat:appcompat:1.6.1'
@@ -52,3 +59,14 @@ dependencies {
5259
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
5360
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
5461
}
62+
63+
android.applicationVariants.all { variant ->
64+
variant.outputs.all { output ->
65+
def baseName = outputFileName.replace(".apk", "")
66+
outputFileName = "$baseName${ndkVersionSuffix}.apk"
67+
}
68+
}
69+
70+
configurations.all {
71+
exclude group: "com.google.errorprone", module: "error_prone_annotations"
72+
}

0 commit comments

Comments
 (0)