Skip to content

Commit

Permalink
Add a convenience configuration to enable distributable builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipDolnik committed Jun 5, 2024
1 parent 3106329 commit d566dfd
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@file:Suppress("MemberVisibilityCanBePrivate")
@file:Suppress("MemberVisibilityCanBePrivate", "unused")

package co.touchlab.skie.plugin.configuration

Expand Down Expand Up @@ -47,6 +47,19 @@ abstract class SkieBuildConfiguration @Inject constructor(objects: ObjectFactory
*/
val freeSwiftCompilerArgs: ListProperty<String> = objects.listProperty(String::class.java)

/**
* Configures SKIE to produce distributable frameworks.
*
* This option is only needed when the produced framework will be compiled against on another machine.
* On the other hand, this option is unnecessary when the framework is only used locally, including as a dependency for a binary that is then distributed to other machines.
*
* Enables Swift Library Evolution and `-no-clang-module-breadcrumbs` flag.
*/
fun produceDistributableFramework() {
enableSwiftLibraryEvolution.set(true)
noClangModuleBreadcrumbsInStaticFrameworks.set(true)
}

internal fun buildConfigurationFlags(): Set<SkieConfigurationFlag> =
setOfNotNull(
SkieConfigurationFlag.Build_SwiftLibraryEvolution takeIf enableSwiftLibraryEvolution,
Expand Down

0 comments on commit d566dfd

Please sign in to comment.