The standard Android back-gesture preview — the surface scales to ~90%, rounds its corners and shifts toward the swiped edge as the gesture is dragged, then commits or springs back. Plus rememberReduceMotion() to honour the system "remove animations" setting. Drawn from Calendula's CalendarTransitions so both apps preview back the same way; adds the activity-compose dependency. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
42 lines
1.2 KiB
Kotlin
42 lines
1.2 KiB
Kotlin
// identity — the family's Material 3 Expressive theme factory + shared motion.
|
|
// Holds the theme MECHANICS (dynamic-colour resolution, light/dark, the STANDARD
|
|
// motion scheme) and the nav slide spec; each app supplies its own seed-derived
|
|
// colour schemes, so the look stays per-app while the machinery is shared.
|
|
plugins {
|
|
alias(libs.plugins.android.library)
|
|
alias(libs.plugins.kotlin.compose)
|
|
}
|
|
|
|
android {
|
|
namespace = "de.jeanlucmakiola.floret.identity"
|
|
compileSdk = 37
|
|
|
|
defaultConfig {
|
|
minSdk = 29
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
compilerOptions {
|
|
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(platform(libs.androidx.compose.bom))
|
|
implementation(libs.androidx.ui)
|
|
implementation(libs.androidx.foundation)
|
|
implementation(libs.androidx.material3)
|
|
// activity-compose for PredictiveBackHandler + BackEventCompat (the back-gesture peek).
|
|
implementation(libs.androidx.activity.compose)
|
|
}
|