Solve mac builds for tvos and watchos failing because they wanted some common imaginary common/metadata klib again
This commit is contained in:
parent
b70521369c
commit
66efe1b40c
@ -120,7 +120,6 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
iosArm32() {
|
iosArm32() {
|
||||||
binaries {
|
binaries {
|
||||||
framework {
|
framework {
|
||||||
@ -128,6 +127,7 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
macosX64() {
|
macosX64() {
|
||||||
binaries {
|
binaries {
|
||||||
framework {
|
framework {
|
||||||
@ -136,7 +136,7 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tvos() {
|
tvosX64() {
|
||||||
binaries {
|
binaries {
|
||||||
framework {
|
framework {
|
||||||
optimized = true
|
optimized = true
|
||||||
@ -144,7 +144,31 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
watchos() {
|
tvosArm64() {
|
||||||
|
binaries {
|
||||||
|
framework {
|
||||||
|
optimized = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
watchosArm64() {
|
||||||
|
binaries {
|
||||||
|
framework {
|
||||||
|
optimized = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
watchosArm32() {
|
||||||
|
binaries {
|
||||||
|
framework {
|
||||||
|
optimized = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
watchosX86() {
|
||||||
binaries {
|
binaries {
|
||||||
framework {
|
framework {
|
||||||
optimized = true
|
optimized = true
|
||||||
@ -218,6 +242,30 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
runningOnMacos {
|
||||||
|
val tvosX64Main by getting {
|
||||||
|
dependsOn(commonMain)
|
||||||
|
}
|
||||||
|
|
||||||
|
val tvosArm64Main by getting {
|
||||||
|
dependsOn(commonMain)
|
||||||
|
}
|
||||||
|
|
||||||
|
val watchosX86Main by getting {
|
||||||
|
dependsOn(commonMain)
|
||||||
|
}
|
||||||
|
|
||||||
|
val watchosArm64Main by getting {
|
||||||
|
dependsOn(commonMain)
|
||||||
|
}
|
||||||
|
|
||||||
|
val watchosArm32Main by getting {
|
||||||
|
dependsOn(commonMain)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
all {
|
all {
|
||||||
languageSettings.enableLanguageFeature("InlineClasses")
|
languageSettings.enableLanguageFeature("InlineClasses")
|
||||||
}
|
}
|
||||||
|
@ -135,14 +135,39 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tvos() {
|
tvosX64() {
|
||||||
binaries {
|
binaries {
|
||||||
framework {
|
framework {
|
||||||
optimized = true
|
optimized = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
watchos() {
|
|
||||||
|
tvosArm64() {
|
||||||
|
binaries {
|
||||||
|
framework {
|
||||||
|
optimized = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
watchosArm64() {
|
||||||
|
binaries {
|
||||||
|
framework {
|
||||||
|
optimized = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
watchosArm32() {
|
||||||
|
binaries {
|
||||||
|
framework {
|
||||||
|
optimized = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
watchosX86() {
|
||||||
binaries {
|
binaries {
|
||||||
framework {
|
framework {
|
||||||
optimized = true
|
optimized = true
|
||||||
@ -202,7 +227,7 @@ kotlin {
|
|||||||
targets.withType<KotlinNativeTarget> {
|
targets.withType<KotlinNativeTarget> {
|
||||||
println("Target $name")
|
println("Target $name")
|
||||||
compilations.getByName("main") {
|
compilations.getByName("main") {
|
||||||
if (this@withType.name.contains("ios").not()) {
|
if ((this@withType.name.contains("ios") || this@withType.name.contains("tvos") || this@withType.name.contains("watchos")).not()) {
|
||||||
defaultSourceSet.dependsOn(createWorkaroundNativeMainSourceSet(this@withType.name, nativeDependencies))
|
defaultSourceSet.dependsOn(createWorkaroundNativeMainSourceSet(this@withType.name, nativeDependencies))
|
||||||
println("Setting cinterop for $this")
|
println("Setting cinterop for $this")
|
||||||
val libsodiumCinterop by cinterops.creating {
|
val libsodiumCinterop by cinterops.creating {
|
||||||
@ -213,7 +238,7 @@ kotlin {
|
|||||||
"-include-binary", "${project.rootDir}/sodiumWrapper/lib/libsodium.a"
|
"-include-binary", "${project.rootDir}/sodiumWrapper/lib/libsodium.a"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (this@withType.name.contains("ios")) {
|
if (this@withType.name.contains("ios") || this@withType.name.contains("tvos") || this@withType.name.contains("watchos")) {
|
||||||
defaultSourceSet.dependsOn(createWorkaroundNativeMainSourceSet(this@withType.name, nativeDependencies))
|
defaultSourceSet.dependsOn(createWorkaroundNativeMainSourceSet(this@withType.name, nativeDependencies))
|
||||||
println("Setting ios cinterop for $this")
|
println("Setting ios cinterop for $this")
|
||||||
val libsodiumCinterop by cinterops.creating {
|
val libsodiumCinterop by cinterops.creating {
|
||||||
@ -284,7 +309,7 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hostOsName == "macos") {
|
runningOnMacos {
|
||||||
val macosX64Main by getting {
|
val macosX64Main by getting {
|
||||||
dependsOn(nativeMain)
|
dependsOn(nativeMain)
|
||||||
if (ideaActive) {
|
if (ideaActive) {
|
||||||
@ -299,6 +324,27 @@ kotlin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val tvosX64Main by getting {
|
||||||
|
dependsOn(commonMain)
|
||||||
|
}
|
||||||
|
|
||||||
|
val tvosArm64Main by getting {
|
||||||
|
dependsOn(commonMain)
|
||||||
|
}
|
||||||
|
|
||||||
|
val watchosX86Main by getting {
|
||||||
|
dependsOn(commonMain)
|
||||||
|
}
|
||||||
|
|
||||||
|
val watchosArm64Main by getting {
|
||||||
|
dependsOn(commonMain)
|
||||||
|
}
|
||||||
|
|
||||||
|
val watchosArm32Main by getting {
|
||||||
|
dependsOn(commonMain)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user