Files
umamo/app/android/build.gradle.kts
T
litruv 8bd8fa7a0b Snapshot of the Umamo working tree as it is
Uploaded as-is from /home/litruv/dev/vtsmaker/umamo on 2026-11-03. 1347 files.
Includes the uncommitted work in progress in :edit, :runtime, and :ui, and the
untracked files under module/edit/src/jvmAndroidMain/.

History is not carried over. The source repo is https://github.com/umamoorg/umamo.
2026-11-03 18:20:25 +11:00

82 lines
3.3 KiB
Kotlin
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// :android (app/android) — Android entrypoint (Activity + Compose + GLSurfaceView viewport).
// A plain Android application module (not KMP): it consumes the shared KMP libraries.
// :android — Android 起動点(Activity + Compose + GLSurfaceView ビューポート)。
plugins {
// AGP 9+ has built-in Kotlin support, so the org.jetbrains.kotlin.android plugin is gone —
// applying it now errors. AGP compiles Kotlin itself; the Compose compiler plugin hooks in.
alias(libs.plugins.androidApplication)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
}
// Resolve the application version from ProjectInfo.kt (see gradle/project-version.gradle.kts) so
// versionName never drifts from what the About dialog shows.
apply(from = rootProject.file("gradle/project-version.gradle.kts"))
val umamoVersion = extra["umamoVersion"] as String
android {
namespace = "org.umamo.editor.android"
compileSdk = libs.versions.android.compileSdk.get().toInt()
defaultConfig {
// applicationId is the permanent Play identity; it intentionally differs from `namespace`
// so org.umamo stays a clean umbrella for a future viewer app.
applicationId = "org.umamo.editor"
minSdk = libs.versions.android.minSdk.get().toInt()
targetSdk = libs.versions.android.targetSdk.get().toInt()
// versionCode is Play's monotonic release counter — bumped by hand on release; it cannot be
// derived from a semver string.
versionCode = 1
versionName = umamoVersion
}
buildTypes {
release {
isMinifyEnabled = false
}
}
// Keep AGP's Java compilation in lockstep with Kotlin's JDK 21 target (otherwise the
// "inconsistent JVM target" error bites the moment any Java source appears).
compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
packaging {
resources {
excludes += "/META-INF/LICENSE.md"
excludes += "/META-INF/LICENSE-notice.md"
}
}
}
kotlin {
jvmToolchain(21)
}
dependencies {
implementation(project(":ui"))
implementation(project(":runtime"))
// Editing core (EditorSession / Selection model): the Android host creates a per-document session
// the same way the desktop does; declared directly for parity with :runtime / :render.
implementation(project(":edit"))
implementation(project(":render"))
// androidAppStorage + the per-OS config/data dirs the settings live in; also pulls FileKit
// (api-exposed by :storage), whose Android pickers MainActivity initialises with FileKit.init.
implementation(project(":storage"))
// The Settings type returned by LocalSettings: :ui depends on :settings only via implementation, so
// MainActivity needs it on its own classpath to read settings.getString / observe settings.changes.
implementation(project(":settings"))
// setContent { } lives in androidx.activity.compose.
implementation(libs.androidx.activity.compose)
// Direct Compose Multiplatform coordinates via the version catalog — the old `compose.runtime`
// plugin aliases were deprecated in CMP 1.10/1.11. The artifacts still redirect to
// androidx.compose on this Android target (Gradle metadata), so resolution is unchanged; see the
// catalog note on the `compose-*` entries and the matching :ui commonMain block.
implementation(libs.compose.runtime)
implementation(libs.compose.foundation)
implementation(libs.compose.ui)
}