forked from afkT/DevUtils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
77 lines (59 loc) · 2.76 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
// 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")
buildscript {
// Kotlin 版本
ext.kotlin_version = "1.7.10"
ext.kotlin_stdlib = "1.7.10"
ext.matrix_version = "2.0.8"
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:7.3.0'
// kotlin https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-gradle-plugin
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// https://mvnrepository.com/artifact/org.jetbrains.dokka/dokka-gradle-plugin
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.7.10"
// ARouter AutoRegister https://mvnrepository.com/artifact/com.alibaba/arouter-register
classpath "com.alibaba:arouter-register:1.0.2"
// android maven https://plugins.gradle.org/plugin/com.github.dcendents.android-maven
classpath "com.github.dcendents:android-maven-gradle-plugin:2.1"
// bintray https://plugins.gradle.org/plugin/com.jfrog.bintray
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5"
}
}
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"
// }
// }
}
task clean(type: Delete) {
delete rootProject.buildDir
}
// 全局编码设置
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
// 第三方库版本强制统一处理
apply from: rootProject.file(files.unified_library_config_gradle)