-
Notifications
You must be signed in to change notification settings - Fork 318
Expand file tree
/
Copy pathbuild.gradle
More file actions
76 lines (59 loc) · 2.93 KB
/
build.gradle
File metadata and controls
76 lines (59 loc) · 2.93 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
buildscript {
// ext.deps
apply from: rootProject.file("file/gradle/config.gradle")
apply from: rootProject.file("file/gradle/config_libs.gradle")
apply from: rootProject.file("file/gradle/config_files.gradle")
repositories { // 该 repositories 用于 buildscript dependencies 插件、脚本依赖加载
google()
mavenCentral()
// AliRepo 阿里仓库服务 https://maven.aliyun.com/mvn/view
maven { url "https://maven.aliyun.com/repository/central" }
maven { url "https://maven.aliyun.com/repository/public" }
maven { url "https://maven.aliyun.com/repository/google" }
maven { url "https://maven.aliyun.com/repository/gradle-plugin" }
maven { url "https://maven.aliyun.com/repository/apache-snapshots" }
maven { url "https://maven.aliyun.com/repository/jcenter" }
// jitpack maven
maven { url "https://jitpack.io" }
maven { url "https://plugins.gradle.org/m2" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://repo1.maven.org/maven2/" }
}
dependencies {
// https://mvnrepository.com/artifact/com.android.tools.build/gradle
classpath 'com.android.tools.build:gradle:9.1.0'
// kotlin https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-gradle-plugin
classpath rootProject.ext.deps.build.kotlin_gradle_plugin
// https://mvnrepository.com/artifact/com.vanniktech/gradle-maven-publish-plugin
classpath rootProject.ext.deps.build.gradle_maven_publish_plugin
}
}
allprojects {
repositories { // 该 repositories 用于 app、module dependencies 第三方库 implementation 等依赖加载
google()
mavenCentral()
// AliRepo 阿里仓库服务 https://maven.aliyun.com/mvn/view
maven { url "https://maven.aliyun.com/repository/central" }
maven { url "https://maven.aliyun.com/repository/public" }
maven { url "https://maven.aliyun.com/repository/google" }
maven { url "https://maven.aliyun.com/repository/gradle-plugin" }
maven { url "https://maven.aliyun.com/repository/apache-snapshots" }
maven { url "https://maven.aliyun.com/repository/jcenter" }
// jitpack maven
maven { url "https://jitpack.io" }
maven { url "https://plugins.gradle.org/m2" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://repo1.maven.org/maven2/" }
}
}
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
// 全局编码设置
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
}
// 第三方库版本强制统一处理
apply from: rootProject.file(files.unified_library_config_gradle)
//// 生成依赖库 deps 文件信息任务【升级全部第三方库后才放开打印依赖信息】
//apply from: rootProject.file(files.task_generate_deps_file_gradle)