This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gradle.projectsLoaded { gradle -> | |
def file = rootProject.file("gradle.local.properties") | |
if (file.exists()) { | |
def properties = new Properties() | |
file.withInputStream { properties.load(it) } | |
// set the loaded properties for all projects | |
gradle.beforeProject { project -> | |
properties.entrySet().forEach { prop -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// conversions based on https://material.io/blog/migrating-material-3, deprecated colors set to Colors.Red | |
@Composable | |
fun fromMaterial3Theme(isLight: Boolean): Colors { | |
val scheme = MaterialTheme.colorScheme | |
return Colors( | |
primary = scheme.primary, | |
primaryVariant = Color.Red, | |
secondary = scheme.secondary, | |
secondaryVariant = Color.Red, | |
background = scheme.background, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun KeepScreenOn() { | |
val currentView = LocalView.current | |
DisposableEffect(Unit) { | |
currentView.keepScreenOn = true | |
onDispose { | |
currentView.keepScreenOn = false | |
} | |
} |
OlderNewer