-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
56 lines (46 loc) · 1.36 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
// 简化的 build.gradle 文件
buildscript {
ext {
kotlin_version = '1.8.21' // 根据需要调整 Kotlin 版本
}
repositories {
google()
mavenCentral()
gradlePluginPortal()
// 阿里云仓库声明在后(防止镜像覆盖官方仓库)
maven {
url "https://maven.aliyun.com/repository/public"
allowInsecureProtocol = true // 允许 HTTP
}
maven {
url "https://maven.aliyun.com/repository/google"
allowInsecureProtocol = true
}
}
dependencies {
// 构建脚本依赖
}
}
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
}
// 其他配置
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
allprojects {
configurations.configureEach {
resolutionStrategy {
// 强制使用特定版本
force 'org.dom4j:dom4j:2.1.3'
force 'com.sun.xml.bind:jaxb-impl:2.3.1'
}
// 全局排除规则
exclude group: 'com.sun.xml.bind', module: 'jaxb-core'
exclude group: 'xml-apis', module: 'xml-apis'
exclude group: 'pull-parser', module: 'pull-parser'
exclude group: 'dom4j', module: 'dom4j'
}
}