feat: Trafero v0.2.0 - Tdarr v2 native Android client with slow-connection resilience
Full client for the Tdarr /api/v2 JSON API (jobs, library, nodes, stats, logs, settings, flows, multi-server switcher) plus v0.2.0 resilience: per-server timeout + slow-connection mode, retry-with-backoff on read polls, last-good-data + reconnecting chip, 60s poll backoff after repeated failures, and keep-alive eviction on app resume. Includes GPL-3.0 licensing (LICENSE/NOTICE), README, CONTRIBUTING, PREVIOUS_HISTORY, issue/PR templates, CI release-notes script, keystore docs and the vendored OpenAPI 2.0 spec.
This commit is contained in:
commit
312858e8f6
50 files changed
+4446
No files matched your search
@@ -0,0 +1,97 @@
|
||||
plugins {
|
||||
alias(libs.plugins.androidApplication)
|
||||
alias(libs.plugins.kotlinAndroid)
|
||||
alias(libs.plugins.kotlinCompose)
|
||||
alias(libs.plugins.kotlinSerialization)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.trafero.app"
|
||||
compileSdk = 35
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.trafero.app"
|
||||
minSdk = 26
|
||||
targetSdk = 35
|
||||
versionCode = 3
|
||||
versionName = "0.2.0"
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
storeFile = rootProject.file("keystore/release.jks")
|
||||
storePassword = "trafero_dev_keystore"
|
||||
keyAlias = "trafero"
|
||||
keyPassword = "trafero_dev_keystore"
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
isMinifyEnabled = false
|
||||
}
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "17"
|
||||
}
|
||||
buildFeatures {
|
||||
compose = true
|
||||
}
|
||||
packaging {
|
||||
resources.excludes += "META-INF/DEPENDENCIES"
|
||||
}
|
||||
}
|
||||
|
||||
// Fail fast with an actionable message only when assembleRelease actually
|
||||
// runs and the keystore is missing - not during project configuration.
|
||||
tasks.register("validateReleaseKeystore") {
|
||||
group = "build"
|
||||
description = "Validates that keystore/release.jks exists before assembleRelease runs"
|
||||
doFirst {
|
||||
val f = rootProject.file("keystore/release.jks")
|
||||
if (!f.exists()) {
|
||||
throw GradleException(
|
||||
"Missing ${f.absolutePath}.\n" +
|
||||
"Generate the dev keystore documented in keystore/README.md:\n" +
|
||||
" keytool -genkey -noprompt -v \\\n" +
|
||||
" -keystore keystore/release.jks \\\n" +
|
||||
" -keyalg RSA -keysize 2048 -validity 10000 \\\n" +
|
||||
" -alias trafero \\\n" +
|
||||
" -storepass trafero_dev_keystore \\\n" +
|
||||
" -keypass trafero_dev_keystore \\\n" +
|
||||
" -dname \"CN=Trafero, OU=Local, O=Trafero, L=Local, ST=Local, C=NZ\""
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.matching { it.name == "validateReleaseSigningConfig" || it.name.startsWith("assembleRelease") || it.name.startsWith("bundleRelease") }
|
||||
.configureEach { dependsOn("validateReleaseKeystore") }
|
||||
|
||||
dependencies {
|
||||
implementation(libs.androidx.core.ktx)
|
||||
implementation(libs.androidx.activity.compose)
|
||||
implementation(libs.androidx.lifecycle.runtime.compose)
|
||||
implementation(libs.androidx.lifecycle.runtime.ktx)
|
||||
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
||||
implementation(libs.androidx.navigation.compose)
|
||||
implementation(libs.androidx.datastore.preferences)
|
||||
implementation(platform(libs.composeBom))
|
||||
implementation(libs.compose.ui)
|
||||
implementation(libs.compose.material3)
|
||||
implementation(libs.compose.material.icons.extended)
|
||||
implementation(libs.compose.ui.tooling.preview)
|
||||
debugImplementation(libs.compose.ui.tooling)
|
||||
implementation(libs.kotlinx.serialization.json)
|
||||
implementation(libs.kotlinx.coroutines.android)
|
||||
implementation(libs.okhttp)
|
||||
}
|
||||
Reference in new issue
Block a user