Skip to content

Commit

Permalink
bump gradle deps
Browse files Browse the repository at this point in the history
  • Loading branch information
ahudson20 committed Mar 11, 2024
1 parent 993f6f2 commit f3ad0b2
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 32 deletions.
28 changes: 14 additions & 14 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ android {
dependencies {
implementation "androidx.navigation:navigation-compose:$nav_version"
implementation "androidx.core:core-ktx:1.12.0"
implementation "androidx.compose.ui:ui:1.6.0-beta03"
implementation "androidx.compose.ui:ui-tooling-preview:1.6.0-beta03"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.6.2"
implementation "androidx.compose.ui:ui:1.6.3"
implementation "androidx.compose.ui:ui-tooling-preview:1.6.3"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.7.0"
implementation "androidx.activity:activity-compose:1.8.2"

// Material
implementation "com.google.android.material:material:1.11.0"
implementation "androidx.compose.material3:material3:1.2.0-beta01"
implementation "androidx.compose.material:material-icons-extended:1.6.0-beta03"
implementation "androidx.compose.material:material:1.6.0-beta03"
implementation "androidx.compose.material3:material3:1.2.1"
implementation "androidx.compose.material:material-icons-extended:1.6.3"
implementation "androidx.compose.material:material:1.6.3"

// Timepicker Material3
implementation "com.marosseleng.android:compose-material3-datetime-pickers:$time_picker_version"
Expand Down Expand Up @@ -103,9 +103,9 @@ dependencies {
testImplementation "org.mockito.kotlin:mockito-kotlin:5.0.0"
androidTestImplementation "androidx.test.ext:junit:1.1.5"
androidTestImplementation "androidx.test.espresso:espresso-core:3.5.1"
androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.6.0-beta03"
debugImplementation "androidx.compose.ui:ui-tooling:1.6.0-beta03"
debugImplementation "androidx.compose.ui:ui-test-manifest:1.6.0-beta03"
androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.6.3"
debugImplementation "androidx.compose.ui:ui-tooling:1.6.3"
debugImplementation "androidx.compose.ui:ui-test-manifest:1.6.3"

implementation "javax.inject:javax.inject:1"

Expand All @@ -130,12 +130,12 @@ dependencies {
implementation 'com.google.accompanist:accompanist-systemuicontroller:0.31.5-beta'

// Hilt
implementation "androidx.hilt:hilt-navigation-compose:1.1.0"
implementation "com.google.dagger:hilt-android:2.48"
kapt "com.google.dagger:hilt-android-compiler:2.44"
kapt "com.google.dagger:hilt-compiler:2.44"
implementation "androidx.hilt:hilt-navigation-compose:1.2.0"
implementation "com.google.dagger:hilt-android:2.49"
kapt "com.google.dagger:hilt-android-compiler:2.48"
kapt "com.google.dagger:hilt-compiler:2.48"
androidTestImplementation 'com.google.dagger:hilt-android-testing:2.44'
kaptAndroidTest 'com.google.dagger:hilt-android-compiler:2.44'
kaptAndroidTest 'com.google.dagger:hilt-android-compiler:2.48'

// Androidx Lifecycle
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
package com.app.whakaara.module

import android.content.Context
import android.media.AudioAttributes
import android.media.MediaPlayer
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent

@Module
@InstallIn(SingletonComponent::class)
class MediaPlayerModule {

@Provides
fun provideMediaPlayer(
@ApplicationContext
context: Context
): MediaPlayer = MediaPlayer().apply {
fun provideMediaPlayer(): MediaPlayer = MediaPlayer().apply {
setAudioAttributes(
AudioAttributes.Builder()
.setUsage(AudioAttributes.USAGE_ALARM)
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/java/com/app/whakaara/ui/card/CardContainer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.SwipeToDismissBox
import androidx.compose.material3.SwipeToDismissValue
import androidx.compose.material3.SwipeToDismissBoxValue
import androidx.compose.material3.Text
import androidx.compose.material3.rememberSwipeToDismissState
import androidx.compose.material3.rememberSwipeToDismissBoxState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -54,13 +54,13 @@ fun CardContainerSwipeToDismiss(
}
} else {
items(alarms.alarms, key = { it.alarmId }) { alarm ->
val dismissState = rememberSwipeToDismissState(
val dismissState = rememberSwipeToDismissBoxState(
positionalThreshold = { distance: Float ->
distance * 1f
}
)

if (dismissState.currentValue != SwipeToDismissValue.Settled) {
if (dismissState.currentValue != SwipeToDismissBoxValue.Settled) {
LaunchedEffect(Unit) {
Toast.makeText(context, context.getString(R.string.notification_action_deleted, alarm.title), Toast.LENGTH_LONG).show()
delete(alarm)
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/java/com/app/whakaara/ui/card/SwipeToDismiss.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import androidx.compose.material.icons.filled.Delete
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.SwipeToDismissState
import androidx.compose.material3.SwipeToDismissValue
import androidx.compose.material3.rememberSwipeToDismissState
import androidx.compose.material3.SwipeToDismissBoxState
import androidx.compose.material3.SwipeToDismissBoxValue
import androidx.compose.material3.rememberSwipeToDismissBoxState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
Expand All @@ -33,9 +33,9 @@ import com.app.whakaara.ui.theme.WhakaaraTheme

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun DismissBackground(dismissState: SwipeToDismissState) {
fun DismissBackground(dismissState: SwipeToDismissBoxState) {
val isSwiping by remember(dismissState) {
derivedStateOf { dismissState.dismissDirection == SwipeToDismissValue.EndToStart && dismissState.progress > 0.1f }
derivedStateOf { dismissState.dismissDirection == SwipeToDismissBoxValue.EndToStart && dismissState.progress > 0.1f }
}

val color by animateColorAsState(
Expand Down Expand Up @@ -75,7 +75,7 @@ fun DismissBackground(dismissState: SwipeToDismissState) {
fun DismissBackgroundPreview() {
WhakaaraTheme {
DismissBackground(
dismissState = rememberSwipeToDismissState()
dismissState = rememberSwipeToDismissBoxState()
)
}
}
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ buildscript {
}
ext {
compose_version = '1.1.0-beta01'
nav_version = '2.7.6'
nav_version = '2.7.7'
work_version = '2.9.0'
time_picker_version = '0.7.2'
accompanist_permissions = '0.31.5-beta'
ktlint_gradle_version = '11.4.2'
hilt_agp_version = '2.43.2'
room_version = '2.6.1'
mockk_version = '1.13.5'
lifecycle_version = '2.6.2'
lifecycle_version = '2.7.0'
turbine_version = '1.0.0'
arch_core_version = '2.2.0'
kotlinx_coroutines_version = '1.7.2'
Expand Down

0 comments on commit f3ad0b2

Please sign in to comment.