Skip to content

Commit 282ec29

Browse files
committed
Update Android Gradle build script for cmake arguments
- Moved `-DCHAPTER` argument from `android.externalNativeBuild.cmake` to `defaultConfig.externalNativeBuild.cmake` for better configuration consistency.
1 parent bbda9a2 commit 282ec29

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

attachments/android/app/build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ android {
1313

1414
// Define which chapter to build (default to 34_android)
1515
buildConfigField "String", "CHAPTER", "\"${project.findProperty('chapter') ?: '34_android'}\""
16+
17+
externalNativeBuild {
18+
cmake {
19+
arguments "-DCHAPTER=${project.findProperty('chapter') ?: '34_android'}"
20+
}
21+
}
1622
}
1723

1824
buildTypes {
@@ -31,7 +37,6 @@ android {
3137
cmake {
3238
path "src/main/cpp/CMakeLists.txt"
3339
version "3.22.1"
34-
arguments "-DCHAPTER=${project.findProperty('chapter') ?: '34_android'}"
3540
}
3641
}
3742

0 commit comments

Comments
 (0)