深色模式、首页设置页面和功能优化

This commit is contained in:
Developer
2026-04-02 07:06:55 +08:00
parent f0a62ed68b
commit 954d173329
88 changed files with 12157 additions and 7578 deletions

View File

@@ -42,3 +42,40 @@ android {
flutter {
source = "../.."
}
// 为所有依赖的模块设置统一的 JVM 目标版本
configurations.all {
resolutionStrategy {
eachDependency {
// 这里可以添加依赖解析策略
}
}
}
// 为所有任务设置统一的 JVM 目标版本
allprojects {
tasks.withType<JavaCompile> {
sourceCompatibility = "17"
targetCompatibility = "17"
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
}
}
}
// 强制所有模块使用相同的 JVM 版本
subprojects {
tasks.withType<JavaCompile> {
sourceCompatibility = "17"
targetCompatibility = "17"
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
}
}
}

View File

@@ -1,3 +1,7 @@
import org.gradle.api.JavaVersion
import com.android.build.gradle.LibraryExtension
import com.android.build.gradle.AppExtension
allprojects {
repositories {
google()
@@ -25,6 +29,7 @@ allprojects {
}
}
// 统一设置 JVM 版本
allprojects {
tasks.withType<JavaCompile> {
sourceCompatibility = "17"
@@ -38,19 +43,53 @@ allprojects {
}
}
// 注释掉 audioplayers_android 项目配置,因为我们使用的是 Git 仓库版本
// project(":audioplayers_android") {
// tasks.withType<JavaCompile> {
// sourceCompatibility = "1.8"
// targetCompatibility = "1.8"
// }
//
// tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
// kotlinOptions {
// jvmTarget = "1.8"
// }
// }
// }
// 为所有子项目(包括依赖的模块)设置统一的 JVM 目标版本
subprojects {
tasks.withType<JavaCompile> {
sourceCompatibility = "17"
targetCompatibility = "17"
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
}
}
}
// 为所有模块设置统一的 JVM 目标版本
subprojects {
afterEvaluate {
// 为 Java 编译任务设置 JVM 版本
tasks.withType<JavaCompile> {
sourceCompatibility = "17"
targetCompatibility = "17"
}
// 为 Kotlin 编译任务设置 JVM 版本
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
}
}
// 为 Android 模块设置编译选项
if (plugins.hasPlugin("com.android.library") || plugins.hasPlugin("com.android.application")) {
extensions.findByType<com.android.build.gradle.LibraryExtension>()?.apply {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
extensions.findByType<com.android.build.gradle.AppExtension>()?.apply {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
}
}
}
val newBuildDir: Directory =
rootProject.layout.buildDirectory

View File

@@ -3,8 +3,24 @@ android.useAndroidX=true
android.enableJetifier=true
# 统一 JVM 版本配置
# org.gradle.java.home=C:\Program Files\Eclipse Adoptium\jdk-21.0.10.7-hotspot
org.gradle.java.home=C:/Program Files/Eclipse Adoptium/jdk-21.0.10.7-hotspot
# 为所有 Kotlin 编译任务设置 JVM 目标版本
kotlin.compiler.execution.strategy=in-process
kotlin.incremental=false
# 全局 JVM 目标版本配置
org.gradle.java.version=17
kotlin.jvm.target=17
# 确保所有 Java 编译任务使用相同的版本
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# 为所有 Android 模块设置 JVM 版本
android.compileOptions.sourceCompatibility=17
android.compileOptions.targetCompatibility=17
# 为所有 Kotlin 模块设置 JVM 版本
kotlin.compiler.execution.strategy=in-process
kotlin.incremental=false
kotlin.compiler.options.jvmTarget=17