diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 3e0b8853fd20cb8534b8455db2307fe996d32d5d..1e6c81c8ff5af36d0f2cec1839fb42e4ce51295a 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -17,10 +17,10 @@ dependencies { implementation(Plugins.Android.implementation) implementation(Plugins.Shadow.implementation) // NOTE(radchenko): generates jar for server builds implementation(Plugins.Kotlin.implementation) - implementation(Plugins.Kotlin.implementation) implementation(Plugins.Ktor.implementation) implementation(Plugins.ApacheCompress.implementation) // NOTE(radchenko): needs for `ktor` to `docker` implementation(Plugins.MultiplatformCompose.implementation) + implementation(Plugins.CocoaPods.implementation) implementation(Plugins.BuildConfig.implementation) implementation(Plugins.Serialization.implementation) implementation(Plugins.Moko.implementation) diff --git a/buildSrc/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/buildSrc/src/main/kotlin/Dependencies.kt index f668679a4f496d43e7bf1238ae70d7d102da0262..2709b5de155f554002f1a86a10daa1d020f53f5a 100644 --- a/buildSrc/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/buildSrc/src/main/kotlin/Dependencies.kt @@ -2,7 +2,7 @@ object Dependencies { object Versions { const val activityKtx = "1.7.2" - const val kotlin = "1.8.20" + const val kotlin = "2.1.21" const val agp = "7.4.2" const val compose = "1.4.0" const val androidxAppCompat = "1.6.1" @@ -25,8 +25,8 @@ object Dependencies { const val essenty = "1.1.0" const val logback = "1.2.11" const val shadow = "7.1.2" - const val moko = "0.24.0-beta-5" - const val calendar = "1.0.5" + const val moko = "0.24.5" + const val calendar = "1.0.8" const val sqlDelight = "2.0.0-rc02" } @@ -139,7 +139,7 @@ object Dependencies { const val composeBasic = "io.github.epicarchitect:calendar-compose-basis:${Versions.calendar}" const val composeRanges = "io.github.epicarchitect:calendar-compose-ranges:${Versions.calendar}" const val composePager = "io.github.epicarchitect:calendar-compose-pager:${Versions.calendar}" - const val composeDatePicker = "io.github.epicarchitect:calendar-compose-datepicker:${Versions.calendar}" + const val composeDatePicker = "io.github.epicarchitect:epic-calendar-compose:${Versions.calendar}" } object SqlDelight { diff --git a/buildSrc/buildSrc/src/main/kotlin/Plugins.kt b/buildSrc/buildSrc/src/main/kotlin/Plugins.kt index 566216bc450a5a609d1efea6e3653cc3f0f622e5..3d96738948a114665341cf098c092698edbec95c 100644 --- a/buildSrc/buildSrc/src/main/kotlin/Plugins.kt +++ b/buildSrc/buildSrc/src/main/kotlin/Plugins.kt @@ -7,12 +7,12 @@ object Plugins { object Android { - const val implementation = "com.android.tools.build:gradle:8.1.0" + const val implementation = "com.android.tools.build:gradle:8.9.1" const val plugin = "com.android.application" } object AndroidLib{ - const val implementation = "com.android.tools.build:gradle:8.1.0" + const val implementation = "com.android.tools.build:gradle:8.9.1" const val plugin = "com.android.library" } @@ -22,7 +22,7 @@ object Plugins { } object Kotlin { - const val implementation = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20" + const val implementation = "org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.21" const val plugin = "org.jetbrains.kotlin.multiplatform" } @@ -36,11 +36,17 @@ object Plugins { } object MultiplatformCompose { - const val implementation = "org.jetbrains.compose:compose-gradle-plugin:1.5.10" + const val implementation = "org.jetbrains.compose:org.jetbrains.compose.gradle.plugin:1.7.0" const val plugin = "org.jetbrains.compose" } + object KotlinComposeGradle { + const val implementation = "org.jetbrains.kotlin.plugin.compose:org.jetbrains.kotlin.plugin.compose.gradle.plugin:2.1.0" + const val plugin = "org.jetbrains.kotlin.plugin.compose" + } + object CocoaPods { + const val implementation = "org.jetbrains.kotlin.native.cocoapods:org.jetbrains.kotlin.native.cocoapods.gradle.plugin:2.0.20" const val plugin = "org.jetbrains.kotlin.native.cocoapods" } object Libres { @@ -62,7 +68,7 @@ object Plugins { } object Moko { - const val implementation = "dev.icerock.moko:resources-generator:0.24.0-beta-5" + const val implementation = "dev.icerock.moko:resources-generator:0.24.5" const val plugin = "dev.icerock.mobile.multiplatform-resources" } diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index 0aa665d665bd6df8c241f3539e68625d338b504c..97d9d622f925f606fd3a601dc851d7440b347da9 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -1,4 +1,5 @@ import dev.icerock.gradle.MRVisibility.Public +import org.jetbrains.kotlin.config.JvmTarget plugins { id(Plugins.Kotlin.plugin) @@ -10,16 +11,11 @@ plugins { id(Plugins.Serialization.plugin) id(Plugins.Parcelize.plugin) id(Plugins.Moko.plugin) + id("org.jetbrains.kotlin.plugin.compose") version "2.1.0" } kotlin { - android { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } - } - } + androidTarget() val iosArm64 = iosArm64() val iosX64 = iosX64() @@ -29,7 +25,7 @@ kotlin { version = "2.0.2" summary = "Compose application framework" homepage = "https://github.com/Radch-enko" - ios.deploymentTarget = "11.0" + ios.deploymentTarget = "12.0" podfile = project.file("../iosApp/Podfile") framework { baseName = "ComposeApp" @@ -38,7 +34,7 @@ kotlin { export(Dependencies.Decompose.decompose) export(Dependencies.Essenty.essenty) } - pod("GoogleSignIn") {} + pod("GoogleSignIn") } targets.getByName("iosX64").compilations.forEach { it.kotlinOptions.freeCompilerArgs += arrayOf("-linker-options", "-lsqlite3") @@ -48,6 +44,14 @@ kotlin { freeCompilerArgs += "-Xlazy-ir-for-caches=disable" } } + kotlin.targets.removeAll { + it.name == "iosArm32" + } + tasks.withType().configureEach { + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) + } + } sourceSets { val commonMain by getting { dependencies { @@ -93,13 +97,6 @@ kotlin { } } - val commonTest by getting { - dependencies { - implementation(kotlin("test")) - implementation("dev.icerock.moko:resources-test:0.24.0-beta-5") - } - } - val androidMain by getting { dependsOn(commonMain) dependencies { @@ -134,31 +131,21 @@ kotlin { iosSimulatorArm64Main.dependsOn(this) dependencies { implementation(Dependencies.Ktor.Client.Darwin) - implementation(files("iosApp/GoogleAuthorization/GoogleAuthorization/Sources")) + //implementation(files("iosApp/GoogleAuthorization/GoogleAuthorization/Sources")) implementation(Dependencies.SqlDelight.nativeDriver) } } - - val iosX64Test by getting - val iosArm64Test by getting - val iosSimulatorArm64Test by getting - val iosTest by creating { - dependsOn(commonTest) - iosX64Test.dependsOn(this) - iosArm64Test.dependsOn(this) - iosSimulatorArm64Test.dependsOn(this) - } } } android { namespace = "band.effective.office.elevator" - compileSdk = 34 + compileSdk = 35 defaultConfig { minSdk = 26 - targetSdk = 34 + targetSdk = 36 applicationId = "band.effective.office.mobile" versionCode = 1 @@ -169,15 +156,15 @@ android { res.srcDirs("build/generated/moko/androidMain/src") } compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } packagingOptions { resources.excludes.add("META-INF/**") } composeOptions { - kotlinCompilerExtensionVersion = "1.5.0" + kotlinCompilerExtensionVersion = "1.5.15" } signingConfigs { diff --git a/composeApp/composeApp.podspec b/composeApp/composeApp.podspec index 8d883ee0012f4b8a9fcaaf05d67ed41fe80a72b0..d29a3d1e5421178f8257833cbbb2fe4ffec65455 100644 --- a/composeApp/composeApp.podspec +++ b/composeApp/composeApp.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |spec| spec.summary = 'Compose application framework' spec.vendored_frameworks = 'build/cocoapods/framework/ComposeApp.framework' spec.libraries = 'c++' - spec.ios.deployment_target = '11.0' + spec.ios.deployment_target = '12.0' spec.dependency 'GoogleSignIn' if !Dir.exist?('build/cocoapods/framework/ComposeApp.framework') || Dir.empty?('build/cocoapods/framework/ComposeApp.framework') @@ -22,6 +22,10 @@ Pod::Spec.new do |spec| Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)" end + spec.xcconfig = { + 'ENABLE_USER_SCRIPT_SANDBOXING' => 'NO', + } + spec.pod_target_xcconfig = { 'KOTLIN_PROJECT_PATH' => ':composeApp', 'PRODUCT_MODULE_NAME' => 'ComposeApp', @@ -47,5 +51,5 @@ Pod::Spec.new do |spec| SCRIPT } ] - + spec.resources = ['build/compose/cocoapods/compose-resources'] end \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/band/effective/office/elevator/components/Calendar.kt b/composeApp/src/commonMain/kotlin/band/effective/office/elevator/components/Calendar.kt index 3f968f7f83c42dee5aa7f12c21d6d2754caa49fa..9554cc964e81590385592caf8fdf415fb9f4846d 100644 --- a/composeApp/src/commonMain/kotlin/band/effective/office/elevator/components/Calendar.kt +++ b/composeApp/src/commonMain/kotlin/band/effective/office/elevator/components/Calendar.kt @@ -33,7 +33,7 @@ import epicarchitect.calendar.compose.basis.BasisDayOfMonthContent import epicarchitect.calendar.compose.basis.BasisDayOfWeekContent import epicarchitect.calendar.compose.basis.config.LocalBasisEpicCalendarConfig import epicarchitect.calendar.compose.basis.contains -import epicarchitect.calendar.compose.basis.localized +import epicarchitect.calendar.compose.basis.localizedBySystem import epicarchitect.calendar.compose.basis.state.LocalBasisEpicCalendarState import epicarchitect.calendar.compose.datepicker.EpicDatePicker import epicarchitect.calendar.compose.datepicker.state.EpicDatePickerState @@ -129,7 +129,7 @@ private fun stringFormat(date: LocalDate) = private val CustomDayOfWeekContent: BasisDayOfWeekContent = { dayOfWeek -> val config = LocalBasisEpicCalendarConfig.current Text( - text = dayOfWeek.localized(), + text = dayOfWeek.localizedBySystem(), textAlign = TextAlign.Center, color = config.contentColor, fontSize = 20.sp, diff --git a/composeApp/src/commonMain/kotlin/band/effective/office/elevator/components/NoRippleTheme.kt b/composeApp/src/commonMain/kotlin/band/effective/office/elevator/components/NoRippleTheme.kt deleted file mode 100644 index 2b68bf4aa154cd79175d3e64774a86ef5c459a21..0000000000000000000000000000000000000000 --- a/composeApp/src/commonMain/kotlin/band/effective/office/elevator/components/NoRippleTheme.kt +++ /dev/null @@ -1,14 +0,0 @@ -package band.effective.office.elevator.common.compose.components - -import androidx.compose.material.ripple.RippleAlpha -import androidx.compose.material.ripple.RippleTheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color - -internal object NoRippleTheme : RippleTheme { - @Composable - override fun defaultColor() = Color.Unspecified - - @Composable - override fun rippleAlpha(): RippleAlpha = RippleAlpha(0.0f, 0.0f, 0.0f, 0.0f) -} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/band/effective/office/elevator/components/bottomSheet/BottomSheetItem.kt b/composeApp/src/commonMain/kotlin/band/effective/office/elevator/components/bottomSheet/BottomSheetItem.kt index a84bc1d9baa4bab351b53f38f4ed33d49f03399f..fab70a9732a807813acef58b0e314059b854a608 100644 --- a/composeApp/src/commonMain/kotlin/band/effective/office/elevator/components/bottomSheet/BottomSheetItem.kt +++ b/composeApp/src/commonMain/kotlin/band/effective/office/elevator/components/bottomSheet/BottomSheetItem.kt @@ -1,22 +1,14 @@ -@file:OptIn(ExperimentalMaterialApi::class) - package band.effective.office.elevator.components.bottomSheet import androidx.compose.foundation.layout.ColumnScope -import androidx.compose.material.ExperimentalMaterialApi import androidx.compose.material.ModalBottomSheetState import androidx.compose.runtime.Composable -class BottomSheetItem @OptIn(ExperimentalMaterialApi::class) constructor( +class BottomSheetItem( val bottomSheetContentState: ModalBottomSheetState, val bottomSheetContent: @Composable ColumnScope.() -> Unit ) { - @OptIn(ExperimentalMaterialApi::class) suspend fun hideBottomSheet() = bottomSheetContentState.hide() - @OptIn(ExperimentalMaterialApi::class) suspend fun showBottomSheet() = bottomSheetContentState.show() - - @OptIn(ExperimentalMaterialApi::class) - fun isVisible() = bottomSheetContentState.isVisible } diff --git a/composeApp/src/commonMain/kotlin/band/effective/office/elevator/components/bottomSheet/MultiBottomSheetController.kt b/composeApp/src/commonMain/kotlin/band/effective/office/elevator/components/bottomSheet/MultiBottomSheetController.kt index 4fa1d42ddd017c666a3e0aa59ff8694d5c9a9694..5a6a773ecb06d1dce1beaefce9d3871ec3866dd1 100644 --- a/composeApp/src/commonMain/kotlin/band/effective/office/elevator/components/bottomSheet/MultiBottomSheetController.kt +++ b/composeApp/src/commonMain/kotlin/band/effective/office/elevator/components/bottomSheet/MultiBottomSheetController.kt @@ -1,37 +1,24 @@ package band.effective.office.elevator.components.bottomSheet import androidx.compose.foundation.layout.ColumnScope -import androidx.compose.material.ExperimentalMaterialApi import androidx.compose.material.ModalBottomSheetState -import androidx.compose.material.ModalBottomSheetValue -import androidx.compose.material.Text import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf import band.effective.office.elevator.ui.booking.models.BottomSheetNames import band.effective.office.elevator.utils.Stack import band.effective.office.elevator.utils.peek import band.effective.office.elevator.utils.pop import band.effective.office.elevator.utils.push import band.effective.office.elevator.utils.stackOf -import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableStateFlow -import kotlinx.coroutines.flow.flow import kotlinx.coroutines.flow.update class MultiBottomSheetController( private val sheetStack: Stack = stackOf(), private val sheetContents: Map ) { - @OptIn(ExperimentalMaterialApi::class) val currentState: MutableStateFlow = MutableStateFlow(getCurrentSheetState()) - @OptIn(ExperimentalMaterialApi::class) - private val emptyModalState = ModalBottomSheetState( - initialValue = ModalBottomSheetValue.Hidden - ) - - @OptIn(ExperimentalMaterialApi::class) suspend fun showSheet(nameSheet: String) { //closeCurrentSheet() sheetStack.push(nameSheet) @@ -39,13 +26,11 @@ class MultiBottomSheetController( sheetContents[nameSheet]?.showBottomSheet() } - @OptIn(ExperimentalMaterialApi::class) suspend fun closeCurrentSheet() { sheetContents[sheetStack.pop()]?.hideBottomSheet() currentState.update { getCurrentSheetState()} } - @OptIn(ExperimentalMaterialApi::class) fun getCurrentSheetState(): ModalBottomSheetState { println(sheetStack.size) return sheetContents[sheetStack.peek()]?.bottomSheetContentState @@ -56,7 +41,6 @@ class MultiBottomSheetController( return sheetContents[sheetStack.peek()]?.bottomSheetContent ?: {} } - @OptIn(ExperimentalMaterialApi::class) suspend fun showOver(nameSheet: String) { currentState.update { getCurrentSheetState() } sheetStack.push(nameSheet) diff --git a/composeApp/src/commonMain/kotlin/band/effective/office/elevator/components/bottomSheet/rememberMultiBottomSheetController.kt b/composeApp/src/commonMain/kotlin/band/effective/office/elevator/components/bottomSheet/rememberMultiBottomSheetController.kt deleted file mode 100644 index 6556794219360ee15cd008220978622387f1fbe9..0000000000000000000000000000000000000000 --- a/composeApp/src/commonMain/kotlin/band/effective/office/elevator/components/bottomSheet/rememberMultiBottomSheetController.kt +++ /dev/null @@ -1,34 +0,0 @@ -package band.effective.office.elevator.components.bottomSheet - -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.saveable.listSaver -import androidx.compose.runtime.saveable.rememberSaveable -import band.effective.office.elevator.utils.Stack -import band.effective.office.elevator.utils.pop -import band.effective.office.elevator.utils.stackOf - -@Composable -fun rememberMultiBottomSheetController( - sheetContents: Map, - sheetStack: Stack = stackOf() -): MultiBottomSheetController { - - return rememberSaveable(sheetStack, - saver = listSaver( - save = { listOf(sheetStack) }, - restore = { - MultiBottomSheetController( - sheetStack = it[0], - sheetContents = sheetContents - ) - } - ) - ) { - MultiBottomSheetController( - sheetStack = sheetStack, - sheetContents = sheetContents - ) - } -} \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/band/effective/office/elevator/domain/models/BookingInfo.kt b/composeApp/src/commonMain/kotlin/band/effective/office/elevator/domain/models/BookingInfo.kt index a690c88ec5a2f0d710b2d3a5b6ed61f7ed373cf7..237a0b1993f436f93569978d97c2a5d3ccf4f4dd 100644 --- a/composeApp/src/commonMain/kotlin/band/effective/office/elevator/domain/models/BookingInfo.kt +++ b/composeApp/src/commonMain/kotlin/band/effective/office/elevator/domain/models/BookingInfo.kt @@ -11,7 +11,7 @@ import band.effective.office.network.dto.BookingResponseDTO import band.effective.office.network.dto.RecurrenceDTO import band.effective.office.network.dto.UserDTO import band.effective.office.network.dto.WorkspaceDTO -import epicarchitect.calendar.compose.basis.localized +import epicarchitect.calendar.compose.basis.localizedBySystem import kotlinx.datetime.LocalDateTime import kotlinx.datetime.LocalTime @@ -80,7 +80,7 @@ fun BookingInfo.toUiModel() = ReservedSeat( fun List.toUIModel() = map { it.toUiModel() } private fun convertDateTimeToUiDateString(dateOfStart: LocalDateTime) = - "${capitalizeFirstLetter(dateOfStart.dayOfWeek.localized())}, ${dateOfStart.dayOfMonth} ${ + "${capitalizeFirstLetter(dateOfStart.dayOfWeek.localizedBySystem())}, ${dateOfStart.dayOfMonth} ${ MonthLocalizations.getMonthName(dateOfStart.month, Locale("ru"))}" private fun convertDateTimeToUiTimeString( diff --git a/composeApp/src/commonMain/kotlin/band/effective/office/elevator/ui/booking/components/modals/TimeLine.kt b/composeApp/src/commonMain/kotlin/band/effective/office/elevator/ui/booking/components/modals/TimeLine.kt index d2f9ff84382bd167f7e8bd6b397ee5894af93fdd..d0cc92b5dc54ba2dddc5dcfc1eafdc77d846c54d 100644 --- a/composeApp/src/commonMain/kotlin/band/effective/office/elevator/ui/booking/components/modals/TimeLine.kt +++ b/composeApp/src/commonMain/kotlin/band/effective/office/elevator/ui/booking/components/modals/TimeLine.kt @@ -6,35 +6,22 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width -import androidx.compose.foundation.layout.wrapContentHeight -import androidx.compose.material.Button -import androidx.compose.material.ButtonDefaults import androidx.compose.material.MaterialTheme -import androidx.compose.material.ButtonElevation -import androidx.compose.material3.Divider import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.rotate import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.text.intl.Locale import androidx.compose.ui.unit.dp -import band.effective.office.elevator.ExtendedThemeColors import band.effective.office.elevator.MainRes import band.effective.office.elevator.common.compose.components.GrayText -import band.effective.office.elevator.utils.MonthLocalizations -import band.effective.office.elevator.utils.capitalizeFirstLetter import band.effective.office.elevator.utils.convertDateTimeToUiDateString import band.effective.office.elevator.utils.convertTimeToString import dev.icerock.moko.resources.compose.stringResource -import epicarchitect.calendar.compose.basis.localized import kotlinx.datetime.LocalDate -import kotlinx.datetime.LocalDateTime import kotlinx.datetime.LocalTime @Composable @@ -55,7 +42,7 @@ fun TimeLine( .fillMaxWidth() .padding(start = 30.dp, end = 16.dp, top = 16.dp, bottom = 16.dp) ) { - when(startDate == endDate) { + when (startDate == endDate) { true -> SingleTimeLine( startDate = startDate, startTime = startTime, @@ -65,6 +52,7 @@ fun TimeLine( onPickStartTime = onPickStartTime, onPickEndTime = onPickEndTime ) + false -> NonSingleTimeLine( startDate = startDate, startTime = startTime, @@ -156,7 +144,7 @@ private fun NonSingleTimeLine( onPickStartTime: () -> Unit, onPickEndTime: () -> Unit, ) { - Column ( + Column( horizontalAlignment = Alignment.Start ) { Text( diff --git a/composeApp/src/commonMain/kotlin/band/effective/office/elevator/utils/DateConverters.kt b/composeApp/src/commonMain/kotlin/band/effective/office/elevator/utils/DateConverters.kt index 97446384fbad659645ccc563f0b1b43a251bbb0e..1e532340062bef7b95d86cbdc5884c2ba93c3e29 100644 --- a/composeApp/src/commonMain/kotlin/band/effective/office/elevator/utils/DateConverters.kt +++ b/composeApp/src/commonMain/kotlin/band/effective/office/elevator/utils/DateConverters.kt @@ -2,7 +2,7 @@ package band.effective.office.elevator.utils import androidx.compose.ui.text.intl.Locale import band.effective.office.elevator.domain.models.timePad -import epicarchitect.calendar.compose.basis.localized +import epicarchitect.calendar.compose.basis.localizedBySystem import kotlinx.datetime.LocalDate import kotlinx.datetime.LocalTime @@ -10,18 +10,18 @@ fun dateFormat(date: LocalDate) = "${timePad(date.dayOfMonth.toString())}.${timePad(date.monthNumber.toString())}" fun convertDateTimeToUiDateString(dateOfStart: LocalDate) = - "${capitalizeFirstLetter(dateOfStart.dayOfWeek.localized()).lowercase()}, ${dateOfStart.dayOfMonth} ${ + "${capitalizeFirstLetter(dateOfStart.dayOfWeek.localizedBySystem()).lowercase()}, ${dateOfStart.dayOfMonth} ${ MonthLocalizations.getMonthName(dateOfStart.month, Locale("ru")) .substring(0, 3) .lowercase() }" fun convertDateTimeToUiDateString(dateOfStart: LocalDate, dateOfEnd: LocalDate) = - ("${capitalizeFirstLetter(dateOfStart.dayOfWeek.localized()).lowercase()}, ${dateOfStart.dayOfMonth} ${ + ("${capitalizeFirstLetter(dateOfStart.dayOfWeek.localizedBySystem()).lowercase()}, ${dateOfStart.dayOfMonth} ${ MonthLocalizations.getMonthName(dateOfStart.month, Locale("ru")) .lowercase() } - " + - "${capitalizeFirstLetter(dateOfEnd.dayOfWeek.localized()).lowercase()}, ${dateOfEnd.dayOfMonth} ${ + "${capitalizeFirstLetter(dateOfEnd.dayOfWeek.localizedBySystem()).lowercase()}, ${dateOfEnd.dayOfMonth} ${ MonthLocalizations.getMonthName(dateOfEnd.month, Locale("ru")) .lowercase() }") diff --git a/contract/build.gradle.kts b/contract/build.gradle.kts index 433f163d476493c3df9fcd1c046ca7881b880bb1..4c916d71e43e93746b83651b7680cef0cc183257 100644 --- a/contract/build.gradle.kts +++ b/contract/build.gradle.kts @@ -1,4 +1,5 @@ import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties +import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { id(Plugins.AndroidLib.plugin) @@ -22,24 +23,24 @@ android { } compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } } kotlin { - android { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } - } - } + androidTarget() iosX64() iosArm64() iosSimulatorArm64() + tasks.withType().configureEach { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_17) + } + } + sourceSets { val commonMain by getting { dependencies { @@ -81,7 +82,7 @@ kotlin { } -val apiKey: String = gradleLocalProperties(rootDir).getProperty("apiKey") +val apiKey: String = gradleLocalProperties(rootDir, providers).getProperty("apiKey") buildConfig { buildConfigField("String", "apiKey", apiKey) buildConfigField( diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 76f7e2b6ef7016bdadc8309cb7489dcd3dd86fcb..32b2e21c8260ff9a0af9bff1cc8988495909677f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,7 +3,7 @@ avifCoderCoil = "1.7.5" retrofit-ver = "2.9.0" tv-ver="1.0.0-alpha04" moshi-ver="1.14.0" -hilt-var = "2.48" +hilt-var = "2.51.1" hilt-nav-var = "1.0.0" okhttp3-var = "4.10.0" retrofit-moshi = "2.9.0" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9ddde11c032199fc858356f6a5cfb874d39d127d..ba524f127a612e39eaaa576e421f3f667dd6bec3 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sun Nov 05 17:52:12 OMST 2023 +#Wed May 21 18:41:52 OMST 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/iosApp/Podfile b/iosApp/Podfile index a7bc921c55ecd4472f5befa53b2e1763a0221122..d9755d59e626367e17163d2c1e6a0e1a5f01155a 100644 --- a/iosApp/Podfile +++ b/iosApp/Podfile @@ -3,6 +3,7 @@ target 'iosApp' do platform :ios, '13' pod 'composeApp', :path => '../composeApp' pod 'sqlite3', '~> 3.42.0' + pod 'GoogleSignIn' end post_install do |installer| diff --git a/iosApp/iosApp/Info.plist b/iosApp/iosApp/Info.plist index 4db63ef242d73bdebfca7f212d56f49510daca3e..531c501bbcbbff664527501c8738045c05ef5648 100644 --- a/iosApp/iosApp/Info.plist +++ b/iosApp/iosApp/Info.plist @@ -15,6 +15,7 @@ CFBundleURLSchemes com.googleusercontent.apps.503255112190-a3n1441gcnl7alamoqkvk9omtv5q97tl + com.googleusercontent.apps.887306887525-e0rvceet062785b4gjq9kh0kh5qfm4if @@ -38,6 +39,8 @@ ITSAppUsesNonExemptEncryption + CADisableMinimumFrameDurationOnPhone + UIViewControllerBasedStatusBarAppearance diff --git a/modal_custom_dialog/build.gradle.kts b/modal_custom_dialog/build.gradle.kts index 2f07a1bff1c5924d057db961c1041d30465408b4..a63eb48a27178d5ce1861064b4693f34327ad6d7 100644 --- a/modal_custom_dialog/build.gradle.kts +++ b/modal_custom_dialog/build.gradle.kts @@ -1,7 +1,10 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + plugins { id(Plugins.Kotlin.plugin) id(Plugins.MultiplatformCompose.plugin) id(Plugins.AndroidLib.plugin) + id("org.jetbrains.kotlin.plugin.compose") version "2.1.0" } android { namespace = "band.effective.office.dialog" @@ -9,21 +12,25 @@ android { defaultConfig { minSdk = ConfigData.Android.minSdkVersion } -} -kotlin { - android { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } - } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } +} +kotlin { + androidTarget() iosX64() iosArm64() iosSimulatorArm64() + tasks.withType().configureEach { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_17) + } + } + sourceSets { val commonMain by getting { dependencies { diff --git a/tabletApp/build.gradle.kts b/tabletApp/build.gradle.kts index 91620a94a12a35765370b2f7ec31d28716dc52d4..300217a883ab09e75241e64ac72306945c2dbcb0 100644 --- a/tabletApp/build.gradle.kts +++ b/tabletApp/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + plugins { id(Plugins.Android.plugin) id(Plugins.MultiplatformCompose.plugin) @@ -5,6 +7,7 @@ plugins { id(Plugins.Parcelize.plugin) id(Plugins.Libres.plugin) id(Plugins.GoogleServices.plugin) + id("org.jetbrains.kotlin.plugin.compose") version "2.1.0" } android { @@ -24,8 +27,8 @@ android { res.srcDirs("src/androidMain/resources") } compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } signingConfigs { @@ -57,11 +60,11 @@ android { } kotlin { - android { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } + androidTarget() + + tasks.withType().configureEach { + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) } } diff --git a/tabletApp/features/core/build.gradle.kts b/tabletApp/features/core/build.gradle.kts index 228acf988c5ba3f37371ed004f294f660e5600f9..b826bdbf7671099940891b4fc9bf1fa2de6cbfa6 100644 --- a/tabletApp/features/core/build.gradle.kts +++ b/tabletApp/features/core/build.gradle.kts @@ -4,6 +4,7 @@ plugins { id(Plugins.Kotlin.plugin) id(Plugins.Libres.plugin) id(Plugins.Parcelize.plugin) + id("org.jetbrains.kotlin.plugin.compose") version "2.1.0" } android { @@ -14,14 +15,18 @@ android { res.srcDirs("src/androidMain/resources") res.srcDir("build/generated/libres/android/resources") } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } } kotlin { - android { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } + androidTarget() + + tasks.withType().configureEach { + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) } } diff --git a/tabletApp/features/core/src/commonMain/kotlin/band/effective/office/tablet/ui/bookingComponents/pickerDateTime/DatePickerView.kt b/tabletApp/features/core/src/commonMain/kotlin/band/effective/office/tablet/ui/bookingComponents/pickerDateTime/DatePickerView.kt index f3c8ccbd96a755fb9ec1b860f506561d0375b47b..181477c6eec3bc6da85fa387fb498ba9412e9185 100644 --- a/tabletApp/features/core/src/commonMain/kotlin/band/effective/office/tablet/ui/bookingComponents/pickerDateTime/DatePickerView.kt +++ b/tabletApp/features/core/src/commonMain/kotlin/band/effective/office/tablet/ui/bookingComponents/pickerDateTime/DatePickerView.kt @@ -30,7 +30,7 @@ import epicarchitect.calendar.compose.basis.BasisDayOfMonthContent import epicarchitect.calendar.compose.basis.BasisDayOfWeekContent import epicarchitect.calendar.compose.basis.config.LocalBasisEpicCalendarConfig import epicarchitect.calendar.compose.basis.contains -import epicarchitect.calendar.compose.basis.localized +import epicarchitect.calendar.compose.basis.localizedBySystem import epicarchitect.calendar.compose.basis.state.LocalBasisEpicCalendarState import epicarchitect.calendar.compose.datepicker.EpicDatePicker import epicarchitect.calendar.compose.datepicker.state.EpicDatePickerState @@ -154,7 +154,7 @@ private fun scrollMonth( private val CustomDayOfWeekContent: BasisDayOfWeekContent = { dayOfWeek -> val config = LocalBasisEpicCalendarConfig.current Text( - text = dayOfWeek.localized(), + text = dayOfWeek.localizedBySystem(), textAlign = TextAlign.Center, color = config.contentColor, style = header6, diff --git a/tabletApp/features/di/build.gradle.kts b/tabletApp/features/di/build.gradle.kts index 57f5b16017bf1bcb76c022094a138460f837e3b7..e4757f8f12e9e4a796b92a01804505224a6ff9bd 100644 --- a/tabletApp/features/di/build.gradle.kts +++ b/tabletApp/features/di/build.gradle.kts @@ -16,14 +16,18 @@ android { // res.srcDirs("src/androidMain/resources") // res.srcDir("build/generated/libres/android/resources") // } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } } kotlin { - android { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } + androidTarget() + + tasks.withType().configureEach { + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) } } diff --git a/tabletApp/features/domain/build.gradle.kts b/tabletApp/features/domain/build.gradle.kts index 5ea94ec65c4c0a0cfa1e5f6a048e34324aade6a3..701e8a217b82aff0ed71dfa171eea6fc9490f196 100644 --- a/tabletApp/features/domain/build.gradle.kts +++ b/tabletApp/features/domain/build.gradle.kts @@ -12,14 +12,18 @@ android { res.srcDirs("src/androidMain/resources") res.srcDir("build/generated/libres/android/resources") } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } } kotlin { - android { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } + androidTarget() + + tasks.withType().configureEach { + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) } } diff --git a/tabletApp/features/network/build.gradle.kts b/tabletApp/features/network/build.gradle.kts index 9b39af8a4fe700e2f5e8acc6b0905d7da591a76b..4482a1f0250de571e20e487c21f3f935729da770 100644 --- a/tabletApp/features/network/build.gradle.kts +++ b/tabletApp/features/network/build.gradle.kts @@ -12,14 +12,18 @@ android { res.srcDirs("src/androidMain/resources") res.srcDir("build/generated/libres/android/resources") } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } } kotlin { - android { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } + androidTarget() + + tasks.withType().configureEach { + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) } } diff --git a/tabletApp/features/roomInfo/build.gradle.kts b/tabletApp/features/roomInfo/build.gradle.kts index 09fcb5569b842fd64517f64c0adc5428281c6ee7..99e93f12afef83d5733f5c9c0ce20c3b000f666a 100644 --- a/tabletApp/features/roomInfo/build.gradle.kts +++ b/tabletApp/features/roomInfo/build.gradle.kts @@ -4,6 +4,7 @@ plugins { id(Plugins.Kotlin.plugin) id(Plugins.Parcelize.plugin) id(Plugins.Libres.plugin) + id("org.jetbrains.kotlin.plugin.compose") version "2.1.0" } android { @@ -14,14 +15,18 @@ android { res.srcDirs("src/androidMain/resources") res.srcDir("build/generated/libres/android/resources") } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } } kotlin { - android { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } + androidTarget() + + tasks.withType().configureEach { + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) } } diff --git a/tabletApp/features/selectRoom/build.gradle.kts b/tabletApp/features/selectRoom/build.gradle.kts index c3de95ee5730e1be91b1885098b0b0559b750083..73dd71278412e78f26838f4e8e4d0f49ee7879bf 100644 --- a/tabletApp/features/selectRoom/build.gradle.kts +++ b/tabletApp/features/selectRoom/build.gradle.kts @@ -4,6 +4,7 @@ plugins { id(Plugins.Kotlin.plugin) id(Plugins.Parcelize.plugin) id(Plugins.Libres.plugin) + id("org.jetbrains.kotlin.plugin.compose") version "2.1.0" } android { @@ -13,14 +14,18 @@ android { res.srcDirs("src/androidMain/resources") res.srcDir("build/generated/libres/android/resources") } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } } kotlin { - android { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } + androidTarget() + + tasks.withType().configureEach { + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) } } diff --git a/tvApp/build.gradle.kts b/tvApp/build.gradle.kts index e81ddf6a731bd7961f53342744ccafd8145be47a..f7b1df6ce33d09d50a3ecdd2c080da6812d37b98 100644 --- a/tvApp/build.gradle.kts +++ b/tvApp/build.gradle.kts @@ -6,8 +6,9 @@ plugins { id(libs.plugins.android.get().pluginId) kotlin("android") id("kotlin-kapt") - id("com.google.devtools.ksp").version("1.9.20-1.0.14") + id("com.google.devtools.ksp").version("2.1.21-2.0.1") alias(libs.plugins.hilt) + id("org.jetbrains.kotlin.plugin.compose") version "2.1.0" } val localProperties = Properties() diff --git a/wheel-picker-compose/build.gradle.kts b/wheel-picker-compose/build.gradle.kts index 9c6e99df01b04541cd3a08360942462a7ba6957f..8ef9ed99c33c051475f8e7089bb697b4397d3a1b 100644 --- a/wheel-picker-compose/build.gradle.kts +++ b/wheel-picker-compose/build.gradle.kts @@ -1,7 +1,10 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + plugins { id(Plugins.Kotlin.plugin) id(Plugins.MultiplatformCompose.plugin) id(Plugins.AndroidLib.plugin) + id("org.jetbrains.kotlin.plugin.compose") version "2.1.0" } android { @@ -10,17 +13,22 @@ android { defaultConfig { minSdk = ConfigData.Android.minSdkVersion } -} -kotlin { - android { - compilations.all { - kotlinOptions { - jvmTarget = "1.8" - } + tasks.withType().configureEach { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_17) } } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } +} + +kotlin { + androidTarget() + iosX64() iosArm64() iosSimulatorArm64()