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