mirror of
https://github.com/jlengrand/compose-multiplatform.git
synced 2026-03-10 08:11:20 +00:00
[components/resources] add resource("img.png"). rememberImageBitmap() (#2483)
This commit is contained in:
@@ -18,6 +18,9 @@ internal fun Project.configureTaskToGenerateXcodeProject(
|
||||
): TaskProvider<AbstractComposeIosTask> = tasks.composeIosTask<AbstractComposeIosTask>("iosGenerateXcodeProject$id") {
|
||||
dependsOn(taskInstallXcodeGen)
|
||||
doLast {
|
||||
val commonMainResources = file("src/commonMain/resources").absolutePath
|
||||
val uikitMainResources = file("src/uikitMain/resources").absolutePath
|
||||
val iosMainResources = file("src/iosMain/resources").absolutePath
|
||||
val buildIosDir = getBuildIosDir(id)
|
||||
buildIosDir.mkdirs()
|
||||
buildIosDir.resolve("project.yml").writeText(
|
||||
@@ -44,6 +47,16 @@ internal fun Project.configureTaskToGenerateXcodeProject(
|
||||
ENABLE_BITCODE: "YES"
|
||||
ONLY_ACTIVE_ARCH: "NO"
|
||||
VALID_ARCHS: "arm64"
|
||||
sources:
|
||||
- path: $commonMainResources
|
||||
optional: true
|
||||
buildPhase: resources
|
||||
- path: $uikitMainResources
|
||||
optional: true
|
||||
buildPhase: resources
|
||||
- path: $iosMainResources
|
||||
optional: true
|
||||
buildPhase: resources
|
||||
""".trimIndent()
|
||||
)
|
||||
runExternalTool(xcodeGenExecutable, emptyList(), workingDir = buildIosDir)
|
||||
|
||||
Reference in New Issue
Block a user