Skip to content

Commit

Permalink
Reduce set of target ABIs for builds during development.
Browse files Browse the repository at this point in the history
Signed-off-by: Kenneth J. Shackleton <[email protected]>
  • Loading branch information
kennethshackleton committed Feb 4, 2024
1 parent 8aacabe commit 7615110
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions selekt-android-sqlcipher/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,27 @@ repositories {
google()
}

val developmentABIs = listOf("arm64-v8a")
val allABIs = listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")

android {
compileSdk = Versions.ANDROID_SDK.version.toInt()
buildToolsVersion = Versions.ANDROID_BUILD_TOOLS.version
namespace = "com.bloomberg.selekt.android.sqlcipher"
ndkVersion = Versions.ANDROID_NDK.version
defaultConfig {
minSdk = 21
ndk {
abiFilters.addAll(listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64"))
}
buildTypes {
debug {
ndk {
abiFilters.addAll(developmentABIs)
}
}
release {
ndk {
abiFilters.addAll(allABIs)
}
}
}
externalNativeBuild {
Expand All @@ -52,8 +64,13 @@ android {
}
}

tasks.withType<ExternalNativeBuildJsonTask>().configureEach {
dependsOn(":OpenSSL:assembleAndroid", ":selekt-sqlite3:amalgamate")
allABIs.forEach { abi ->
tasks.matching {
it is ExternalNativeBuildJsonTask && it.name.contains(abi)
}.configureEach {
val titleCaseName = abi.replaceFirstChar { c -> c.uppercaseChar() }
dependsOn(":OpenSSL:assemble$titleCaseName", ":selekt-sqlite3:amalgamate")
}
}

components.matching { "release" == it.name }.configureEach {
Expand Down

0 comments on commit 7615110

Please sign in to comment.