diff --git a/build.gradle b/build.gradle index 7a96fa4..335ad48 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ buildscript { dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "com.moowork.gradle:gradle-node-plugin:$gradle_node_version" - classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:+" + classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin:$kotlin_native_version" } } diff --git a/gradle.properties b/gradle.properties index 1cc2bcc..7c4bccb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,6 +6,4 @@ npm_version = 5.5.1 kotlin.incremental.multiplatform=true -# Kotlin/Native compiler v0.5 doesn't support mutiplatform projects. -# So we use a dev version which supports them. -konan.version=0.6-dev-822 \ No newline at end of file +kotlin_native_version = 0.6 \ No newline at end of file diff --git a/native/build.gradle b/native/build.gradle index 97a9eb9..c04806c 100644 --- a/native/build.gradle +++ b/native/build.gradle @@ -1,20 +1,22 @@ apply plugin: 'konan' konanArtifacts { - // TODO: commented out due to a failed assertion in the compiler. - //library('native') { - // srcDir 'src/main/kotlin' - // srcDir project(':common').file('src/main/kotlin') - // extraOpts '-Xmulti-platform' - //} + library('native') { + enableMultiplatform true + } program('native-test') { - srcDir 'src/main/kotlin' srcDir 'src/test/kotlin' - srcDir project(':common').file('src/test/kotlin') - srcDir project(':common').file('src/main/kotlin') - extraOpts '-tr', '-Xmulti-platform' + commonSourceSet 'test' + libraries { + artifact 'native' + } + extraOpts '-tr' } } +dependencies { + expectedBy project(':common') +} + task test(dependsOn: run) \ No newline at end of file