fix(mobile): 让华为 AGConnect 在 AGP 9 下能识别真实配置
放入 agconnect-services.json 后原插件坐标无法解析,且 1.9.1 不兼容 AGP 9。 映射到 agcp 1.9.5.301,Gradle 可按包名校验;该文件继续忽略不入库。 Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
co-authored by
Cursor
multica-agent
parent
a71f6a0ce1
commit
1d393f4f1e
@@ -20,13 +20,24 @@ pluginManagement {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
// 华为插件发布在 Maven 的 agcp 构件上,没有 Plugin Portal 的
|
||||
// com.huawei.agconnect.gradle.plugin 坐标。plugins DSL 必须映射过去,
|
||||
// 否则放入 agconnect-services.json 后启用插件会解析失败。
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if (requested.id.id == "com.huawei.agconnect") {
|
||||
useModule("com.huawei.agconnect:agcp:1.9.5.301")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
|
||||
id("com.android.application") version "9.0.1" apply false
|
||||
id("org.jetbrains.kotlin.android") version "2.3.20" apply false
|
||||
id("com.huawei.agconnect") version "1.9.1.301" apply false
|
||||
id("com.huawei.agconnect") version "1.9.5.301" apply false
|
||||
}
|
||||
|
||||
include(":app")
|
||||
|
||||
Reference in New Issue
Block a user