Fix Gradle Integration Tests Native Mac x64

This commit is contained in:
Alexander Dudinsky
2021-09-15 17:02:18 +03:00
committed by Space
parent 85f985b9d1
commit c4a9d7b74d
3 changed files with 28 additions and 3 deletions
@@ -150,7 +150,7 @@ class NativePlatformLibsIT : BaseGradleIT() {
deleteInstalledCompilers() deleteInstalledCompilers()
val unsupportedTarget = when { val unsupportedTarget = when {
HostManager.hostIsMac -> KonanTarget.MINGW_X64 HostManager.hostIsMac -> KonanTarget.LINUX_MIPSEL32
else -> KonanTarget.IOS_X64 else -> KonanTarget.IOS_X64
} }
@@ -208,7 +208,7 @@ class NativePlatformLibsIT : BaseGradleIT() {
assertSuccessful() assertSuccessful()
assertContains("Warning: Project property 'kotlin.native.restrictedDistribution' is deprecated. Please use 'kotlin.native.distribution.type=light' instead") assertContains("Warning: Project property 'kotlin.native.restrictedDistribution' is deprecated. Please use 'kotlin.native.distribution.type=light' instead")
val osName = simpleOsName(currentCompilerVersion) val osName = simpleOsName(CompilerVersion.fromString(oldCompilerVersion))
val regex = "Kotlin/Native distribution: .*kotlin-native-restricted-$osName".toRegex() val regex = "Kotlin/Native distribution: .*kotlin-native-restricted-$osName".toRegex()
// Restricted distribution is available for Mac hosts only. // Restricted distribution is available for Mac hosts only.
if (HostManager.hostIsMac) { if (HostManager.hostIsMac) {
@@ -2,12 +2,25 @@ plugins {
kotlin("multiplatform") kotlin("multiplatform")
} }
repositories {
mavenLocal()
mavenCentral()
}
kotlin { kotlin {
jvm() jvm()
ios() ios()
watchos() watchos()
tvos() tvos()
macos { iosSimulatorArm64()
tvosSimulatorArm64()
watchosSimulatorArm64()
macosX64 {
binaries.executable {
entryPoint = "main"
}
}
macosArm64 {
binaries.executable { binaries.executable {
entryPoint = "main" entryPoint = "main"
} }
@@ -15,6 +28,16 @@ kotlin {
val commonTest by sourceSets.getting val commonTest by sourceSets.getting
val jvmTest by sourceSets.getting val jvmTest by sourceSets.getting
val macosMain by sourceSets.creating
val iosMain by sourceSets.getting
val tvosMain by sourceSets.getting
val watchosMain by sourceSets.getting
val macosX64Main by sourceSets.getting { dependsOn(macosMain) }
val macosArm64Main by sourceSets.getting { dependsOn(macosMain) }
val iosSimulatorArm64Main by sourceSets.getting { dependsOn(iosMain) }
val tvosSimulatorArm64Main by sourceSets.getting { dependsOn(tvosMain) }
val watchosSimulatorArm64Main by sourceSets.getting { dependsOn(watchosMain) }
commonTest.dependencies { commonTest.dependencies {
implementation(kotlin("test-common")) implementation(kotlin("test-common"))
@@ -33,6 +33,8 @@ kotlin {
// We use this library in the cinterop test which includes a Windows x86 target. // We use this library in the cinterop test which includes a Windows x86 target.
fromPreset(presets.mingwX86, 'mingw86') fromPreset(presets.mingwX86, 'mingw86')
fromPreset(presets.linuxMipsel32, 'linuxMipsel32')
// Check the DSL constructs in the Groovy DSL: // Check the DSL constructs in the Groovy DSL:
fromPreset(presets.jvm, 'jvm6') { fromPreset(presets.jvm, 'jvm6') {
println "Configuring $targetName" println "Configuring $targetName"