secp256k1-kmp/settings.gradle.kts
Fabrice Drouin 6955c7416a
Add option to skip building and testing Android libraries (#33)
* Add otpion to skip building and testing Android libraries

Add `skip.android=true` to the local.properties files at the project's root to skip Android builds.
2021-10-25 14:27:02 +02:00

37 lines
986 B
Plaintext

pluginManagement {
repositories {
google()
gradlePluginPortal()
jcenter()
}
}
rootProject.name = "secp256k1-kmp"
// We use a property defined in `local.properties` to know whether we should build the android application or not.
// For example, iOS developers may want to skip that most of the time.
val skipAndroid = File("$rootDir/local.properties").takeIf { it.exists() }
?.inputStream()?.use { java.util.Properties().apply { load(it) } }
?.run { getProperty("skip.android", "false")?.toBoolean() }
?: false
// Use system properties to inject the property in other gradle build files.
System.setProperty("includeAndroid", (!skipAndroid).toString())
include(
":native",
":jni",
":jni:jvm",
":jni:jvm:darwin",
":jni:jvm:linux",
":jni:jvm:mingw",
":jni:jvm:all",
":tests"
)
if (!skipAndroid) {
print("building android library")
include(":jni:android")
} else {
print("skipping android build")
}