blob: 5ed5770d3c57af03a66f5d4c28fcdacb09c41209 [file] [log] [blame]
/*
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
apply plugin: 'konan'
def libraryName = project.name
def testProgramName = libraryName + "-test"
konanArtifacts {
library(libraryName, targets: ["ios_arm64", "ios_x64", "macos_x64"]) {
artifactName libraryName.replace('-', '_')
enableMultiplatform true
dependencies {
"artifact$libraryName" "org.jetbrains.kotlinx:atomicfu-native:$atomicFU_version"
}
}
// TODO: THIS IS A WORKAROUND: Cannot do tests together with publishing in Kotlin/Native
if (!rootProject.properties["publish"]) {
program(testProgramName, targets: ["macos_x64"]) {
srcDir 'src/test/kotlin'
commonSourceSet 'test'
libraries {
artifact libraryName
}
extraOpts '-tr'
}
}
}
task test(dependsOn: run)
// TODO: THIS IS A WORKAROUND: Cannot do tests together with publishing in Kotlin/Native
if (rootProject.properties["publish"]) {
publishToMavenLocal.dependsOn(build)
}