-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
125 lines (94 loc) · 4.34 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
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")
apply from: rootProject.file("file/gradle/config_sdk.gradle")
apply from: rootProject.file(files.task_generate_deps_file_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()
mavenCentral()
// 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/" }
// =============
// = 第三方 SDK =
// =============
// 个推 maven
maven { url "https://mvn.getui.com/nexus/content/repositories/releases/" }
// 华为 maven
maven { url "https://developer.huawei.com/repo/" }
// 荣耀 maven
maven { url "https://developer.hihonor.com/repo/" }
// 微博 maven
maven { url "https://dl.bintray.com/thelasterstar/maven/" }
// 抖音 maven
maven { url "https://artifact.bytedance.com/repository/AwemeOpenSDK" }
}
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
// TheRouter AutoRegister https://mvnrepository.com/artifact/cn.therouter/plugin
classpath rootProject.ext.deps.lib.therouter_plugin
// greendao https://mvnrepository.com/artifact/org.greenrobot/greendao-gradle-plugin
classpath rootProject.ext.deps_split.lib.greenDAO_gradle_plugin
// 华为推送所需 https://mvnrepository.com/artifact/com.huawei.agconnect/agcp
classpath rootProject.ext.deps_sdk.plugin.huawei_agconnect_plugin
// 荣耀推送所需 https://developer.honor.com/cn/docs/11002/guides/intergrate
classpath rootProject.ext.deps_sdk.plugin.hihonor_aps_plugin
}
}
allprojects {
repositories { // 该 repositories 用于 app、module dependencies 第三方库 implementation 等依赖加载
google()
mavenCentral()
// 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/" }
// =============
// = 第三方 SDK =
// =============
// 个推 maven
maven { url "https://mvn.getui.com/nexus/content/repositories/releases/" }
// 华为 maven
maven { url "https://developer.huawei.com/repo/" }
// 荣耀 maven
maven { url "https://developer.hihonor.com/repo/" }
// 微博 maven
maven { url "https://dl.bintray.com/thelasterstar/maven/" }
// 抖音 maven
maven { url "https://artifact.bytedance.com/repository/AwemeOpenSDK" }
// OPPO maven username、password 是 OPPO 官方要求配置的固定值 ( 不可修改 )
maven {
url "https://maven.columbus.heytapmobi.com/repository/releases/"
credentials {
username "nexus"
password "c0b08da17e3ec36c3870fed674a0bcb36abc2e23"
}
}
}
// 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)