You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.1 KiB

/*
* Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
project.ext.nativeMainSets = []
project.ext.nativeTestSets = []
kotlin {
targets.metaClass.addTarget = { preset ->
def target = delegate.fromPreset(preset, preset.name)
project.ext.nativeMainSets.add(target.compilations['main'].kotlinSourceSets.first())
project.ext.nativeTestSets.add(target.compilations['test'].kotlinSourceSets.first())
}
targets {
addTarget(presets.linuxX64)
addTarget(presets.iosArm64)
addTarget(presets.iosArm32)
addTarget(presets.iosX64)
addTarget(presets.macosX64)
addTarget(presets.mingwX64)
addTarget(presets.tvosArm64)
addTarget(presets.tvosX64)
addTarget(presets.watchosArm32)
addTarget(presets.watchosArm64)
addTarget(presets.watchosX86)
}
sourceSets {
nativeMain { dependsOn commonMain }
nativeTest { dependsOn commonTest }
configure(nativeMainSets) { dependsOn nativeMain }
configure(nativeTestSets) { dependsOn nativeTest }
}
}