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

Update Kotlin & dependencies #227

Merged
merged 10 commits into from
Oct 15, 2024
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -60,7 +58,6 @@ class MainActivity : ComponentActivity(), KoinComponent {
private val requestPermissionLauncher = registerForActivityResult(
ActivityResultContracts.RequestPermission()
) { isGranted: Boolean ->

}

override fun onCreate(savedInstanceState: Bundle?) {
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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) {
Expand Down
25 changes: 16 additions & 9 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi, ktor 3.0.0 just released yesterday

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't recommend upgrading to a major release before we publish Droidcon London. Who knows how many bugs there will be in the new version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't aware that we're publishing for Droidcon London. Makes sense

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment


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"
Expand All @@ -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"
KevinSchildhorn marked this conversation as resolved.
Show resolved Hide resolved
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"
Expand Down
4 changes: 4 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
1 change: 0 additions & 1 deletion shared-ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ kotlin {

implementation(libs.stately.common)
implementation(libs.koin.core)

implementation(compose.ui)
implementation(compose.foundation)
implementation(compose.material3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Loading