Implement main app navigation

This commit is contained in:
2026-05-08 14:03:26 +02:00
parent f7e866a08d
commit 794e27c554
90 changed files with 11725 additions and 187 deletions

View File

@@ -0,0 +1,26 @@
package dev.ulfrx.recipe.ui.components.glass
import android.app.Application
import android.content.pm.ApplicationInfo
/**
* Android actual: this module does not expose an app `BuildConfig` class on the
* Kotlin compile classpath, so read the runtime debuggable flag from the current
* application instead. This keeps release builds on the production path without
* requiring a build-file change outside this plan's ownership.
*/
actual val isDebugBuild: Boolean
get() =
currentApplication()
?.applicationInfo
?.flags
?.and(ApplicationInfo.FLAG_DEBUGGABLE) != 0
@Suppress("PrivateApi")
private fun currentApplication(): Application? =
runCatching {
Class
.forName("android.app.ActivityThread")
.getMethod("currentApplication")
.invoke(null) as? Application
}.getOrNull()