Skip to content

Commit

Permalink
Merge pull request #495 from kennethshackleton/reduce-dev-build
Browse files Browse the repository at this point in the history
Reduce set of target ABIs for builds during development.
  • Loading branch information
kennethshackleton authored Feb 4, 2024
2 parents 8aacabe + e3f89b3 commit 465c4f5
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 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,12 @@ android {
}
}

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

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

0 comments on commit 465c4f5

Please sign in to comment.