diff --git a/build-logic/src/main/kotlin/io/github/droidkaigi/confsched/primitive/KmpComposePlugin.kt b/build-logic/src/main/kotlin/io/github/droidkaigi/confsched/primitive/KmpComposePlugin.kt index 6b560846b..ba61c0087 100644 --- a/build-logic/src/main/kotlin/io/github/droidkaigi/confsched/primitive/KmpComposePlugin.kt +++ b/build-logic/src/main/kotlin/io/github/droidkaigi/confsched/primitive/KmpComposePlugin.kt @@ -26,7 +26,7 @@ class KmpComposePlugin : Plugin { } val compose = extensions.get("compose") as org.jetbrains.compose.ComposeExtension compose.extensions.configure { - publicResClass = false + publicResClass = true } kotlin { with(sourceSets) { diff --git a/build-logic/src/main/kotlin/io/github/droidkaigi/confsched/primitive/KmpSkiePlugin.kt b/build-logic/src/main/kotlin/io/github/droidkaigi/confsched/primitive/KmpSkiePlugin.kt index fd06c84f9..c8efa3639 100644 --- a/build-logic/src/main/kotlin/io/github/droidkaigi/confsched/primitive/KmpSkiePlugin.kt +++ b/build-logic/src/main/kotlin/io/github/droidkaigi/confsched/primitive/KmpSkiePlugin.kt @@ -16,28 +16,6 @@ class KmpSkiePlugin : Plugin { 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) @@ -45,6 +23,18 @@ class KmpSkiePlugin : Plugin { // DefaultArgumentInterop.Enabled(true) SealedInterop.Enabled(true) } + // 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 + rootProject.allprojects { + val project = this + val resClassName = "conference_app_2024" + project.path + .replace(":", ".") + .replace("-", "_") + ".generated.resources.Res" + group(resClassName) { + SuspendInterop.Enabled(false) + } + } } } } diff --git a/core/designsystem/src/commonMain/kotlin/io/github/droidkaigi/confsched/designsystem/DesignSystemRes.kt b/core/designsystem/src/commonMain/kotlin/io/github/droidkaigi/confsched/designsystem/DesignSystemRes.kt index 391476a35..1169c7ccd 100644 --- a/core/designsystem/src/commonMain/kotlin/io/github/droidkaigi/confsched/designsystem/DesignSystemRes.kt +++ b/core/designsystem/src/commonMain/kotlin/io/github/droidkaigi/confsched/designsystem/DesignSystemRes.kt @@ -2,7 +2,7 @@ package io.github.droidkaigi.confsched.designsystem import conference_app_2024.core.designsystem.generated.resources.Res -internal object DesignSystemRes { +object DesignSystemRes { val drawable = Res.drawable val string = Res.string val font = Res.font diff --git a/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/AboutRes.kt b/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/AboutRes.kt index 66ea7307c..5ce72b016 100644 --- a/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/AboutRes.kt +++ b/feature/about/src/commonMain/kotlin/io/github/droidkaigi/confsched/about/AboutRes.kt @@ -2,7 +2,7 @@ package io.github.droidkaigi.confsched.about import conference_app_2024.feature.about.generated.resources.Res -internal object AboutRes { +object AboutRes { val string = Res.string val drawable = Res.drawable } diff --git a/feature/contributors/src/commonMain/kotlin/io/github/droidkaigi/confsched/contributors/ContributorsRes.kt b/feature/contributors/src/commonMain/kotlin/io/github/droidkaigi/confsched/contributors/ContributorsRes.kt index f55f94b3a..291e81f0d 100644 --- a/feature/contributors/src/commonMain/kotlin/io/github/droidkaigi/confsched/contributors/ContributorsRes.kt +++ b/feature/contributors/src/commonMain/kotlin/io/github/droidkaigi/confsched/contributors/ContributorsRes.kt @@ -2,7 +2,7 @@ package io.github.droidkaigi.confsched.contributors import conference_app_2024.feature.contributors.generated.resources.Res -internal object ContributorsRes { +object ContributorsRes { val drawable = Res.drawable val string = Res.string } diff --git a/feature/eventmap/src/commonMain/kotlin/io/github/droidkaigi/confsched/eventmap/EventMapRes.kt b/feature/eventmap/src/commonMain/kotlin/io/github/droidkaigi/confsched/eventmap/EventMapRes.kt index cd82a45cc..9fddf8005 100644 --- a/feature/eventmap/src/commonMain/kotlin/io/github/droidkaigi/confsched/eventmap/EventMapRes.kt +++ b/feature/eventmap/src/commonMain/kotlin/io/github/droidkaigi/confsched/eventmap/EventMapRes.kt @@ -2,7 +2,7 @@ package io.github.droidkaigi.confsched.eventmap import conference_app_2024.feature.eventmap.generated.resources.Res -internal object EventMapRes { +object EventMapRes { val drawable = Res.drawable val string = Res.string } diff --git a/feature/main/src/commonMain/kotlin/io/github/droidkaigi/confsched/main/MainRes.kt b/feature/main/src/commonMain/kotlin/io/github/droidkaigi/confsched/main/MainRes.kt index c383ed4b2..d6fc13991 100644 --- a/feature/main/src/commonMain/kotlin/io/github/droidkaigi/confsched/main/MainRes.kt +++ b/feature/main/src/commonMain/kotlin/io/github/droidkaigi/confsched/main/MainRes.kt @@ -2,7 +2,7 @@ package io.github.droidkaigi.confsched.main import conference_app_2024.feature.main.generated.resources.Res -internal object MainRes { +object MainRes { val drawable = Res.drawable val string = Res.string } diff --git a/feature/profilecard/src/commonMain/kotlin/io/github/droidkaigi/confshed/profilecard/ProfileCardRes.kt b/feature/profilecard/src/commonMain/kotlin/io/github/droidkaigi/confshed/profilecard/ProfileCardRes.kt index 0ac6e5d66..d8dc981c0 100644 --- a/feature/profilecard/src/commonMain/kotlin/io/github/droidkaigi/confshed/profilecard/ProfileCardRes.kt +++ b/feature/profilecard/src/commonMain/kotlin/io/github/droidkaigi/confshed/profilecard/ProfileCardRes.kt @@ -2,7 +2,7 @@ package io.github.droidkaigi.confshed.profilecard import conference_app_2024.feature.profilecard.generated.resources.Res -internal object ProfileCardRes { +object ProfileCardRes { val drawable = Res.drawable val string = Res.string } diff --git a/feature/sessions/src/commonMain/kotlin/io/github/droidkaigi/confsched/sessions/SessionsRes.kt b/feature/sessions/src/commonMain/kotlin/io/github/droidkaigi/confsched/sessions/SessionsRes.kt index 0f028569b..2487d1c69 100644 --- a/feature/sessions/src/commonMain/kotlin/io/github/droidkaigi/confsched/sessions/SessionsRes.kt +++ b/feature/sessions/src/commonMain/kotlin/io/github/droidkaigi/confsched/sessions/SessionsRes.kt @@ -2,7 +2,7 @@ package io.github.droidkaigi.confsched.sessions import conference_app_2024.feature.sessions.generated.resources.Res -internal object SessionsRes { +object SessionsRes { val string = Res.string val drawable = Res.drawable } diff --git a/feature/staff/src/commonMain/kotlin/io/github/droidkaigi/confsched/staff/StaffRes.kt b/feature/staff/src/commonMain/kotlin/io/github/droidkaigi/confsched/staff/StaffRes.kt index c215cca0d..c8fd09ff4 100644 --- a/feature/staff/src/commonMain/kotlin/io/github/droidkaigi/confsched/staff/StaffRes.kt +++ b/feature/staff/src/commonMain/kotlin/io/github/droidkaigi/confsched/staff/StaffRes.kt @@ -2,7 +2,7 @@ package io.github.droidkaigi.confsched.staff import conference_app_2024.feature.staff.generated.resources.Res -internal object StaffRes { +object StaffRes { val drawable = Res.drawable val string = Res.string }