Skip to content

Commit

Permalink
Set bundleId for apple targets
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredrummler committed May 4, 2024
1 parent 871daa4 commit b6bb8bd
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions buildSrc/src/main/kotlin/extensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,16 @@ fun Project.exec(command: String) = external.CommandLine(this).execute(command).
*/
@Suppress("NOTHING_TO_INLINE")
inline fun KotlinMultiplatformExtension.appleTargetsWithFramework(baseName: String) {
// List of iOS targets
listOf(iosX64(), iosArm64()).forEach { target ->
target.binaries.framework(baseName)
}
// macOS targets
listOf(macosX64(), macosArm64()).forEach { target ->
target.binaries.framework(baseName)
}
// tvOS targets
listOf(tvosX64(), tvosArm64()).forEach { target ->
target.binaries.framework(baseName)
}
// watchOS targets
listOf(watchosX64(), watchosArm64(), watchosArm32()).forEach { target ->
target.binaries.framework(baseName)
val iosTargets = listOf(iosX64(), iosArm64())
val macosTargets = listOf(macosX64(), macosArm64())
val tvosTargets = listOf(tvosX64(), tvosArm64())
val watchosTargets = listOf(watchosX64(), watchosArm64(), watchosArm32())
val targets = iosTargets + macosTargets + tvosTargets + watchosTargets
targets.forEach { target ->
target.binaries.framework {
this.baseName = baseName
this.freeCompilerArgs += "-Xbinary=bundleId=${BuildConfig.GROUP}.kotlin"
}
}
}

Expand Down

0 comments on commit b6bb8bd

Please sign in to comment.