diff --git a/multiplatform-crypto/build.gradle.kts b/multiplatform-crypto/build.gradle.kts index e7749e9..30c12ae 100644 --- a/multiplatform-crypto/build.gradle.kts +++ b/multiplatform-crypto/build.gradle.kts @@ -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 by creating { - dependsOn(commonMain) - } - val nativeTest by creating { - dependsOn(commonTest) - dependencies { - implementation(Deps.Native.coroutines) + 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) diff --git a/multiplatform-crypto/src/jsTest/kotlin/com/ionspin/kotlin/crypto/SRNGJsTest.kt b/multiplatform-crypto/src/jsTest/kotlin/com/ionspin/kotlin/crypto/SRNGJsTest.kt index bfc7588..55981de 100644 --- a/multiplatform-crypto/src/jsTest/kotlin/com/ionspin/kotlin/crypto/SRNGJsTest.kt +++ b/multiplatform-crypto/src/jsTest/kotlin/com/ionspin/kotlin/crypto/SRNGJsTest.kt @@ -24,6 +24,7 @@ import kotlin.test.assertTrue * ugljesa.jovanovic@ionspin.com * on 05-Jan-2020 */ +@ExperimentalUnsignedTypes class SRNGJsTest { @Test