Add plumbing for changing the CMake version.

The value I've set here is no different from the default, but soon it
will be (hopefully), and this makes it easier to test a newer CMake.
This commit is contained in:
Dan Albert
2024-09-11 12:18:40 -07:00
committed by Dan Albert
parent 121154b5a4
commit bc535eeaf5
3 changed files with 15 additions and 0 deletions

View File

@@ -16,6 +16,13 @@ class AndroidApplicationConventionPlugin : Plugin<Project> {
extensions.configure<ApplicationExtension> { extensions.configure<ApplicationExtension> {
compileSdk = Versions.COMPILE_SDK compileSdk = Versions.COMPILE_SDK
ndkVersion = Versions.NDK ndkVersion = Versions.NDK
externalNativeBuild {
cmake {
version = Versions.CMAKE
}
}
defaultConfig { defaultConfig {
minSdk = Versions.MIN_SDK minSdk = Versions.MIN_SDK
targetSdk = Versions.TARGET_SDK targetSdk = Versions.TARGET_SDK

View File

@@ -15,6 +15,13 @@ class AndroidLibraryConventionPlugin : Plugin<Project> {
extensions.configure<LibraryExtension> { extensions.configure<LibraryExtension> {
compileSdk = Versions.COMPILE_SDK compileSdk = Versions.COMPILE_SDK
ndkVersion = Versions.NDK ndkVersion = Versions.NDK
externalNativeBuild {
cmake {
version = Versions.CMAKE
}
}
defaultConfig { defaultConfig {
minSdk = Versions.MIN_SDK minSdk = Versions.MIN_SDK
lint { lint {

View File

@@ -7,5 +7,6 @@ object Versions {
const val TARGET_SDK = 34 const val TARGET_SDK = 34
const val MIN_SDK = 21 const val MIN_SDK = 21
const val NDK = "27.1.12297006" // r27b const val NDK = "27.1.12297006" // r27b
const val CMAKE = "3.22.1"
val JAVA = JavaVersion.VERSION_1_8 val JAVA = JavaVersion.VERSION_1_8
} }