Files
meditation-timer/app/build.gradle.kts
Marcus Rehbock 0d694dc98b
All checks were successful
Build & Release APK / build (push) Successful in 12m15s
Videos tab: stream/download the server video library, in-app ExoPlayer
- New Videos tab lists videos served by health-api (GET /v1/videos), with
  thumbnails, duration/size, "Download for offline" into app-private storage
  (progress bar, remove), and tap-to-play.
- Full-screen Media3/ExoPlayer: plays the local copy if downloaded, otherwise
  streams /v1/videos/<file> with the existing sync bearer token (range requests).
- Activity handles rotation itself (configChanges) so playback survives it.
- Server side: health-api /v1/videos + video-add.sh (yt-dlp) — see README.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019pvxTrcfAiFZJcS7Jve2Au
2026-09-01 20:02:09 +10:00

68 lines
2.1 KiB
Plaintext

plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.plugin.compose")
}
android {
namespace = "com.marcus.meditationtimer"
compileSdk = 35
defaultConfig {
applicationId = "com.marcus.meditationtimer"
minSdk = 29
targetSdk = 35
versionCode = System.getenv("VERSION_CODE")?.toIntOrNull() ?: 2
versionName = System.getenv("VERSION_NAME") ?: "1.1-dev"
}
val releaseKeystore = System.getenv("KEYSTORE_FILE")
if (releaseKeystore != null) {
signingConfigs {
create("release") {
storeFile = file(releaseKeystore)
storePassword = System.getenv("KEYSTORE_PASSWORD")
keyAlias = System.getenv("KEY_ALIAS") ?: "meditation"
keyPassword = System.getenv("KEY_PASSWORD") ?: System.getenv("KEYSTORE_PASSWORD")
}
}
}
buildTypes {
release {
isMinifyEnabled = false
if (releaseKeystore != null) {
signingConfig = signingConfigs.getByName("release")
}
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
buildFeatures {
compose = true
}
lint {
// Media3's @UnstableApi is opted into where used; don't let lintVital block release builds
checkReleaseBuilds = false
abortOnError = false
}
}
dependencies {
val composeBom = platform("androidx.compose:compose-bom:2024.10.01")
implementation(composeBom)
implementation("androidx.core:core-ktx:1.13.1")
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.material3:material3")
implementation("androidx.activity:activity-compose:1.9.3")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.7")
// Videos tab: in-app playback of the server video library
implementation("androidx.media3:media3-exoplayer:1.4.1")
implementation("androidx.media3:media3-ui:1.4.1")
}