Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix showkase preview #605

Merged
merged 6 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ gradlePlugin {
id = "droidkaigi.primitive.kmp.android.hilt"
implementationClass = "io.github.droidkaigi.confsched2023.primitive.KmpAndroidHiltPlugin"
}
register("kotlinMppAndroidShowkase") {
id = "droidkaigi.primitive.kmp.android.showkase"
implementationClass = "io.github.droidkaigi.confsched2023.primitive.KmpAndroidShowkasePlugin"
}
register("kotlinMppKotlinSerialization") {
id = "droidkaigi.primitive.kmp.serialization"
implementationClass = "io.github.droidkaigi.confsched2023.primitive.KotlinSerializationPlugin"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package io.github.droidkaigi.confsched2023.primitive

import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.get

@Suppress("unused")
class KmpAndroidShowkasePlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
with(pluginManager) {
apply(libs.findPlugin("kspGradlePlugin").get().get().pluginId)
}
kotlin {
sourceSets.getByName("androidMain") {
dependencies {
implementation(libs.findLibrary("showkaseRuntime").get())
}
}
}
dependencies {
this.add("kspAndroid", libs.findLibrary("showkaseProcessor").get())
}
}
}
}
2 changes: 1 addition & 1 deletion core/designsystem/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import io.github.droidkaigi.confsched2023.primitive.implementation
import io.github.droidkaigi.confsched2023.primitive.libs

plugins {
Expand All @@ -8,6 +7,7 @@ plugins {
id("droidkaigi.primitive.kmp.compose")
id("droidkaigi.primitive.kmp.android.hilt")
id("droidkaigi.primitive.spotless")
id("droidkaigi.primitive.kmp.android.showkase")
}

android.namespace = "io.github.droidkaigi.confsched2023.core.designsystem"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import androidx.compose.ui.platform.testTag
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import io.github.droidkaigi.confsched2023.about.AboutStrings
import io.github.droidkaigi.confsched2023.designsystem.preview.MultiLanguagePreviews
import io.github.droidkaigi.confsched2023.designsystem.preview.MultiThemePreviews
import io.github.droidkaigi.confsched2023.designsystem.theme.KaigiTheme

@Composable
Expand Down Expand Up @@ -72,8 +74,8 @@ fun AboutContentColumn(
}
}

@Preview(locale = "en", uiMode = Configuration.UI_MODE_NIGHT_NO)
@Preview(locale = "ja", uiMode = Configuration.UI_MODE_NIGHT_NO)
@MultiThemePreviews
@MultiLanguagePreviews
@Composable
fun AboutContentColumnPreview() {
KaigiTheme {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ktlint = "0.49.1"
kotlinxSerialization = "1.5.1"
ktor = "2.3.3"
roborazzi = "1.6.0-alpha-3"
showkase = "1.0.0-beta17"
showkase = "1.0.0-beta18"
ksp = "1.9.0-1.0.13"
multiplatformFirebaseAuth = "1.8.1"
kermit = "1.2.2"
Expand Down