Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deps #128

Merged
merged 7 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading