-
Notifications
You must be signed in to change notification settings - Fork 308
/
Copy pathbuild.gradle
82 lines (64 loc) · 3.22 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
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
77
78
79
80
81
82
// Top-level build file where you can add configuration options common to all sub-projects/modules.
//apply from: rootProject.file("file/gradle/config.gradle")
//apply from: rootProject.file("file/gradle/config_split.gradle")
//apply from: rootProject.file("file/gradle/config_files.gradle")
buildscript {
// 防止无法获取 ext.deps
apply from: rootProject.file("file/gradle/config.gradle")
apply from: rootProject.file("file/gradle/config_split.gradle")
apply from: rootProject.file("file/gradle/config_files.gradle")
repositories { // 该 repositories 用于 buildscript dependencies 插件、脚本依赖加载
// AliRepo 阿里仓库服务 https://maven.aliyun.com/mvn/view
maven { url "https://maven.aliyun.com/repository/google" }
maven { url "https://maven.aliyun.com/repository/public" }
maven { url "https://maven.aliyun.com/repository/gradle-plugin" }
google()
// 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:8.7.3'
// kotlin https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-gradle-plugin
classpath rootProject.ext.deps.build.kotlin_gradle_plugin
// https://mvnrepository.com/artifact/org.jetbrains.dokka/dokka-gradle-plugin
classpath rootProject.ext.deps.build.dokka_gradle_plugin
// // ARouter AutoRegister https://mvnrepository.com/artifact/com.alibaba/arouter-register
// classpath rootProject.ext.deps.lib.arouter_register
// // ARouter https://www.jitpack.io/#jadepeakpoet/ARouter
// classpath rootProject.ext.deps.lib.arouter_register_fork
// TheRouter AutoRegister https://mvnrepository.com/artifact/cn.therouter/plugin
classpath rootProject.ext.deps.lib.therouter_plugin
// android maven https://plugins.gradle.org/plugin/com.github.dcendents.android-maven
classpath rootProject.ext.deps.build.android_maven_gradle_plugin
// // bintray https://plugins.gradle.org/plugin/com.jfrog.bintray
// classpath rootProject.ext.deps.build.gradle_bintray_plugin
}
}
allprojects {
repositories { // 该 repositories 用于 app、module dependencies 第三方库 implementation 等依赖加载
google()
// 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/" }
}
// gradle.projectsEvaluated {
// tasks.withType(JavaCompile) {
// options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
// }
// }
}
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
// 全局编码设置
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
}
// 第三方库版本强制统一处理
apply from: rootProject.file(files.unified_library_config_gradle)