On TV hardware the debug build's UI thread renders at ~2fps (dumpsys gfxinfo: 87% janky frames, 50th percentile 85ms, stalls up to 4200ms while the GPU sits at 12ms). An R8 minified release of the same code turns the identical interaction into 184 frames at 27ms median with 15% jank — the artifact is the deliverable, and the debug signature keeps install -r seamless for sideloads.
69 lines
No EOL
2.2 KiB
Kotlin
69 lines
No EOL
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 = "net.jeena.jtubetv"
|
|
compileSdk = 35
|
|
|
|
defaultConfig {
|
|
applicationId = "net.jeena.jtubetv"
|
|
minSdk = 26
|
|
targetSdk = 35
|
|
versionCode = 1
|
|
versionName = "0.1.0"
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
// R8 on + signed with the debug key: the release variant is the TV
|
|
// deliverable — on the TV hardware the debug build's UI thread sits
|
|
// at ~2fps (dumpsys gfxinfo: 87% janky, UI-thread stalls up to 4s),
|
|
// while the GPU is fine. Same signature keeps install -r seamless.
|
|
isMinifyEnabled = true
|
|
signingConfig = signingConfigs.getByName("debug")
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
buildConfig = true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
|
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.tv.material)
|
|
implementation(libs.androidx.compose.icons)
|
|
implementation(libs.androidx.security.crypto)
|
|
implementation(libs.media3.exoplayer)
|
|
implementation(libs.media3.exoplayer.hls)
|
|
implementation(libs.media3.ui)
|
|
implementation(libs.retrofit)
|
|
implementation(libs.retrofit.kotlinx.serialization)
|
|
implementation(libs.okhttp)
|
|
implementation(libs.okhttp.logging)
|
|
implementation(libs.kotlinx.serialization.json)
|
|
implementation(libs.coil.compose)
|
|
} |