Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 31 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,55 @@

buildscript {
repositories {
// 华为开源镜像:https://mirrors.huaweicloud.com
maven { url 'https://repo.huaweicloud.com/repository/maven' }
maven { url 'https://developer.huawei.com/repo/' }

// 添加阿里云 maven 地址
maven {
url 'https://maven.aliyun.com/repository/public/'
allowInsecureProtocol = true //这一行
url 'http://maven.aliyun.com/nexus/content/groups/public/'
}
maven {
allowInsecureProtocol = true //这一行
url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'
}
google()
//jcenter()
mavenCentral()

maven {url 'http://developer.huawei.com/repo/'}
maven { url 'https://repo1.maven.org/maven2/' }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
classpath 'com.android.tools.build:gradle:7.0.2'
//3.5.2 -> 7.0.2

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
// Google Firebase cloud messaging
classpath 'com.google.gms:google-services:4.3.8'
//classpath 'com.huawei.agconnect:agcp:1.6.0.300'
classpath 'com.huawei.agconnect:agcp:1.2.1.301'

//1.2.1.301 -> 1.6.0.300
}
}

allprojects {
repositories {
// 华为开源镜像:https://mirrors.huaweicloud.com
maven { url 'https://repo.huaweicloud.com/repository/maven' }

// 添加阿里云 maven 地址
maven {
allowInsecureProtocol = true //这一行
url 'http://maven.aliyun.com/nexus/content/groups/public/'
}
maven {
url 'https://maven.aliyun.com/repository/public/'
allowInsecureProtocol = true //这一行
url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'
}
maven { url 'https://repo1.maven.org/maven2/' }
maven { url 'https://developer.huawei.com/repo/' }
google()
//jcenter()
mavenCentral()
maven { url 'http://developer.huawei.com/repo'}
maven { url 'https://jitpack.io' }
}
}

Expand Down Expand Up @@ -61,6 +79,8 @@ ext{
}
}

apply plugin: 'com.huawei.agconnect'

task clean(type: Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip