diff --git a/.editorconfig b/.editorconfig index 6b37b845..d9e3ecad 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,6 +6,9 @@ indent_style = space insert_final_newline = true trim_trailing_whitespace = true +[**/generated/**/*] +ktlint = disabled + [*.{kt,kts}] ij_kotlin_allow_trailing_comma = true ij_kotlin_allow_trailing_comma_on_call_site = true diff --git a/compose-multiplatform/library/src/commonMain/kotlin/com/kizitonwose/calendar/core/YearMonth.kt b/compose-multiplatform/library/src/commonMain/kotlin/com/kizitonwose/calendar/core/YearMonth.kt index c8bb958d..a48f00e8 100644 --- a/compose-multiplatform/library/src/commonMain/kotlin/com/kizitonwose/calendar/core/YearMonth.kt +++ b/compose-multiplatform/library/src/commonMain/kotlin/com/kizitonwose/calendar/core/YearMonth.kt @@ -6,7 +6,6 @@ import kotlinx.datetime.number @Immutable data class YearMonth(val year: Int, val month: Month) : Comparable, JvmSerializable { - constructor(year: Int, monthNumber: Int) : this(year = year, month = Month(monthNumber)) diff --git a/compose-multiplatform/library/src/wasmJsMain/kotlin/com/kizitonwose/calendar/core/Extensions.wasmJs.kt b/compose-multiplatform/library/src/wasmJsMain/kotlin/com/kizitonwose/calendar/core/Extensions.wasmJs.kt index 379479f8..b728b271 100644 --- a/compose-multiplatform/library/src/wasmJsMain/kotlin/com/kizitonwose/calendar/core/Extensions.wasmJs.kt +++ b/compose-multiplatform/library/src/wasmJsMain/kotlin/com/kizitonwose/calendar/core/Extensions.wasmJs.kt @@ -10,7 +10,8 @@ actual fun firstDayOfWeekFromLocale(locale: Locale): DayOfWeek { return try { val firstDay = jsFirstDayFromTag(locale.toLanguageTag()) daysOfWeek(firstDayOfWeek = DayOfWeek.MONDAY)[firstDay - 1] - } catch (e: Exception) { // Unavailable on Firefox + // Unavailable on Firefox + } catch (e: Exception) { firstDayFromMap(locale) } } diff --git a/compose-multiplatform/sample/build.gradle.kts b/compose-multiplatform/sample/build.gradle.kts index d1776791..b247be8b 100644 --- a/compose-multiplatform/sample/build.gradle.kts +++ b/compose-multiplatform/sample/build.gradle.kts @@ -67,8 +67,8 @@ kotlin { implementation(compose.ui) implementation(compose.components.resources) implementation(compose.components.uiToolingPreview) - implementation("com.kizitonwose.calendar:compose-multiplatform:2.6.0-alpha01") -// implementation(project(":compose-multiplatform:library")) +// implementation("com.kizitonwose.calendar:compose-multiplatform:2.6.0-alpha02") + implementation(project(":compose-multiplatform:library")) implementation(libs.jetbrains.compose.navigation) } val nonJvmMain by creating { diff --git a/compose-multiplatform/sample/src/commonMain/kotlin/App.kt b/compose-multiplatform/sample/src/commonMain/kotlin/App.kt index 78a4fae8..33d27d97 100644 --- a/compose-multiplatform/sample/src/commonMain/kotlin/App.kt +++ b/compose-multiplatform/sample/src/commonMain/kotlin/App.kt @@ -174,7 +174,6 @@ private fun AppNavHost( } } - @OptIn(ExperimentalMaterial3Api::class) private val blueToolbar @Composable @@ -190,4 +189,3 @@ private val whiteToolbar containerColor = Color.White, titleContentColor = Color.Black, ) - diff --git a/compose-multiplatform/sample/src/commonMain/kotlin/AppIcons.kt b/compose-multiplatform/sample/src/commonMain/kotlin/AppIcons.kt index 6fc067b6..a28ccc71 100644 --- a/compose-multiplatform/sample/src/commonMain/kotlin/AppIcons.kt +++ b/compose-multiplatform/sample/src/commonMain/kotlin/AppIcons.kt @@ -1,3 +1,5 @@ +@file:Suppress("ktlint:standard:backing-property-naming") + import androidx.compose.foundation.Image import androidx.compose.material.icons.Icons import androidx.compose.material.icons.materialIcon diff --git a/compose-multiplatform/sample/src/commonMain/kotlin/Example3Page.kt b/compose-multiplatform/sample/src/commonMain/kotlin/Example3Page.kt index c68d7974..1e59242d 100644 --- a/compose-multiplatform/sample/src/commonMain/kotlin/Example3Page.kt +++ b/compose-multiplatform/sample/src/commonMain/kotlin/Example3Page.kt @@ -318,18 +318,6 @@ private fun AirportInformation(airport: Flight.Airport, isDeparture: Boolean) { } } -// The default dark them ripple is too bright so we tone it down. -//private val Example3RippleConfiguration = RippleConfiguration( -// color = Color.Gray, -// // Copied from RippleTheme#DarkThemeRippleAlpha -// rippleAlpha = RippleAlpha( -// pressedAlpha = 0.10f, -// focusedAlpha = 0.12f, -// draggedAlpha = 0.08f, -// hoveredAlpha = 0.04f, -// ), -//) - @Preview @Composable private fun Example3Preview() { diff --git a/compose-multiplatform/sample/src/desktopMain/kotlin/main.kt b/compose-multiplatform/sample/src/desktopMain/kotlin/Main.kt similarity index 100% rename from compose-multiplatform/sample/src/desktopMain/kotlin/main.kt rename to compose-multiplatform/sample/src/desktopMain/kotlin/Main.kt diff --git a/compose-multiplatform/sample/src/iosMain/kotlin/MainViewController.kt b/compose-multiplatform/sample/src/iosMain/kotlin/MainViewController.kt index fa143d45..5f9d8e00 100644 --- a/compose-multiplatform/sample/src/iosMain/kotlin/MainViewController.kt +++ b/compose-multiplatform/sample/src/iosMain/kotlin/MainViewController.kt @@ -1,3 +1,4 @@ import androidx.compose.ui.window.ComposeUIViewController -fun MainViewController() = ComposeUIViewController { App() } \ No newline at end of file +@Suppress("FunctionName") +fun MainViewController() = ComposeUIViewController { App() } diff --git a/compose-multiplatform/sample/src/wasmJsMain/kotlin/main.kt b/compose-multiplatform/sample/src/wasmJsMain/kotlin/Main.kt similarity index 99% rename from compose-multiplatform/sample/src/wasmJsMain/kotlin/main.kt rename to compose-multiplatform/sample/src/wasmJsMain/kotlin/Main.kt index d2fd60c1..48a60ac3 100644 --- a/compose-multiplatform/sample/src/wasmJsMain/kotlin/main.kt +++ b/compose-multiplatform/sample/src/wasmJsMain/kotlin/Main.kt @@ -7,4 +7,4 @@ fun main() { ComposeViewport(document.body!!) { App() } -} \ No newline at end of file +}