Limit builds to hosts, bump to 0.0.3

This commit is contained in:
Ugljesa Jovanovic 2020-05-16 23:55:26 +02:00 committed by Ugljesa Jovanovic
parent 2078775119
commit a5fc3c8350
No known key found for this signature in database
GPG Key ID: 178E6DFCECCB0E0F

View File

@ -47,7 +47,7 @@ repositories {
}
group = "com.ionspin.kotlin"
version = "0.0.3-SNAPSHOT"
version = "0.0.3"
val ideaActive = System.getProperty("idea.active") == "true"
@ -68,6 +68,7 @@ kotlin {
"windows" -> mingwX64("native")
}
}
if (hostOsName == "linux") {
jvm()
js {
compilations {
@ -108,6 +109,23 @@ kotlin {
}
}
}
linuxArm32Hfp() {
binaries {
staticLib {
}
}
}
linuxArm64() {
binaries {
staticLib {
}
}
}
}
if (hostOsName == "mac") {
iosX64("ios") {
binaries {
framework {
@ -137,6 +155,8 @@ kotlin {
}
}
}
}
if (hostOsName == "windows") {
mingwX64() {
binaries {
@ -145,6 +165,7 @@ kotlin {
}
}
}
}
// No coroutines support for mingwX86
// mingwX86() {
// binaries {
@ -154,19 +175,6 @@ kotlin {
// }
// }
linuxArm32Hfp() {
binaries {
staticLib {
}
}
}
linuxArm64() {
binaries {
staticLib {
}
}
}
println(targets.names)
@ -185,34 +193,7 @@ kotlin {
implementation(kotlin(Deps.Common.testAnnotation))
}
}
val jvmMain by getting {
dependencies {
implementation(kotlin(Deps.Jvm.stdLib))
implementation(kotlin(Deps.Jvm.test))
implementation(kotlin(Deps.Jvm.testJUnit))
implementation(Deps.Jvm.coroutinesCore)
}
}
val jvmTest by getting {
dependencies {
implementation(kotlin(Deps.Jvm.test))
implementation(kotlin(Deps.Jvm.testJUnit))
implementation(Deps.Jvm.coroutinesTest)
implementation(kotlin(Deps.Jvm.reflection))
}
}
val jsMain by getting {
dependencies {
implementation(kotlin(Deps.Js.stdLib))
implementation(kotlin(Deps.Js.test))
implementation(Deps.Js.coroutines)
}
}
val jsTest by getting {
dependencies {
implementation(kotlin("test-js"))
}
}
val nativeMain = if (ideaActive) {
val nativeMain by getting {
dependsOn(commonMain)
@ -242,6 +223,61 @@ kotlin {
nativeTest
}
if (hostOsName == "linux") {
val jvmMain by getting {
dependencies {
implementation(kotlin(Deps.Jvm.stdLib))
implementation(kotlin(Deps.Jvm.test))
implementation(kotlin(Deps.Jvm.testJUnit))
implementation(Deps.Jvm.coroutinesCore)
}
}
val jvmTest by getting {
dependencies {
implementation(kotlin(Deps.Jvm.test))
implementation(kotlin(Deps.Jvm.testJUnit))
implementation(Deps.Jvm.coroutinesTest)
implementation(kotlin(Deps.Jvm.reflection))
}
}
val jsMain by getting {
dependencies {
implementation(kotlin(Deps.Js.stdLib))
implementation(kotlin(Deps.Js.test))
implementation(Deps.Js.coroutines)
}
}
val jsTest by getting {
dependencies {
implementation(kotlin("test-js"))
}
}
val linuxMain by getting {
dependsOn(nativeMain)
}
val linuxTest by getting {
dependsOn(nativeTest)
}
val linuxArm32HfpMain by getting {
dependsOn(nativeMain)
}
val linuxArm32HfpTest by getting {
dependsOn(nativeTest)
}
val linuxArm64Main by getting {
dependsOn(nativeMain)
}
val linuxArm64Test by getting {
dependsOn(nativeTest)
}
}
if (hostOsName == "mac") {
val iosMain by getting {
dependsOn(nativeMain)
@ -270,12 +306,8 @@ kotlin {
val macosX64Test by getting {
dependsOn(nativeTest)
}
val linuxMain by getting {
dependsOn(nativeMain)
}
val linuxTest by getting {
dependsOn(nativeTest)
}
// Coroutines don't support mingwx86 yet
// val mingwX86Main by getting {
// dependsOn(commonMain)
@ -288,6 +320,7 @@ kotlin {
// dependsOn(commonTest)
// }
//
if (hostOsName == "windows") {
val mingwX64Main by getting {
dependsOn(commonMain)
dependencies {
@ -298,22 +331,9 @@ kotlin {
val mingwX64Test by getting {
dependsOn(commonTest)
}
val linuxArm32HfpMain by getting {
dependsOn(nativeMain)
}
val linuxArm32HfpTest by getting {
dependsOn(nativeTest)
}
val linuxArm64Main by getting {
dependsOn(nativeMain)
}
val linuxArm64Test by getting {
dependsOn(nativeTest)
}
all {
languageSettings.enableLanguageFeature("InlineClasses")
}
@ -355,7 +375,7 @@ tasks {
platforms = listOf("Common")
}
}
if (getHostOsName() == "linux") {
val jvmTest by getting(Test::class) {
testLogging {
events("PASSED", "FAILED", "SKIPPED")
@ -370,14 +390,6 @@ tasks {
}
}
val mingwX64Test by getting(KotlinNativeTest::class) {
testLogging {
events("PASSED", "FAILED", "SKIPPED")
showStandardStreams = true
}
}
val jsNodeTest by getting(KotlinJsTest::class) {
testLogging {
@ -393,6 +405,17 @@ tasks {
// showStandardStreams = true
// }
// }
}
if (getHostOsName() == "windows") {
val mingwX64Test by getting(KotlinNativeTest::class) {
testLogging {
events("PASSED", "FAILED", "SKIPPED")
showStandardStreams = true
}
}
}
}