Don't run android tasks on mac/windows

This commit is contained in:
Ugljesa Jovanovic 2020-10-07 20:13:14 +02:00
parent 345ddc563e
commit 887c52a319
No known key found for this signature in database
GPG Key ID: 178E6DFCECCB0E0F
2 changed files with 21 additions and 14 deletions

View File

@ -37,6 +37,12 @@ fun getHostArchitecture(): String {
return resolvedArch return resolvedArch
} }
fun rootRunningOnLinuxx86_64(block: () -> Unit) {
if (getHostOsName() == "linux" && getHostArchitecture() == "x86-64") {
block()
}
}
fun KotlinMultiplatformExtension.isRunningInIdea(block: KotlinMultiplatformExtension.() -> Unit) { fun KotlinMultiplatformExtension.isRunningInIdea(block: KotlinMultiplatformExtension.() -> Unit) {
if (isInIdea()) { if (isInIdea()) {
block(this) block(this)

View File

@ -57,7 +57,7 @@ version = ReleaseInfo.version
val ideaActive = isInIdea() val ideaActive = isInIdea()
println("Idea active: $ideaActive") println("Idea active: $ideaActive")
rootRunningOnLinuxx86_64 {
android { android {
compileSdkVersion(29) compileSdkVersion(29)
defaultConfig { defaultConfig {
@ -73,6 +73,7 @@ android {
} }
} }
} }
}
kotlin { kotlin {