You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
2.4 KiB
Groovy
79 lines
2.4 KiB
Groovy
//include ':app'
|
|
//
|
|
//def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
|
|
//
|
|
//def plugins = new Properties()
|
|
//def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
|
|
//if (pluginsFile.exists()) {
|
|
// pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
|
|
//}
|
|
//
|
|
//plugins.each { name, path ->
|
|
// def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
|
|
// include ":$name"
|
|
// project(":$name").projectDir = pluginDirectory
|
|
//}
|
|
|
|
|
|
pluginManagement {
|
|
def flutterSdkPath = {
|
|
def properties = new Properties()
|
|
file("local.properties").withInputStream { properties.load(it) }
|
|
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
|
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
|
return flutterSdkPath
|
|
}()
|
|
|
|
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
|
|
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
gradlePluginPortal()
|
|
// Add Huawei's Maven repo for plugins
|
|
maven { url 'https://developer.huawei.com/repo/' }
|
|
}
|
|
|
|
dependencyResolutionManagement {
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
gradlePluginPortal()
|
|
maven { url 'https://developer.huawei.com/repo/' }
|
|
|
|
}
|
|
}
|
|
|
|
resolutionStrategy {
|
|
eachPlugin {
|
|
if (it.requested.id.getNamespace() == 'com.huawei.agconnect') {
|
|
println ">> ${it.requested.id.id}"
|
|
if (it.requested.id.id == 'com.huawei.agconnect.agcp') {
|
|
it.useModule('com.huawei.agconnect:agcp:1.7.3.302')
|
|
}
|
|
if (it.requested.id.id == 'com.huawei.agconnect.apms') {
|
|
it.useModule('com.huawei.agconnect:agconnect-apms-plugin:1.6.1.300')
|
|
}
|
|
println ">> ${it.target}"
|
|
} else {
|
|
println "> ${it.target}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
|
id "com.android.application" version '8.10.1' apply false
|
|
id("org.jetbrains.kotlin.android") version "2.1.10" apply false
|
|
id("com.google.gms.google-services") version "4.4.2" apply false
|
|
id("com.google.firebase.crashlytics") version "3.0.3" apply false
|
|
|
|
id ("com.huawei.agconnect.agcp") version "1.7.3.302" apply false
|
|
id ("com.huawei.agconnect.apms") version "1.6.1.300" apply false
|
|
}
|
|
|
|
|
|
|
|
include ":app"
|