MaestroClient covers the daemon's REST surface: sessions CRUD, rename, kill (with force), focus reporting, dirs/recent-dirs/projects/gitroot/ names/branches lookups, and the structured-session endpoints (prompt, attachment upload, cancel, config, approval). MaestroWebSocket covers all three WS connections — /api/events (catalog deltas), /api/attach/:id (binary PTY frames both directions plus ClientControl text frames for resize/ping), and /api/structured/:id (transcript/state projections) — each exposing a Flow of decoded events behind a connection handle. Adds kotlinx-coroutines-android explicitly rather than relying on it being pulled in transitively via lifecycle-runtime-ktx. Compiled and exercised standalone against the same library versions (no Android SDK available in this environment to run the app module itself) to verify wire-format handling before landing.
82 lines
2.2 KiB
Kotlin
82 lines
2.2 KiB
Kotlin
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.android)
|
|
alias(libs.plugins.kotlin.compose)
|
|
alias(libs.plugins.kotlin.serialization)
|
|
}
|
|
|
|
android {
|
|
namespace = "pt.naps.maestro"
|
|
compileSdk = 34
|
|
|
|
defaultConfig {
|
|
applicationId = "pt.naps.maestro"
|
|
minSdk = 26
|
|
targetSdk = 34
|
|
versionCode = 1
|
|
versionName = "0.1.0"
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
signingConfigs {
|
|
getByName("debug") {
|
|
storeFile = file("debug.keystore")
|
|
storePassword = "android"
|
|
keyAlias = "androiddebugkey"
|
|
keyPassword = "android"
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro",
|
|
)
|
|
}
|
|
debug {
|
|
signingConfig = signingConfigs.getByName("debug")
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
}
|
|
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(platform(libs.androidx.compose.bom))
|
|
implementation(libs.androidx.ui)
|
|
implementation(libs.androidx.ui.graphics)
|
|
implementation(libs.androidx.ui.tooling.preview)
|
|
implementation(libs.androidx.material3)
|
|
implementation(libs.androidx.navigation.compose)
|
|
implementation(libs.okhttp)
|
|
implementation(libs.kotlinx.serialization.json)
|
|
implementation(libs.kotlinx.coroutines.android)
|
|
|
|
testImplementation(libs.junit)
|
|
|
|
androidTestImplementation(libs.androidx.test.ext.junit)
|
|
androidTestImplementation(libs.androidx.espresso.core)
|
|
androidTestImplementation(platform(libs.androidx.compose.bom))
|
|
androidTestImplementation(libs.androidx.ui.test.junit4)
|
|
|
|
debugImplementation(libs.androidx.ui.tooling)
|
|
debugImplementation(libs.androidx.ui.test.manifest)
|
|
}
|