blob: 6de11bba6a48d3d84a76504ec68855686ff8f21c [file] [log] [blame]
Roman Elizarov31452902018-04-11 13:58:19 +03001apply plugin: 'konan'
2
3repositories {
4 jcenter()
5 maven { url "https://kotlin.bintray.com/kotlinx" }
6}
7
8def libraryName = project.name
9def testProgramName = libraryName + "-test"
10
11konanArtifacts {
12 library(libraryName, targets: ["ios_arm64", "ios_x64", "macos_x64"]) {
13 artifactName libraryName.replace('-', '_')
14 enableMultiplatform true
15 dependencies {
16 "artifact$libraryName" "org.jetbrains.kotlinx:atomicfu-native:$atomicFU_version"
17 }
18 }
19 // TODO: THIS IS A WORKAROUND: Cannot do tests together with publishing in Kotlin/Native
20 if (!rootProject.properties["publish"]) {
21 program(testProgramName, targets: ["macos_x64"]) {
22 srcDir 'src/test/kotlin'
23 commonSourceSet 'test'
24 libraries {
25 artifact libraryName
26 }
27 extraOpts '-tr'
28 }
29 }
30}
31
32task test(dependsOn: run)
33
34// TODO: THIS IS A WORKAROUND: Cannot do tests together with publishing in Kotlin/Native
35if (rootProject.properties["publish"]) {
36 publishToMavenLocal.dependsOn(build)
37}