Skip to content

Commit

Permalink
Bump Kotlin to 2.0.0 and Compose Multiplatform to 1.6.10
Browse files Browse the repository at this point in the history
  • Loading branch information
ShreckYe committed May 24, 2024
1 parent 2e37dd0 commit a2aa9c7
Show file tree
Hide file tree
Showing 5 changed files with 611 additions and 338 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.gradle
.kotlin
build
local.properties

Expand Down
6 changes: 4 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ repositories {
}

dependencies {
implementation(kotlin("gradle-plugin", "1.9.23"))
implementation("org.jetbrains.compose:compose-gradle-plugin:1.6.2")
val kotlinVersion = "2.0.0"
implementation(kotlin("gradle-plugin", kotlinVersion))
implementation("org.jetbrains.kotlin:compose-compiler-gradle-plugin:$kotlinVersion")
implementation("org.jetbrains.compose:compose-gradle-plugin:1.6.10")
implementation("com.huanshankeji.team:gradle-plugins:0.5.1")
implementation("com.android.tools.build:gradle:8.2.2")
implementation("com.huanshankeji:common-gradle-dependencies:0.7.1-20240516")
Expand Down
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/common-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl

plugins {
kotlin("multiplatform")
kotlin("plugin.compose")
id("org.jetbrains.compose")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import androidx.compose.runtime.Composable
import com.huanshankeji.compose.ui.Modifier
import com.huanshankeji.compose.ui.toAttrs
import dev.petuska.kmdc.core.MDCAttrs
import dev.petuska.kmdc.core.MDCContent
import dev.petuska.kmdc.snackbar.*

private fun Boolean.actionOnNewLineToType() =
Expand All @@ -18,13 +17,13 @@ internal fun CommonSnackbar(
timeoutMs: Int?,
modifier: Modifier,
attrs: MDCAttrs<MDCSnackbarAttrsScope>?,
mdcSnackbarContent: MDCContent<MDCSnackbarScope>?,
actions: MDCContent<MDCSnackbarActionsScope>?,
mdcSnackbarContent: @Composable MDCSnackbarScope.() -> Unit?, // `MDCContent<MDCSnackbarScope>?` not working here since Kotlin 2.0.0
actions: @Composable MDCSnackbarActionsScope.() -> Unit?, //MDCContent<MDCSnackbarActionsScope>?,
) =
MDCSnackbar(actionOnNewLine.actionOnNewLineToType(), open, timeoutMs, attrs = modifier.toAttrs(attrs)) {
mdcSnackbarContent?.invoke(this)
mdcSnackbarContent.invoke(this)

actions?.let {
actions.let {
Actions {
it()
}
Expand Down
Loading

0 comments on commit a2aa9c7

Please sign in to comment.