From d5abbb5e9f14de94888218ddf32fd4d50f0127f0 Mon Sep 17 00:00:00 2001 From: Gerard Paligot Date: Sat, 6 Apr 2024 23:26:42 +0200 Subject: [PATCH] refactor(openfeedback): Update SDK to KMP version. Closes #95 --- .../java/org/gdglille/devfest/android/MainApplication.kt | 2 +- .../plugins/src/main/kotlin/extensions/KotlinAndroid.kt | 2 +- gradle/libs.versions.toml | 4 ++-- .../kotlin/org/gdglille/devfest/android/theme/Main.kt | 2 +- .../org/gdglille/devfest/android/theme/MainNavigation.kt | 2 +- .../m3/schedules/feature/ScheduleDetailOrientableVM.kt | 4 ++-- .../android/theme/m3/schedules/screens/FeedbackScreen.kt | 6 +++--- .../schedules/screens/ScheduleDetailOrientableScreen.kt | 8 ++++---- .../theme/m3/schedules/screens/ScheduleDetailScreen.kt | 2 +- .../theme/m3/schedules/ui/schedule/OpenFeedbackSection.kt | 4 ++-- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/androidApp/src/main/java/org/gdglille/devfest/android/MainApplication.kt b/androidApp/src/main/java/org/gdglille/devfest/android/MainApplication.kt index a1ded8413..b5ec19eee 100644 --- a/androidApp/src/main/java/org/gdglille/devfest/android/MainApplication.kt +++ b/androidApp/src/main/java/org/gdglille/devfest/android/MainApplication.kt @@ -6,7 +6,7 @@ import coil.ImageLoaderFactory import coil.decode.SvgDecoder import coil.disk.DiskCache import coil.memory.MemoryCache -import io.openfeedback.android.viewmodels.OpenFeedbackFirebaseConfig +import io.openfeedback.viewmodels.OpenFeedbackFirebaseConfig import org.gdglille.devfest.android.di.appModule import org.koin.android.ext.koin.androidContext import org.koin.androidx.workmanager.koin.workManagerFactory diff --git a/build-logic/plugins/src/main/kotlin/extensions/KotlinAndroid.kt b/build-logic/plugins/src/main/kotlin/extensions/KotlinAndroid.kt index b740e5848..e997c82d2 100644 --- a/build-logic/plugins/src/main/kotlin/extensions/KotlinAndroid.kt +++ b/build-logic/plugins/src/main/kotlin/extensions/KotlinAndroid.kt @@ -16,7 +16,7 @@ internal fun configureKotlinAndroid( compileSdk = 34 defaultConfig { - minSdk = 21 + minSdk = 23 } compileOptions { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 37476be0d..670694357 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -40,7 +40,7 @@ koin = "3.5.3" ktlint = "11.5.1" ktor = "2.3.3" logback = "1.3.5" -openfeedback = "1.0.0-SNAPSHOT" +openfeedback = "0.2.2" richtext-commonmark = "0.11.0" squareup-okio = "3.7.0" settings = "0.8.1" @@ -136,7 +136,7 @@ ktlint-gradlePlugin = { group = "org.jlleitschuh.gradle", name = "ktlint-gradle" logback = { group = "ch.qos.logback", name = "logback-classic", version.ref = "logback" } -openfeedback-m3 = { group = "io.openfeedback", name = "feedback-android-sdk-m3", version.ref = "openfeedback" } +openfeedback-m3 = { group = "io.openfeedback", name = "openfeedback-m3", version.ref = "openfeedback" } richtext-commonmark = { group = "com.halilibo.compose-richtext", name = "richtext-commonmark", version.ref = "richtext-commonmark" } diff --git a/theme-m3/main/main/src/main/kotlin/org/gdglille/devfest/android/theme/Main.kt b/theme-m3/main/main/src/main/kotlin/org/gdglille/devfest/android/theme/Main.kt index 5eaf3ade3..d989a233a 100644 --- a/theme-m3/main/main/src/main/kotlin/org/gdglille/devfest/android/theme/Main.kt +++ b/theme-m3/main/main/src/main/kotlin/org/gdglille/devfest/android/theme/Main.kt @@ -3,7 +3,7 @@ package org.gdglille.devfest.android.theme import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState import androidx.navigation.NavHostController -import io.openfeedback.android.viewmodels.OpenFeedbackFirebaseConfig +import io.openfeedback.viewmodels.OpenFeedbackFirebaseConfig import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.FlowPreview import org.gdglille.devfest.android.theme.m3.style.Conferences4HallTheme diff --git a/theme-m3/main/main/src/main/kotlin/org/gdglille/devfest/android/theme/MainNavigation.kt b/theme-m3/main/main/src/main/kotlin/org/gdglille/devfest/android/theme/MainNavigation.kt index c8d6212df..a681a9997 100644 --- a/theme-m3/main/main/src/main/kotlin/org/gdglille/devfest/android/theme/MainNavigation.kt +++ b/theme-m3/main/main/src/main/kotlin/org/gdglille/devfest/android/theme/MainNavigation.kt @@ -25,7 +25,7 @@ import androidx.navigation.compose.currentBackStackEntryAsState import androidx.navigation.compose.rememberNavController import androidx.navigation.navArgument import androidx.navigation.navDeepLink -import io.openfeedback.android.viewmodels.OpenFeedbackFirebaseConfig +import io.openfeedback.viewmodels.OpenFeedbackFirebaseConfig import org.gdglille.devfest.android.theme.m3.events.feature.EventListVM import org.gdglille.devfest.android.theme.m3.infos.feature.InfoCompactVM import org.gdglille.devfest.android.theme.m3.infos.feature.TicketQrCodeScanner diff --git a/theme-m3/schedules/schedules-feature/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/feature/ScheduleDetailOrientableVM.kt b/theme-m3/schedules/schedules-feature/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/feature/ScheduleDetailOrientableVM.kt index 089fbd13a..73064c074 100644 --- a/theme-m3/schedules/schedules-feature/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/feature/ScheduleDetailOrientableVM.kt +++ b/theme-m3/schedules/schedules-feature/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/feature/ScheduleDetailOrientableVM.kt @@ -5,11 +5,11 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState import androidx.compose.ui.Modifier -import io.openfeedback.android.viewmodels.OpenFeedbackFirebaseConfig -import org.gdglille.devfest.android.theme.m3.schedules.screens.ScheduleDetailOrientableScreen +import io.openfeedback.viewmodels.OpenFeedbackFirebaseConfig import org.gdglille.devfest.android.shared.resources.Resource import org.gdglille.devfest.android.shared.resources.text_error import org.gdglille.devfest.android.shared.resources.text_loading +import org.gdglille.devfest.android.theme.m3.schedules.screens.ScheduleDetailOrientableScreen import org.jetbrains.compose.resources.ExperimentalResourceApi import org.jetbrains.compose.resources.stringResource import org.koin.androidx.compose.koinViewModel diff --git a/theme-m3/schedules/schedules-screens/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/screens/FeedbackScreen.kt b/theme-m3/schedules/schedules-screens/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/screens/FeedbackScreen.kt index bd94f4623..7ddd61fc1 100644 --- a/theme-m3/schedules/schedules-screens/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/screens/FeedbackScreen.kt +++ b/theme-m3/schedules/schedules-screens/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/screens/FeedbackScreen.kt @@ -9,11 +9,11 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import io.openfeedback.android.viewmodels.OpenFeedbackFirebaseConfig -import org.gdglille.devfest.android.theme.m3.schedules.ui.schedule.OpenFeedbackSection +import io.openfeedback.viewmodels.OpenFeedbackFirebaseConfig import org.gdglille.devfest.android.shared.resources.Resource -import org.gdglille.devfest.android.theme.m3.style.SpacingTokens import org.gdglille.devfest.android.shared.resources.text_feedback_not_configured +import org.gdglille.devfest.android.theme.m3.schedules.ui.schedule.OpenFeedbackSection +import org.gdglille.devfest.android.theme.m3.style.SpacingTokens import org.gdglille.devfest.android.theme.m3.style.toDp import org.jetbrains.compose.resources.ExperimentalResourceApi import org.jetbrains.compose.resources.stringResource diff --git a/theme-m3/schedules/schedules-screens/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/screens/ScheduleDetailOrientableScreen.kt b/theme-m3/schedules/schedules-screens/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/screens/ScheduleDetailOrientableScreen.kt index 113ac29e3..ed3e5dcc6 100644 --- a/theme-m3/schedules/schedules-screens/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/screens/ScheduleDetailOrientableScreen.kt +++ b/theme-m3/schedules/schedules-screens/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/screens/ScheduleDetailOrientableScreen.kt @@ -13,14 +13,14 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.platform.LocalConfiguration -import io.openfeedback.android.viewmodels.OpenFeedbackFirebaseConfig +import io.openfeedback.viewmodels.OpenFeedbackFirebaseConfig import kotlinx.collections.immutable.persistentListOf -import org.gdglille.devfest.android.theme.m3.navigation.TopActions import org.gdglille.devfest.android.shared.resources.Resource -import org.gdglille.devfest.android.theme.m3.style.actions.TopActionsUi -import org.gdglille.devfest.android.theme.m3.style.appbars.TopAppBar import org.gdglille.devfest.android.shared.resources.input_share_talk import org.gdglille.devfest.android.shared.resources.screen_schedule_detail +import org.gdglille.devfest.android.theme.m3.navigation.TopActions +import org.gdglille.devfest.android.theme.m3.style.actions.TopActionsUi +import org.gdglille.devfest.android.theme.m3.style.appbars.TopAppBar import org.gdglille.devfest.models.ui.TalkUi import org.jetbrains.compose.resources.ExperimentalResourceApi import org.jetbrains.compose.resources.stringResource diff --git a/theme-m3/schedules/schedules-screens/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/screens/ScheduleDetailScreen.kt b/theme-m3/schedules/schedules-screens/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/screens/ScheduleDetailScreen.kt index 6e8ffe78a..b74769a7c 100644 --- a/theme-m3/schedules/schedules-screens/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/screens/ScheduleDetailScreen.kt +++ b/theme-m3/schedules/schedules-screens/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/screens/ScheduleDetailScreen.kt @@ -16,7 +16,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalInspectionMode import androidx.compose.ui.tooling.preview.Preview -import io.openfeedback.android.viewmodels.OpenFeedbackFirebaseConfig +import io.openfeedback.viewmodels.OpenFeedbackFirebaseConfig import org.gdglille.devfest.android.theme.m3.schedules.ui.schedule.OpenFeedbackSection import org.gdglille.devfest.android.theme.m3.schedules.ui.schedule.TalkAbstract import org.gdglille.devfest.android.theme.m3.schedules.ui.schedule.TalkSection diff --git a/theme-m3/schedules/schedules-ui/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/ui/schedule/OpenFeedbackSection.kt b/theme-m3/schedules/schedules-ui/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/ui/schedule/OpenFeedbackSection.kt index 3063c288a..3da8fe70c 100644 --- a/theme-m3/schedules/schedules-ui/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/ui/schedule/OpenFeedbackSection.kt +++ b/theme-m3/schedules/schedules-ui/src/main/kotlin/org/gdglille/devfest/android/theme/m3/schedules/ui/schedule/OpenFeedbackSection.kt @@ -8,8 +8,8 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.text.TextStyle import androidx.compose.ui.unit.dp -import io.openfeedback.android.m3.OpenFeedback -import io.openfeedback.android.viewmodels.OpenFeedbackFirebaseConfig +import io.openfeedback.m3.OpenFeedback +import io.openfeedback.viewmodels.OpenFeedbackFirebaseConfig import org.gdglille.devfest.android.shared.resources.Resource import org.gdglille.devfest.android.shared.resources.text_openfeedback_title import org.jetbrains.compose.resources.ExperimentalResourceApi