Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce set of target ABIs for builds during development. #495

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading