tools: deduplicate cmake arguments

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2023-04-05 13:50:48 +02:00
parent f360034f29
commit 33aded09c6

View File

@ -29,19 +29,25 @@ android {
} }
} }
buildTypes { buildTypes {
release { all {
externalNativeBuild { externalNativeBuild {
cmake { cmake {
targets 'libwg-go.so', 'libwg.so', 'libwg-quick.so' targets 'libwg-go.so', 'libwg.so', 'libwg-quick.so'
arguments "-DANDROID_PACKAGE_NAME=${groupName}", "-DGRADLE_USER_HOME=${project.gradle.gradleUserHomeDir}" arguments "-DGRADLE_USER_HOME=${project.gradle.gradleUserHomeDir}"
}
}
}
release {
externalNativeBuild {
cmake {
arguments "-DANDROID_PACKAGE_NAME=${groupName}"
} }
} }
} }
debug { debug {
externalNativeBuild { externalNativeBuild {
cmake { cmake {
targets 'libwg-go.so', 'libwg.so', 'libwg-quick.so' arguments "-DANDROID_PACKAGE_NAME=${groupName}.debug"
arguments "-DANDROID_PACKAGE_NAME=${groupName}.debug", "-DGRADLE_USER_HOME=${project.gradle.gradleUserHomeDir}"
} }
} }
} }