diff --git a/android/src/main/java/co/touchlab/droidcon/android/MainActivity.kt b/android/src/main/java/co/touchlab/droidcon/android/MainActivity.kt index e5b854cb..86e57adf 100644 --- a/android/src/main/java/co/touchlab/droidcon/android/MainActivity.kt +++ b/android/src/main/java/co/touchlab/droidcon/android/MainActivity.kt @@ -29,7 +29,6 @@ import androidx.lifecycle.lifecycleScope import androidx.lifecycle.repeatOnLifecycle import co.touchlab.droidcon.R import co.touchlab.droidcon.application.service.NotificationSchedulingService -import co.touchlab.droidcon.application.service.NotificationService import co.touchlab.droidcon.domain.service.AnalyticsService import co.touchlab.droidcon.domain.service.SyncService import co.touchlab.droidcon.service.AndroidNotificationService @@ -38,7 +37,6 @@ import co.touchlab.droidcon.ui.util.MainView import co.touchlab.droidcon.util.AppChecker import co.touchlab.droidcon.util.NavigationController import co.touchlab.droidcon.viewmodel.ApplicationViewModel -import co.touchlab.kermit.Logger import kotlinx.coroutines.awaitCancellation import kotlinx.coroutines.delay import kotlinx.coroutines.launch @@ -60,7 +58,6 @@ class MainActivity : ComponentActivity(), KoinComponent { private val requestPermissionLauncher = registerForActivityResult( ActivityResultContracts.RequestPermission() ) { isGranted: Boolean -> - } override fun onCreate(savedInstanceState: Bundle?) { @@ -158,7 +155,6 @@ class MainActivity : ComponentActivity(), KoinComponent { private fun askNotificationPermission() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { if (ContextCompat.checkSelfPermission(this, Manifest.permission.POST_NOTIFICATIONS) == PackageManager.PERMISSION_GRANTED) { - } else if (false && shouldShowRequestPermissionRationale(Manifest.permission.POST_NOTIFICATIONS)) { // TODO: display an educational UI explaining to the user the features that will be enabled // by them granting the POST_NOTIFICATION permission. This UI should provide the user diff --git a/android/src/main/java/co/touchlab/droidcon/android/service/impl/DefaultFirebaseMessagingService.kt b/android/src/main/java/co/touchlab/droidcon/android/service/impl/DefaultFirebaseMessagingService.kt index 7f9f0602..2fce49a7 100644 --- a/android/src/main/java/co/touchlab/droidcon/android/service/impl/DefaultFirebaseMessagingService.kt +++ b/android/src/main/java/co/touchlab/droidcon/android/service/impl/DefaultFirebaseMessagingService.kt @@ -1,7 +1,6 @@ package co.touchlab.droidcon.android.service.impl import android.app.NotificationManager -import android.os.Build import androidx.core.app.NotificationCompat import androidx.core.content.getSystemService import co.touchlab.droidcon.application.service.Notification @@ -13,7 +12,7 @@ import kotlinx.coroutines.launch import org.koin.android.ext.android.inject import org.koin.core.component.inject -class DefaultFirebaseMessagingService: FirebaseMessagingService() { +class DefaultFirebaseMessagingService : FirebaseMessagingService() { private val notificationService: AndroidNotificationService by inject() override fun onNewToken(token: String) { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b09f5a0f..bad9ff8a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,24 +6,29 @@ compileSdk = "34" # Dependencies kotlin = "2.0.10" -android-gradle-plugin = "8.2.2" -coroutines = "1.8.1" + +## Gradle Plugin version must be compatible with Multiplatform +## https://kotlinlang.org/docs/multiplatform-compatibility-guide.html#version-compatibility +android-gradle-plugin = "8.5.2" +coroutines = "1.9.0" kotlinx-datetime = "0.6.0" -ktor = "2.3.11" +# TODO: Update Ktor library to 3.0 +ktor = "2.3.12" stately = "2.0.6" -java = "17" +java = "21" kermit = "2.0.4" sqliter = "1.3.1" hyperdrive = "0.1.148" multiplatformSettings = "1.1.1" -sqlDelight = "2.0.1" -firebase-bom = "33.1.2" +sqlDelight = "2.0.2" +firebase-bom = "33.4.0" firebase-crashlytics-gradle = "3.0.2" gms-google-services = "4.4.2" +# TODO: Update Compose libraries. There is currently a conflicing issue with the HorizontalPager compose-androidx-ui = "1.6.8" compose-compiler = "1.5.15" composeNavigation = "2.7.7" @@ -38,12 +43,14 @@ korio = "4.0.10" # Sample - Android androidx-core = "1.13.1" -androidx-lifecycle = "2.8.4" -androidx-activity-compose = "1.9.1" -android-desugaring = "2.0.4" +androidx-lifecycle = "2.8.6" +androidx-activity-compose = "1.9.2" +android-desugaring = "2.1.2" koin = "3.5.3" uuid = "0.8.3" +# TODO: Update Ktlint when fix is available ktlint = "11.0.0" +# TODO: Update Coil library when Ktor is updated to 3.0 coil = "3.0.0-alpha04" zoomimage = "1.1.0-alpha06" skie = "0.9.0-RC.1" diff --git a/settings.gradle.kts b/settings.gradle.kts index 90d3abf2..a94d8087 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -17,6 +17,10 @@ dependencyResolutionManagement { } } +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0") +} + include(":shared", ":shared-ui", ":android", ":ios") rootProject.name = "Droidcon" diff --git a/shared-ui/build.gradle.kts b/shared-ui/build.gradle.kts index 3f9cb943..bad22df6 100644 --- a/shared-ui/build.gradle.kts +++ b/shared-ui/build.gradle.kts @@ -87,7 +87,6 @@ kotlin { implementation(libs.stately.common) implementation(libs.koin.core) - implementation(compose.ui) implementation(compose.foundation) implementation(compose.material3) diff --git a/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/settings/PlatformSpecificSettings.kt b/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/settings/PlatformSpecificSettings.kt index b9e447f3..629b1226 100644 --- a/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/settings/PlatformSpecificSettings.kt +++ b/shared-ui/src/androidMain/kotlin/co/touchlab/droidcon/ui/settings/PlatformSpecificSettings.kt @@ -8,7 +8,6 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.platform.LocalContext import co.touchlab.droidcon.Constants import co.touchlab.droidcon.viewmodel.settings.SettingsViewModel -import kotlinx.coroutines.currentCoroutineContext @Composable internal actual fun PlatformSpecificSettingsView(viewModel: SettingsViewModel) { diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SessionDetailView.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SessionDetailView.kt index bd92a9c7..8305c902 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SessionDetailView.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SessionDetailView.kt @@ -37,7 +37,6 @@ import androidx.compose.runtime.getValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip -import androidx.compose.ui.graphics.Color import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.text.font.FontStyle import androidx.compose.ui.text.font.FontWeight diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SessionListView.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SessionListView.kt index 45e7cec9..d3b42cf5 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SessionListView.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/session/SessionListView.kt @@ -2,7 +2,6 @@ package co.touchlab.droidcon.ui.session import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.background -import androidx.compose.foundation.interaction.DragInteraction import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -14,7 +13,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.foundation.lazy.LazyColumn -import androidx.compose.foundation.lazy.LazyRow import androidx.compose.foundation.lazy.items import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.foundation.pager.HorizontalPager @@ -36,7 +34,6 @@ import androidx.compose.material3.TopAppBarDefaults import androidx.compose.material3.rememberTopAppBarState import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect -import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember diff --git a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/settings/SettingsView.kt b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/settings/SettingsView.kt index 49d76c88..dab5b8bb 100644 --- a/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/settings/SettingsView.kt +++ b/shared-ui/src/commonMain/kotlin/co.touchlab.droidcon/ui/settings/SettingsView.kt @@ -11,8 +11,6 @@ import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.MailOutline import androidx.compose.material.icons.filled.Notifications -import androidx.compose.material3.Button -import androidx.compose.material3.Divider import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon diff --git a/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/ComposeRootController.kt b/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/ComposeRootController.kt index 9b7239aa..92cb70d7 100644 --- a/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/ComposeRootController.kt +++ b/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/ComposeRootController.kt @@ -2,9 +2,7 @@ package co.touchlab.droidcon.ui import androidx.compose.ui.window.ComposeUIViewController import co.touchlab.droidcon.ui.venue.VenueBodyView -import co.touchlab.droidcon.ui.venue.VenueView import co.touchlab.droidcon.viewmodel.ApplicationViewModel -import droidcon.shared_ui.generated.resources.venue_map_1 @Suppress("unused") fun getRootController(viewModel: ApplicationViewModel) = ComposeUIViewController { diff --git a/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/settings/PlatformSpecificSettings.kt b/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/settings/PlatformSpecificSettings.kt index 4d983d41..5cf082a5 100644 --- a/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/settings/PlatformSpecificSettings.kt +++ b/shared-ui/src/iosMain/kotlin/co/touchlab/droidcon/ui/settings/PlatformSpecificSettings.kt @@ -3,7 +3,6 @@ package co.touchlab.droidcon.ui.settings import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Aod import androidx.compose.material3.Button -import androidx.compose.material3.Divider import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Text import androidx.compose.runtime.Composable diff --git a/shared/src/androidMain/kotlin/co/touchlab/droidcon/service/AndroidNotificationService.kt b/shared/src/androidMain/kotlin/co/touchlab/droidcon/service/AndroidNotificationService.kt index 9619cd58..78b26813 100644 --- a/shared/src/androidMain/kotlin/co/touchlab/droidcon/service/AndroidNotificationService.kt +++ b/shared/src/androidMain/kotlin/co/touchlab/droidcon/service/AndroidNotificationService.kt @@ -17,7 +17,6 @@ import co.touchlab.droidcon.domain.service.SyncService import co.touchlab.droidcon.shared.R import co.touchlab.droidcon.util.IdentifiableIntent import co.touchlab.kermit.Logger -import com.russhwolf.settings.ExperimentalSettingsApi import com.russhwolf.settings.ObservableSettings import com.russhwolf.settings.get import com.russhwolf.settings.set diff --git a/shared/src/commonMain/kotlin/co/touchlab/droidcon/application/service/Notification.kt b/shared/src/commonMain/kotlin/co/touchlab/droidcon/application/service/Notification.kt index c337b453..4a4cfdb7 100644 --- a/shared/src/commonMain/kotlin/co/touchlab/droidcon/application/service/Notification.kt +++ b/shared/src/commonMain/kotlin/co/touchlab/droidcon/application/service/Notification.kt @@ -5,18 +5,18 @@ import co.touchlab.droidcon.domain.entity.Session sealed interface Notification { sealed interface DeepLink : Notification - sealed interface Local: Notification { + sealed interface Local : Notification { data class Reminder( val sessionId: Session.Id, - ): Local, DeepLink + ) : Local, DeepLink data class Feedback( val sessionId: Session.Id, - ): Local, DeepLink + ) : Local, DeepLink } - sealed interface Remote: Notification { - data object RefreshData: Remote + sealed interface Remote : Notification { + data object RefreshData : Remote } object Keys { diff --git a/shared/src/commonMain/kotlin/co/touchlab/droidcon/application/service/impl/DefaultNotificationSchedulingService.kt b/shared/src/commonMain/kotlin/co/touchlab/droidcon/application/service/impl/DefaultNotificationSchedulingService.kt index d804b4d2..2363e53b 100644 --- a/shared/src/commonMain/kotlin/co/touchlab/droidcon/application/service/impl/DefaultNotificationSchedulingService.kt +++ b/shared/src/commonMain/kotlin/co/touchlab/droidcon/application/service/impl/DefaultNotificationSchedulingService.kt @@ -9,7 +9,6 @@ import co.touchlab.droidcon.domain.entity.Session import co.touchlab.droidcon.domain.repository.RoomRepository import co.touchlab.droidcon.domain.repository.SessionRepository import co.touchlab.droidcon.domain.service.DateTimeService -import com.russhwolf.settings.ExperimentalSettingsApi import com.russhwolf.settings.ObservableSettings import com.russhwolf.settings.set import kotlinx.coroutines.coroutineScope diff --git a/shared/src/commonMain/kotlin/co/touchlab/droidcon/domain/service/impl/DefaultSyncService.kt b/shared/src/commonMain/kotlin/co/touchlab/droidcon/domain/service/impl/DefaultSyncService.kt index 01fd9806..4e72b7f3 100644 --- a/shared/src/commonMain/kotlin/co/touchlab/droidcon/domain/service/impl/DefaultSyncService.kt +++ b/shared/src/commonMain/kotlin/co/touchlab/droidcon/domain/service/impl/DefaultSyncService.kt @@ -22,7 +22,6 @@ import co.touchlab.droidcon.domain.service.impl.dto.SpeakersDto.LinkType import co.touchlab.droidcon.domain.service.impl.dto.SponsorSessionsDto import co.touchlab.droidcon.domain.service.impl.dto.SponsorsDto import co.touchlab.kermit.Logger -import com.russhwolf.settings.ExperimentalSettingsApi import com.russhwolf.settings.ObservableSettings import com.russhwolf.settings.get import com.russhwolf.settings.set diff --git a/shared/src/iosMain/kotlin/co/touchlab/droidcon/util/wrapMultiThreadCallback.kt b/shared/src/iosMain/kotlin/co/touchlab/droidcon/util/wrapMultiThreadCallback.kt index 32221566..a313cf03 100644 --- a/shared/src/iosMain/kotlin/co/touchlab/droidcon/util/wrapMultiThreadCallback.kt +++ b/shared/src/iosMain/kotlin/co/touchlab/droidcon/util/wrapMultiThreadCallback.kt @@ -1,6 +1,5 @@ package co.touchlab.droidcon.util -import co.touchlab.stately.freeze import kotlinx.coroutines.CompletableDeferred // Closures crash because of multi-thread execution, these methods prevent that.