Skip to content

Commit

Permalink
Fix iOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
takahirom committed Jul 28, 2024
1 parent 1d4382a commit 53d2490
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class KmpComposePlugin : Plugin<Project> {
}
val compose = extensions.get("compose") as org.jetbrains.compose.ComposeExtension
compose.extensions.configure<ResourcesExtension> {
publicResClass = true
publicResClass = false
}
kotlin {
with(sourceSets) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.droidkaigi.confsched.primitive

import co.touchlab.skie.configuration.DefaultArgumentInterop
import co.touchlab.skie.configuration.FlowInterop
import co.touchlab.skie.configuration.SealedInterop
import co.touchlab.skie.configuration.SuspendInterop
Expand All @@ -17,6 +16,28 @@ class KmpSkiePlugin : Plugin<Project> {

project.extensions.configure(co.touchlab.skie.plugin.configuration.SkieExtension::class.java) {
features {
// Workaround for the error of
// static member 'shared' cannot be used on instance of type 'Res'
// https://slack-chats.kotlinlang.org/t/18882065/should-skie-work-with-the-multiplatform-resources-functional#60c3f44d-5e92-430c-9f05-3e3b34bb30a0
val resourceClasses = listOf(
"conference_app_2024.feature.about.generated.resources.Res",
"conference_app_2024.feature.contributors.generated.resources.Res",
"conference_app_2024.feature.eventmap.generated.resources.Res",
"conference_app_2024.feature.main.generated.resources.Res",
"conference_app_2024.feature.profilecard.generated.resources.Res",
"conference_app_2024.feature.sessions.generated.resources.Res",
"conference_app_2024.feature.staff.generated.resources.Res",
"conference_app_2024.core.designsystem.generated.resources.Res",
"conference_app_2024.core.data.generated.resources.Res",
"conference_app_2024.core.model.generated.resources.Res",
"conference_app_2024.appiosshared.generated.resources.Res",
)
resourceClasses.forEach { resourceClass ->
group(resourceClass) {
SuspendInterop.Enabled(false)
}
}

group {
coroutinesInterop.set(true)
SuspendInterop.Enabled(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package io.github.droidkaigi.confsched.designsystem

import conference_app_2024.core.designsystem.generated.resources.Res

object DesignSystemRes {
internal object DesignSystemRes {
val drawable = Res.drawable
val string = Res.string
val font = Res.font
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package io.github.droidkaigi.confsched.about

import conference_app_2024.feature.about.generated.resources.Res

object AboutRes {
internal object AboutRes {
val string = Res.string
val drawable = Res.drawable
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package io.github.droidkaigi.confsched.contributors

import conference_app_2024.feature.contributors.generated.resources.Res

object ContributorsRes {
internal object ContributorsRes {
val drawable = Res.drawable
val string = Res.string
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package io.github.droidkaigi.confsched.eventmap

import conference_app_2024.feature.eventmap.generated.resources.Res

object EventMapRes {
internal object EventMapRes {
val drawable = Res.drawable
val string = Res.string
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package io.github.droidkaigi.confsched.main

import conference_app_2024.feature.main.generated.resources.Res

object MainRes {
internal object MainRes {
val drawable = Res.drawable
val string = Res.string
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package io.github.droidkaigi.confshed.profilecard

import conference_app_2024.feature.profilecard.generated.resources.Res

object ProfileCardRes {
internal object ProfileCardRes {
val drawable = Res.drawable
val string = Res.string
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package io.github.droidkaigi.confsched.sessions

import conference_app_2024.feature.sessions.generated.resources.Res

object SessionsRes {
internal object SessionsRes {
val string = Res.string
val drawable = Res.drawable
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package io.github.droidkaigi.confsched.staff

import conference_app_2024.feature.staff.generated.resources.Res

object StaffRes {
internal object StaffRes {
val drawable = Res.drawable
val string = Res.string
}
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ lottie = "6.1.0"
molecule = "1.4.1"
kover = "0.7.6"
androidxLifecycleProcess = "2.8.2"
skie = "0.8.2"
skie = "0.8.3"
composablePreviewScanner = "0.1.2"
coil = "3.0.0-alpha06"

Expand Down

0 comments on commit 53d2490

Please sign in to comment.