ColorScheme.toPureBlack() sets background, surface, surfaceDim and surfaceContainerLowest to #000 and dims the other containers by scaling their sRGB channels, so their hue tint carries over and grid tiles drawn as containers over surface keep visible gaps. FloretExpressiveTheme takes pureBlack to apply it to the dark scheme, dynamic or app-supplied. core-prefs gains ThemeMode.BLACK (dark, pure black) and ThemeMode.isPureBlack, stored under the same theme_mode key.
55 lines
1.5 KiB
Kotlin
55 lines
1.5 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
|
|
}
|
|
|
|
testOptions {
|
|
unitTests {
|
|
all { it.useJUnitPlatform() }
|
|
isReturnDefaultValues = 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)
|
|
implementation(libs.androidx.animation)
|
|
// activity-compose for PredictiveBackHandler + BackEventCompat (the back-gesture peek).
|
|
implementation(libs.androidx.activity.compose)
|
|
|
|
testImplementation(libs.junit.jupiter.api)
|
|
testRuntimeOnly(libs.junit.jupiter.engine)
|
|
testRuntimeOnly(libs.junit.platform.launcher)
|
|
testImplementation(libs.truth)
|
|
}
|