-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
51 lines (47 loc) · 1.57 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
apply from: 'config.gradle'
buildscript {
ext.kotlin_version = '1.6.20'
repositories {
jcenter()
mavenCentral() // add repository
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
//阿里镜像仓库
maven { url 'https://maven.aliyun.com/repository/public/' }
maven { url 'https://maven.aliyun.com/repository/google/' }
jcenter()
mavenCentral() // add repository
google()
maven { url "https://jitpack.io" }
maven { url 'https://dl.bintray.com/drummer-aidan/maven' }
}
}
//统一所有module的support依赖版本
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'androidx.core' && details.requested.name.contains('androidx')) {
details.useVersion '1.6.0'
}
if (details.requested.group == 'androidx.annotation' && details.requested.name.contains('annotation')) {
details.useVersion "1.2.0"
}
if (details.requested.group == 'androidx.recyclerview' && details.requested.name.contains('recyclerview')) {
details.useVersion "1.2.1"
}
if (details.requested.group == 'androidx.constraintlayout') {
details.useVersion "2.0.1"
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}