Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
floschu committed Oct 18, 2024
1 parent 59bd7f9 commit 8201e74
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 57 deletions.
76 changes: 32 additions & 44 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
plugins {
id "com.android.application"
id "org.jetbrains.kotlin.android"
alias libs.plugins.android.application
alias libs.plugins.kotlin.android
alias libs.plugins.kotlin.compose
alias libs.plugins.kotlin.serialization
alias libs.plugins.ksp
alias libs.plugins.ktlint
id "kotlin-parcelize"
id "org.jlleitschuh.gradle.ktlint"
id "kotlinx-serialization"
id "com.google.devtools.ksp"
}

android {
Expand All @@ -18,7 +19,6 @@ android {
versionCode 1
versionName "0.1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
Expand All @@ -33,7 +33,7 @@ android {
}
release {
debuggable false
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
}
}
Expand All @@ -48,9 +48,6 @@ android {
compose true
buildConfig true
}
composeOptions {
kotlinCompilerExtensionVersion "1.5.1"
}
packagingOptions {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
Expand All @@ -60,43 +57,34 @@ android {
}

dependencies {
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.9.0"))
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.4.0")
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0-RC"

implementation("androidx.core:core-ktx:1.10.1")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.6.1")
implementation("androidx.lifecycle:lifecycle-process:2.6.1")
implementation("androidx.activity:activity-compose:1.7.2")
implementation("androidx.core:core-splashscreen:1.0.1")
implementation(platform(libs.kotlin.bom))
implementation(libs.kotlinx.datetime)
implementation(libs.kotlinx.serialization.json)

implementation("androidx.browser:browser:1.6.0")
implementation("androidx.datastore:datastore-preferences:1.0.0")
implementation(libs.core.ktx)
implementation(libs.lifecycle.runtime.ktx)
implementation(libs.lifecycle.runtime.compose)
implementation(libs.lifecycle.process)
implementation(libs.activity.compose)
implementation(libs.core.splashscreen)

implementation(platform("androidx.compose:compose-bom:2023.06.01"))
implementation("androidx.compose.animation:animation")
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3")
implementation("androidx.compose.material:material-icons-extended")
implementation("androidx.constraintlayout:constraintlayout-compose:1.0.1")
implementation(platform(libs.compose.bom))
implementation(libs.animation)
implementation(libs.material3)
implementation(libs.material.icons.extended)

def room_version = "2.5.2"
implementation("androidx.room:room-runtime:$room_version")
implementation("androidx.room:room-ktx:$room_version")
ksp("androidx.room:room-compiler:$room_version")
implementation(libs.ui.tooling.preview)
debugImplementation(libs.ui.tooling)
debugImplementation(libs.ui.test.manifest)

implementation("dev.olshevski.navigation:reimagined:1.4.0")
implementation("dev.olshevski.navigation:reimagined-material3:1.4.0")
implementation("com.airbnb.android:lottie-compose:6.0.1")
implementation(libs.reimagined)
implementation(libs.reimagined.material3)
implementation(libs.lottie.compose)

debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")
implementation(libs.browser)
implementation(libs.datastore.preferences)

implementation("androidx.work:work-runtime-ktx:2.8.1")
implementation("androidx.health.connect:connect-client:1.1.0-alpha03")

testImplementation("junit:junit:4.13.2")
}
implementation(libs.room.runtime)
implementation(libs.room.ktx)
ksp(libs.room.compiler)
}
3 changes: 2 additions & 1 deletion app/src/main/java/at/florianschuster/hydro/AppStore.kt
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ class AppStore(
.launchIn(scope)
}

@Suppress("OPT_IN_USAGE")
dateChangedService.onChanged
.flatMapLatest { localDate -> hydrationHistoryStore.day(localDate) }
.onEach { day ->
Expand Down Expand Up @@ -224,7 +225,7 @@ class AppStore(
todayMilliliters = todayMilliliters,
todayProgress = _state.value.hydrationProgress,
selectedCups = selectedCups,
liquidUnit = liquidUnit,
liquidUnit = liquidUnit
)
}
}
Expand Down
12 changes: 7 additions & 5 deletions app/src/main/java/at/florianschuster/hydro/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.slideInVertically
import androidx.compose.animation.slideOutVertically
import androidx.compose.animation.with
import androidx.compose.animation.togetherWith
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Surface
Expand Down Expand Up @@ -83,15 +83,17 @@ class MainActivity : ComponentActivity() {
transitionSpec = { action, _, _ ->
when (action) {
is NavAction.Pop -> {
fadeIn() with slideOutVertically(
fadeIn() togetherWith slideOutVertically(
targetOffsetY = { fullHeight -> fullHeight }
) + fadeOut()
}

is NavAction.Navigate -> {
slideInVertically(
initialOffsetY = { fullHeight -> fullHeight }
) + fadeIn() with fadeOut()
(
slideInVertically(
initialOffsetY = { fullHeight -> fullHeight }
) + fadeIn()
) togetherWith fadeOut()
}

else -> error("no transition defined for $action")
Expand Down
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id "com.android.application" version "8.1.0" apply false
id "org.jetbrains.kotlin.android" version "1.9.0" apply false
id "org.jetbrains.kotlin.plugin.serialization" version "1.9.0" apply false
id "com.google.devtools.ksp" version "1.9.0-1.0.13" apply false
id "org.jlleitschuh.gradle.ktlint" version "11.3.2" apply false
alias libs.plugins.android.application apply false
alias libs.plugins.kotlin.android apply false
alias libs.plugins.kotlin.compose apply false
alias libs.plugins.kotlin.serialization apply false
alias libs.plugins.ksp apply false
alias libs.plugins.ktlint apply false
}
49 changes: 49 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[versions]
activityCompose = "1.9.3"
browser = "1.8.0"
composeBom = "2024.10.00"
coreKtx = "1.13.1"
coreSplashscreen = "1.0.1"
datastorePreferences = "1.1.1"
kotlin = "2.0.20"
kotlinxDatetime = "0.4.1"
kotlinxSerializationJson = "1.7.0"
lifecycle = "2.8.6"
lottieCompose = "6.0.1"
navigationReimagined = "1.5.0"
room = "2.6.1"
androidGradlePlugin = "8.6.1"

[libraries]
activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" }
animation = { module = "androidx.compose.animation:animation" }
browser = { module = "androidx.browser:browser", version.ref = "browser" }
compose-bom = { module = "androidx.compose:compose-bom", version.ref = "composeBom" }
core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" }
datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastorePreferences" }
kotlin-bom = { module = "org.jetbrains.kotlin:kotlin-bom", version.ref = "kotlin" }
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinxDatetime" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
lifecycle-process = { module = "androidx.lifecycle:lifecycle-process", version.ref = "lifecycle" }
lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "lifecycle" }
lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle" }
lottie-compose = { module = "com.airbnb.android:lottie-compose", version.ref = "lottieCompose" }
material-icons-extended = { module = "androidx.compose.material:material-icons-extended" }
material3 = { module = "androidx.compose.material3:material3" }
reimagined-material3 = { module = "dev.olshevski.navigation:reimagined-material3", version.ref = "navigationReimagined" }
reimagined = { module = "dev.olshevski.navigation:reimagined", version.ref = "navigationReimagined" }
room-compiler = { module = "androidx.room:room-compiler", version.ref = "room" }
room-ktx = { module = "androidx.room:room-ktx", version.ref = "room" }
room-runtime = { module = "androidx.room:room-runtime", version.ref = "room" }
ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest" }
ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }

[plugins]
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version = "2.0.0" }
ksp = { id = "com.google.devtools.ksp", version = "2.0.21-1.0.25" }
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version = "11.6.1" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Jul 12 18:38:17 CEST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 8201e74

Please sign in to comment.