-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix dynamic framework support and fix binary compatibility of SkikoUI…
…View This change configures Kotlin Gradle plugin to include a CInterop def file (https://kotlinlang.org/docs/native-c-interop.html) to fix linking a dynamic framework for iOS Also helps with https://youtrack.jetbrains.com/issue/KT-60399 (at least in some cases). Internal discussion https://jetbrains.slack.com/archives/G017NLN12D8/p1689594898607469
- Loading branch information
1 parent
39fb88f
commit a930272
Showing
4 changed files
with
101 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import org.gradle.api.DefaultTask | ||
import org.gradle.api.file.RegularFileProperty | ||
import org.gradle.api.provider.ListProperty | ||
import org.gradle.api.tasks.Input | ||
import org.gradle.api.tasks.OutputFile | ||
import org.gradle.api.tasks.TaskAction | ||
|
||
abstract class WriteCInteropDefFile : DefaultTask() { | ||
@get:Input | ||
abstract val linkerOpts: ListProperty<String> | ||
|
||
@get:OutputFile | ||
abstract val outputFile: RegularFileProperty | ||
|
||
@TaskAction | ||
fun run() { | ||
val outputFile = outputFile.get().asFile | ||
outputFile.parentFile.mkdirs() | ||
|
||
outputFile.bufferedWriter().use { writer -> | ||
val linkerOpts = linkerOpts.get() | ||
if (linkerOpts.isNotEmpty()) { | ||
writer.appendLine("linkerOpts=${linkerOpts.joinToString(" ")}") | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters