Sprint 1 complete: hybrid Compose + LibGDX architecture building
Full AL-001 through AL-008 implementation: shared/ module with ModuleType enum, GameHost routing, StylusInputBridge, LineCorridorScreen with live stroke rendering, LineScore (straightness + anglePrecision), score returned to Compose hub via ActivityResult. Fixes LineScore field mismatch (pressureConsistency → anglePrecision) caught during AL-009 build check. Adds .gitignore and handoff notes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,8 @@ plugins {
|
||||
}
|
||||
|
||||
val gdxVersion: String by project
|
||||
val composeBom: String by project
|
||||
val composeCompilerExtension: String by project
|
||||
val natives: Configuration by configurations.creating
|
||||
|
||||
android {
|
||||
@@ -27,6 +29,14 @@ android {
|
||||
jvmTarget = "17"
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
compose = true
|
||||
}
|
||||
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion = composeCompilerExtension
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
getByName("main") {
|
||||
assets.srcDirs(rootProject.file("assets"))
|
||||
@@ -37,24 +47,49 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation(project(":core"))
|
||||
implementation(project(":shared"))
|
||||
|
||||
// LibGDX
|
||||
implementation("com.badlogicgames.gdx:gdx-backend-android:$gdxVersion")
|
||||
natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a")
|
||||
natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a")
|
||||
natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86")
|
||||
natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64")
|
||||
|
||||
// Compose BOM
|
||||
val composeBomDep = platform("androidx.compose:compose-bom:$composeBom")
|
||||
implementation(composeBomDep)
|
||||
implementation("androidx.compose.ui:ui")
|
||||
implementation("androidx.compose.ui:ui-tooling-preview")
|
||||
implementation("androidx.compose.material3:material3")
|
||||
implementation("androidx.compose.material:material-icons-core")
|
||||
|
||||
// Activity + Navigation + Lifecycle
|
||||
implementation("androidx.activity:activity-compose:1.9.2")
|
||||
implementation("androidx.navigation:navigation-compose:2.8.0")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.4")
|
||||
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.4")
|
||||
|
||||
// Material XML themes (for Activity window styling)
|
||||
implementation("com.google.android.material:material:1.12.0")
|
||||
}
|
||||
|
||||
tasks.register("copyAndroidNatives") {
|
||||
doFirst {
|
||||
val validAbis = setOf("arm64-v8a", "armeabi-v7a", "x86", "x86_64")
|
||||
natives.files.forEach { jar ->
|
||||
val outputDir = file("libs")
|
||||
outputDir.mkdirs()
|
||||
copy {
|
||||
from(zipTree(jar))
|
||||
into(outputDir)
|
||||
include("*.so")
|
||||
eachFile { path = name }
|
||||
includeEmptyDirs = false
|
||||
// Extract ABI from classifier, e.g. "gdx-platform-1.12.1-natives-arm64-v8a.jar" → "arm64-v8a"
|
||||
val abi = jar.name.substringAfter("natives-").removeSuffix(".jar")
|
||||
if (abi in validAbis) {
|
||||
val outputDir = file("libs/$abi")
|
||||
outputDir.mkdirs()
|
||||
copy {
|
||||
from(zipTree(jar))
|
||||
into(outputDir)
|
||||
include("*.so")
|
||||
eachFile { path = name }
|
||||
includeEmptyDirs = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user