Skip to content

Commit

Permalink
Merge branch 'missing-dsyms-fix'
Browse files Browse the repository at this point in the history
  • Loading branch information
luca992 committed Mar 1, 2024
2 parents 703fb1b + a214e04 commit 47a30bd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ plugins {
signing
}

version = "2.2.1"
version = "2.2.2-SNAPSHOT"

repositories {
mavenCentral()
}

kotlin {
jvmToolchain(11)
jvmToolchain(8)
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.chromaticnoise.multiplatformswiftpackage.task

import com.chromaticnoise.multiplatformswiftpackage.domain.*
import org.gradle.api.Project
import org.gradle.api.tasks.Exec
import org.gradle.kotlin.dsl.task
import org.jetbrains.kotlin.gradle.tasks.FatFrameworkTask
import java.io.File
Expand Down Expand Up @@ -130,7 +129,7 @@ internal fun removeMonoFrameworksAndAddUniversalFrameworkIfNeeded(
}


internal fun Project.registerCreateXCFrameworkTask() = tasks.register("createXCFramework", Exec::class.java) {
internal fun Project.registerCreateXCFrameworkTask() = tasks.register("createXCFramework") {
group = "multiplatform-swift-package"
description = "Creates an XCFramework for all declared Apple targets"

Expand Down Expand Up @@ -175,22 +174,25 @@ internal fun Project.registerCreateXCFrameworkTask() = tasks.register("createXCF
outputFrameworks
)


executable = "xcodebuild"
args(mutableListOf<String>().apply {
add("-create-xcframework")
add("-output")
add(xcFrameworkDestination.path)
outputFrameworks.forEach { framework ->
add("-framework")
add(framework.outputFile.path)

framework.dsymFile.takeIf { it.exists() }?.let { dsymFile ->
add("-debug-symbols")
add(dsymFile.absolutePath)
}
doLast {
exec {
executable = "xcodebuild"
this.args(mutableListOf<String>().apply {
add("-create-xcframework")
add("-output")
add(xcFrameworkDestination.path)
outputFrameworks.forEach { framework ->
add("-framework")
add(framework.outputFile.path)

framework.dsymFile.takeIf { it.exists() }?.let { dsymFile ->
add("-debug-symbols")
add(dsymFile.absolutePath)
}
}
})
}
})
}

doFirst {
xcFrameworkDestination.deleteRecursively()
Expand Down

0 comments on commit 47a30bd

Please sign in to comment.