mobile: 提交 android/ios 平台脚手架与打包配置(B-58)
- flutter create 生成的 android/ ios/ 脚手架入库,服务器/使用者无需再装 Flutter - AndroidManifest:补 INTERNET/录音/存储权限,应用名改「畅联」,开 usesCleartextTraffic(内网 http/ws) - iOS Info.plist:麦克风/相册用途说明、ATS 放行内网明文、显示名「畅联」 - gradle:阿里云镜像优先(本网络 maven.google.com 不可达);统一 Java/Kotlin 编译目标 17; 抬升 livekit_client compileSdk 到 36 以满足 flutter_webrtc 的 AAR 校验 - README 更新为「直接打包」流程
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
allprojects {
|
||||
repositories {
|
||||
// 国内镜像优先(本网络 maven.google.com 不可达)
|
||||
maven("https://maven.aliyun.com/repository/google")
|
||||
maven("https://maven.aliyun.com/repository/central")
|
||||
maven("https://maven.aliyun.com/repository/public")
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
val newBuildDir: Directory =
|
||||
rootProject.layout.buildDirectory
|
||||
.dir("../../build")
|
||||
.get()
|
||||
rootProject.layout.buildDirectory.value(newBuildDir)
|
||||
|
||||
subprojects {
|
||||
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
|
||||
project.layout.buildDirectory.value(newSubprojectBuildDir)
|
||||
}
|
||||
subprojects {
|
||||
project.evaluationDependsOn(":app")
|
||||
}
|
||||
|
||||
// 各三方插件的 Java/Kotlin 编译目标不一致(有的 11、有的 17、Kotlin 默认 1.8),
|
||||
// 会因 "Inconsistent JVM Target Compatibility" 直接报错。
|
||||
// 这里统一往 17 对齐(configureEach 在任务创建时生效),
|
||||
// 个别插件若在自身配置里再覆盖,则由 gradle.properties 里的
|
||||
// kotlin.jvm.target.validation.mode=warning 兜底降级为警告。
|
||||
subprojects {
|
||||
tasks.withType<JavaCompile>().configureEach {
|
||||
sourceCompatibility = "17"
|
||||
targetCompatibility = "17"
|
||||
}
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
||||
compilerOptions {
|
||||
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register<Delete>("clean") {
|
||||
delete(rootProject.layout.buildDirectory)
|
||||
}
|
||||
Reference in New Issue
Block a user