Skip to content

Commit

Permalink
Update Dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
swapnil-musale committed Jun 15, 2024
1 parent f21fdc4 commit c873493
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 16 deletions.
11 changes: 7 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ android {
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
signingConfig = signingConfigs.getByName("debug")
}
getByName("debug") {
isDebuggable = true
Expand Down Expand Up @@ -65,16 +66,18 @@ dependencies {
implementation(projects.domain)
implementation(projects.data)

implementation(libs.bundles.androidx.compose.bom)
implementation(platform(libs.kotlin.bom))
implementation(libs.bundles.androidx.compose.bom)

implementation(libs.core.ktx)
implementation(libs.androidx.splashScreen)
implementation(libs.activity.compose)
implementation(libs.compose.navigation)
implementation(libs.compose.lifecycle)
implementation(libs.androidx.splashScreen)
implementation(libs.androidx.lifecycle)

implementation(libs.compose.lifecycle)
implementation(libs.compose.viewmodel)
implementation(libs.compose.navigation)

implementation(libs.hilt.android)
implementation(libs.hilt.navigation)
ksp(libs.hilt.compiler)
Expand Down
7 changes: 6 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,9 @@
# see https://github.com/square/retrofit/issues/3751
-keep,allowobfuscation,allowshrinking interface retrofit2.Call
-keep,allowobfuscation,allowshrinking class retrofit2.Response
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation

# Please add these rules to your existing keep rules in order to suppress warnings.
# This is generated automatically by the Android Gradle plugin.
-dontwarn com.devx.data.repository.JokeRepositoryImpl
-dontwarn com.devx.data.source.remote.JokeApi
4 changes: 1 addition & 3 deletions app/src/main/java/com/devx/jetjoke/navigation/AppNavGraph.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.devx.jetjoke.navigation

import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalLifecycleOwner
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.navigation.compose.NavHost
Expand All @@ -20,8 +19,7 @@ fun AppNavGraph() {
) {
composable(route = ScreenRoute.HomeScreen.route) {
val homeViewModel: HomeViewModel = hiltViewModel()
val uiState =
homeViewModel.uiState.collectAsStateWithLifecycle(lifecycleOwner = LocalLifecycleOwner.current)
val uiState = homeViewModel.uiState.collectAsStateWithLifecycle()

HomeScreen(
uiState = uiState.value,
Expand Down
6 changes: 4 additions & 2 deletions app/src/main/java/com/devx/jetjoke/navigation/ScreenRoute.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.devx.jetjoke.navigation

sealed class ScreenRoute(val route: String) {
object HomeScreen : ScreenRoute(route = "home")
sealed class ScreenRoute(
val route: String,
) {
data object HomeScreen : ScreenRoute(route = "home")
}
5 changes: 4 additions & 1 deletion data/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@
# see https://github.com/square/retrofit/issues/3751
-keep,allowobfuscation,allowshrinking interface retrofit2.Call
-keep,allowobfuscation,allowshrinking class retrofit2.Response
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation

-dontwarn com.devx.data.repository.JokeRepositoryImpl
-dontwarn com.devx.data.source.remote.JokeApi
2 changes: 2 additions & 0 deletions data/src/main/java/com/devx/data/model/JokeResponseDto.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import androidx.annotation.Keep
import com.devx.domain.model.JokeResponse
import com.devx.domain.util.Mapper
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass

@Keep
@JsonClass(generateAdapter = true)
data class JokeResponseDto(

@field:Json(name = "delivery")
Expand Down
12 changes: 7 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
[versions]

# Plugin Version
androidGradlePlugin = "8.4.1"
androidLibrary = "8.4.1"
androidGradlePlugin = "8.5.0"
androidLibrary = "8.5.0"
kotlin = "2.0.0"
jvmTarget = "1.8"
kotlinKsp = "2.0.0-1.0.22"
detektVersion = "1.23.6"

# Library Version
kotlinBOM = "2.0.0"
composeBOM = "2024.05.00"
composeBOM = "2024.06.00"

coreKtx = "1.13.1"
composeViewmodel = "2.8.2"
splashScreen = "1.0.1"
activityCompose = "1.9.0"
composeNavigation = "2.7.7"
androidXLifecycle = "2.8.1"
androidXLifecycle = "2.8.2"
androidMaterial3 = "1.2.1"
hiltAndroid = "2.51.1"
retrofit = "2.11.0"
Expand Down Expand Up @@ -44,11 +45,12 @@ compose-navigation = { module = "androidx.navigation:navigation-compose", versio

# Compose
compose-bom = { module = "androidx.compose:compose-bom", version.ref = "composeBOM" }
androidx-material3 = { module = "androidx.compose.material3:material3", version.ref = "androidMaterial3" }
ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
compose-ui = { module = "androidx.compose.ui:ui" }
compose-ui-graphics = { module = "androidx.compose.ui:ui-graphics" }
compose-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }
compose-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "composeViewmodel" }
androidx-material3 = { module = "androidx.compose.material3:material3", version.ref = "androidMaterial3" }

# Hilt
hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hiltAndroid" }
Expand Down

0 comments on commit c873493

Please sign in to comment.