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"
|
||||
version = "0.0.3-SNAPSHOT"
|
||||
|
||||
val ideaActive = System.getProperty("idea.active") == "true"
|
||||
|
||||
kotlin {
|
||||
if (ideaActive) {
|
||||
linuxX64("native")
|
||||
}
|
||||
jvm()
|
||||
js {
|
||||
compilations {
|
||||
@ -194,15 +199,35 @@ kotlin {
|
||||
implementation(kotlin("test-js"))
|
||||
}
|
||||
}
|
||||
val nativeMain = if (ideaActive) {
|
||||
val nativeMain by getting {
|
||||
dependsOn(commonMain)
|
||||
}
|
||||
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 {
|
||||
dependsOn(nativeMain)
|
||||
|
@ -24,6 +24,7 @@ import kotlin.test.assertTrue
|
||||
* ugljesa.jovanovic@ionspin.com
|
||||
* on 05-Jan-2020
|
||||
*/
|
||||
@ExperimentalUnsignedTypes
|
||||
class SRNGJsTest {
|
||||
|
||||
@Test
|
||||
|
Loading…
x
Reference in New Issue
Block a user