Skip to content

Commit

Permalink
Merge pull request #128 from imashnake0/update-deps
Browse files Browse the repository at this point in the history
Update deps
  • Loading branch information
imashnake0 authored Feb 29, 2024
2 parents fedf94c + d62e780 commit 27b7b5c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 33 deletions.
32 changes: 14 additions & 18 deletions app/src/main/java/com/imashnake/animite/features/theme/Theme.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@ package com.imashnake.animite.features.theme

import android.os.Build
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material.ripple.LocalRippleTheme
import androidx.compose.material.ripple.RippleAlpha
import androidx.compose.material.ripple.RippleTheme
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.LocalRippleConfiguration
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.RippleConfiguration
import androidx.compose.material3.dynamicDarkColorScheme
import androidx.compose.material3.dynamicLightColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.Immutable
import androidx.compose.ui.platform.LocalContext
import com.imashnake.animite.core.ui.LocalPaddings
import com.imashnake.animite.core.ui.Paddings
import com.imashnake.animite.core.ui.rememberDefaultPaddings
import com.imashnake.animite.dev.ext.pastelize

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun AnimiteTheme(
paddings: Paddings = rememberDefaultPaddings(),
Expand All @@ -32,29 +33,24 @@ fun AnimiteTheme(
darkTheme -> KimiNoDarkColorScheme
else -> KimiNoLightColorScheme.pastelize(backgroundToPrimary = 0.05f)
}
val animiteRippleTheme = RippleConfiguration(
color = MaterialTheme.colorScheme.primary,
rippleAlpha = RippleAlpha(
draggedAlpha = 0.16f,
focusedAlpha = 0.12f,
hoveredAlpha = 0.08f,
pressedAlpha = 0.12f
)
)

MaterialTheme(
colorScheme = animiteColorScheme,
typography = AnimiteTypography
) {
CompositionLocalProvider(
LocalRippleTheme provides AnimiteRippleTheme,
LocalRippleConfiguration provides animiteRippleTheme,
LocalPaddings provides paddings,
content = content
)
}
}

@Immutable
private object AnimiteRippleTheme : RippleTheme {
@Composable
override fun defaultColor() = MaterialTheme.colorScheme.primary

@Composable
override fun rippleAlpha() = RippleAlpha(
draggedAlpha = 0.16f,
focusedAlpha = 0.12f,
hoveredAlpha = 0.08f,
pressedAlpha = 0.12f
)
}
30 changes: 15 additions & 15 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ desugaring = "2.0.4"

# Android Gradle Plugin
# https://developer.android.com/studio/releases/gradle-plugin.
agp = "8.2.1"
agp = "8.2.2"

# AndroidX
# https://androidx.tech.
activity = "1.8.2"
core = "1.13.0-alpha03"
core = "1.13.0-alpha05"
lifecycle = "2.7.0"
extJunit = "1.2.0-alpha02"
espresso = "3.6.0-alpha02"
extJunit = "1.2.0-alpha03"
espresso = "3.6.0-alpha03"

# TODO: Breaking changes; review release notes and update.
# Apollo Kotlin
Expand All @@ -46,21 +46,21 @@ composeDestinations = "1.9.59"

# Compose
# https://developer.android.com/jetpack/androidx/releases/compose.
composeAnimation = "1.6.0-rc01"
composeCompiler = "1.5.8"
composeFoundation = "1.6.0-rc01"
composeMaterial = "1.6.0-rc01"
composeMaterial3 = "1.2.0-beta02"
composeRuntime = "1.6.0-rc01"
composeUi = "1.6.0-rc01"
composeAnimation = "1.7.0-alpha03"
composeCompiler = "1.5.10"
composeFoundation = "1.7.0-alpha03"
composeMaterial = "1.7.0-alpha03"
composeMaterial3 = "1.3.0-alpha01"
composeRuntime = "1.7.0-alpha03"
composeUi = "1.7.0-alpha03"

# Dagger
# https://github.com/google/dagger/releases.
dagger = "2.50"

# Hilt
# https://developer.android.com/jetpack/androidx/releases/hilt.
hilt = "1.1.0"
hilt = "1.2.0"

# Kotlin
# https://kotlinlang.org/docs/releases.html#release-details.
Expand All @@ -69,19 +69,19 @@ coroutines = "1.8.0-RC2"

# KSP
# https://github.com/google/ksp/releases.
ksp = "1.9.22-1.0.16"
ksp = "1.9.22-1.0.17"

# Test
# https://github.com/junit-team/junit4/releases.
junit = "4.13.2"

# detekt
# https://github.com/detekt/detekt/releases.
detekt = "1.23.4"
detekt = "1.23.5"

# Compose Markdown
# https://github.com/boswelja/compose-markdown.
composeMarkdown = "1.0.3"
composeMarkdown = "1.0.4"


[libraries]
Expand Down

0 comments on commit 27b7b5c

Please sign in to comment.