Skip to content

Commit 8f1e111

Browse files
Support demo with NDK 27 build (#362)
1 parent 412eb19 commit 8f1e111

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

DemoApps/SearchWithMaps/app/build.gradle

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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-ndk27:1.5.0-SNAPSHOT"
44-
implementation "com.mapbox.maps:android-ndk27:10.19.0"
49+
implementation "com.mapbox.search:mapbox-search-android-ui$ndkVersionSuffix:1.5.0"
50+
implementation "com.mapbox.maps:android$ndkVersionSuffix:10.19.0"
51+
implementation "com.mapbox.navigation:android$ndkVersionSuffix:2.21.0"
4552

4653
implementation 'androidx.core:core-ktx:1.10.1'
4754
implementation 'androidx.appcompat:appcompat:1.6.1'
@@ -51,3 +58,10 @@ dependencies {
5158
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
5259
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
5360
}
61+
62+
android.applicationVariants.all { variant ->
63+
variant.outputs.all { output ->
64+
def baseName = outputFileName.replace(".apk", "")
65+
outputFileName = "$baseName${ndkVersionSuffix}.apk"
66+
}
67+
}

0 commit comments

Comments
 (0)