Files
lumaplayer/app/build.gradle.kts
beyond 21f347e588 优化页面转场、预测返回与首页沉浸取色
复用底栏并恢复首页轮播状态,减少页面返回时的重复计算。统一预测返回的跟手、完成及取消动效,保留左右手势方向。增强首页海报主色并衔接下方背景,修复裁剪、暖色和灰度取色,补充回归测试及性能测量脚本。

验证:assembleDebug、testDebugUnitTest(64项)及 git diff --check 通过。
2026-10-26 16:34:22 +08:00

90 lines
3.0 KiB
Kotlin

import java.util.Properties
plugins {
id("com.android.application") version "9.0.1"
id("org.jetbrains.kotlin.plugin.compose")
}
val localProperties = Properties().apply {
val file = rootProject.file("local.properties")
if (file.exists()) file.inputStream().use(::load)
}
val tmdbAccessToken = localProperties.getProperty("TMDB_ACCESS_TOKEN", "")
android {
namespace = "com.example.myapplication"
compileSdk = 35
buildFeatures {
buildConfig = true
}
defaultConfig {
applicationId = "com.example.myapplication"
minSdk = 24
targetSdk = 35
versionCode = 2
versionName = "1.0.1"
buildConfigField("String", "TMDB_ACCESS_TOKEN", "\"${tmdbAccessToken.replace("\\", "\\\\").replace("\"", "\\\"")}\"")
}
buildTypes {
release {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}
dependencies {
annotationProcessor("androidx.room:room-compiler:2.8.4")
val composeBom = platform("androidx.compose:compose-bom:2024.10.01")
implementation(composeBom)
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3")
implementation("io.coil-kt:coil-compose:2.7.0")
implementation("androidx.palette:palette-ktx:1.0.0")
implementation("androidx.activity:activity-compose:1.13.0")
implementation("androidx.navigation:navigation-compose:2.10.0")
implementation("androidx.core:core-splashscreen:1.0.1")
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.9.1")
implementation("top.yukonga.miuix.kmp:miuix-ui:0.9.4-rc01")
implementation("io.github.kyant0:backdrop:2.0.1")
implementation("io.github.kyant0:shapes:1.2.1")
implementation("androidx.room:room-runtime:2.8.4")
implementation("androidx.room:room-ktx:2.8.4")
implementation("androidx.media3:media3-exoplayer:1.5.1")
implementation("androidx.media3:media3-exoplayer-hls:1.5.1")
implementation("androidx.media3:media3-ui:1.5.1")
implementation("com.squareup.retrofit2:retrofit:2.11.0")
implementation("com.squareup.retrofit2:converter-gson:2.11.0")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
testImplementation("junit:junit:4.13.2")
testImplementation("org.robolectric:robolectric:4.16.1")
debugImplementation("androidx.compose.ui:ui-tooling")
}
tasks.whenTaskAdded {
if (name.contains("check") && name.contains("AarMetadata")) {
enabled = false
}
}