Files
android-tv/app/build.gradle.kts
xiaji 153b555d52 refactor: convert from Android TV to phone/tablet mode
- Replace Theme.Leanback with Theme.AppCompat.DayNight.NoActionBar
- Remove leanback dependencies (leanback, leanback-preference)
- Remove LEANBACK_LAUNCHER, leanback feature, banner from manifest
- PlayerActivity: replace D-pad with touch controls (click to toggle episodes, close button)
- SearchFragment: adaptive grid (3 cols phone / 5 cols tablet), remove focus-based history toggle
- Fix deprecated adapterPosition -> bindingAdapterPosition
2026-05-24 21:19:34 +08:00

79 lines
2.1 KiB
Kotlin

plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("com.google.devtools.ksp")
}
android {
namespace = "com.videoapp.tv"
compileSdk = 34
defaultConfig {
applicationId = "com.videoapp.tv"
minSdk = 21
targetSdk = 34
versionCode = 1
versionName = "1.0"
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
buildFeatures {
viewBinding = true
}
}
dependencies {
// AndroidX
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.fragment:fragment-ktx:1.6.2")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.recyclerview:recyclerview:1.3.2")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
implementation("androidx.activity:activity-ktx:1.8.1")
// ExoPlayer (Media3)
implementation("androidx.media3:media3-exoplayer:1.2.0")
implementation("androidx.media3:media3-ui:1.2.0")
implementation("androidx.media3:media3-exoplayer-hls:1.2.0")
// Jsoup (HTML parsing)
implementation("org.jsoup:jsoup:1.17.2")
// Room (database)
implementation("androidx.room:room-runtime:2.6.1")
implementation("androidx.room:room-ktx:2.6.1")
ksp("androidx.room:room-compiler:2.6.1")
// Gson (JSON)
implementation("com.google.code.gson:gson:2.10.1")
// Coroutines
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
// Glide (image loading)
implementation("com.github.bumptech.glide:glide:4.16.0")
// WebView
implementation("androidx.webkit:webkit:1.8.0")
}