A kludgy way to get the native to properly compile when in intellij IDE
This commit is contained in:
parent
cb7ca575ab
commit
84799b4ede
@ -49,7 +49,12 @@ repositories {
|
|||||||
group = "com.ionspin.kotlin"
|
group = "com.ionspin.kotlin"
|
||||||
version = "0.0.3-SNAPSHOT"
|
version = "0.0.3-SNAPSHOT"
|
||||||
|
|
||||||
|
val ideaActive = System.getProperty("idea.active") == "true"
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
|
if (ideaActive) {
|
||||||
|
linuxX64("native")
|
||||||
|
}
|
||||||
jvm()
|
jvm()
|
||||||
js {
|
js {
|
||||||
compilations {
|
compilations {
|
||||||
@ -194,15 +199,35 @@ kotlin {
|
|||||||
implementation(kotlin("test-js"))
|
implementation(kotlin("test-js"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val nativeMain by creating {
|
val nativeMain = if (ideaActive) {
|
||||||
dependsOn(commonMain)
|
val nativeMain by getting {
|
||||||
}
|
dependsOn(commonMain)
|
||||||
val nativeTest by creating {
|
|
||||||
dependsOn(commonTest)
|
|
||||||
dependencies {
|
|
||||||
implementation(Deps.Native.coroutines)
|
|
||||||
}
|
}
|
||||||
|
nativeMain
|
||||||
|
} else {
|
||||||
|
val nativeMain by creating {
|
||||||
|
dependsOn(commonMain)
|
||||||
|
}
|
||||||
|
nativeMain
|
||||||
}
|
}
|
||||||
|
val nativeTest = if (ideaActive) {
|
||||||
|
val nativeTest by getting {
|
||||||
|
dependsOn(commonTest)
|
||||||
|
dependencies {
|
||||||
|
implementation(Deps.Native.coroutines)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
nativeTest
|
||||||
|
} else {
|
||||||
|
val nativeTest by creating {
|
||||||
|
dependsOn(commonTest)
|
||||||
|
dependencies {
|
||||||
|
implementation(Deps.Native.coroutines)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
nativeTest
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
val iosMain by getting {
|
val iosMain by getting {
|
||||||
dependsOn(nativeMain)
|
dependsOn(nativeMain)
|
||||||
|
@ -24,6 +24,7 @@ import kotlin.test.assertTrue
|
|||||||
* ugljesa.jovanovic@ionspin.com
|
* ugljesa.jovanovic@ionspin.com
|
||||||
* on 05-Jan-2020
|
* on 05-Jan-2020
|
||||||
*/
|
*/
|
||||||
|
@ExperimentalUnsignedTypes
|
||||||
class SRNGJsTest {
|
class SRNGJsTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user