Skip to content

Commit

Permalink
20240319: optinally static XCFramework
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusMcCloud committed Mar 19, 2024
1 parent 77f67ae commit 8e21196
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
This is required, since working with source differs syntactically between Kotlin < 1.9.20
and Kotlin 1.9.20 upwards.

## 20240319
* Make it possible to export static XCFrameworks

## 20240318
* Make it possible to disable workaround for KT-65315

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# A-SIT Plus Gradle Conventions Plugin

[![Version](https://img.shields.io/badge/Kotlin_1.9.10-+20240316-gray.svg?style=flat&logo=kotlin&labelColor=blue&logoColor=white)](CHANGELOG.md)
[![Version](https://img.shields.io/badge/Kotlin_1.9.23-+20240316-gray.svg?style=flat&logo=kotlin&labelColor=7463ce&logoColor=white)](CHANGELOG.md)
[![Version](https://img.shields.io/badge/Kotlin_1.9.10-+20240319-gray.svg?style=flat&logo=kotlin&labelColor=blue&logoColor=white)](CHANGELOG.md)
[![Version](https://img.shields.io/badge/Kotlin_1.9.23-+20240319-gray.svg?style=flat&logo=kotlin&labelColor=7463ce&logoColor=white)](CHANGELOG.md)
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-brightgreen.svg?style=flat&)](http://www.apache.org/licenses/LICENSE-2.0)

**Note: This plugin is still in its early stages and may not work well for edge cases!
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
buildDate=20240318
buildDate=20240319
groupId=at.asitplus.gradle
20 changes: 19 additions & 1 deletion legacy/src/main/kotlin/at/asitplus/gradle/IosFrameworkSetup.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,27 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFrameworkConfig
fun Project.exportIosFramework(
name: String,
vararg additionalExports: Any
) = exportIosFramework(name, bitcodeEmbeddingMode = BitcodeEmbeddingMode.BITCODE, additionalExports = additionalExports)
) = exportIosFramework(
name,
bitcodeEmbeddingMode = BitcodeEmbeddingMode.BITCODE,
static = false,
additionalExports = additionalExports
)

fun Project.exportIosFramework(
name: String,
static: Boolean,
vararg additionalExports: Any
) = exportIosFramework(
name,
bitcodeEmbeddingMode = BitcodeEmbeddingMode.BITCODE,
static = static,
additionalExports = additionalExports
)

fun Project.exportIosFramework(
name: String,
static: Boolean,
bitcodeEmbeddingMode: BitcodeEmbeddingMode,
vararg additionalExports: Any
) {
Expand All @@ -32,6 +49,7 @@ fun Project.exportIosFramework(
iosTargets.forEach {
it.binaries.framework {
baseName = name
isStatic = static
embedBitcode(bitcodeEmbeddingMode)
additionalExports.forEach { export(it) }
xcf.add(this)
Expand Down

0 comments on commit 8e21196

Please sign in to comment.