-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
53 lines (48 loc) · 1.76 KB
/
build.gradle
File metadata and controls
53 lines (48 loc) · 1.76 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: rootDir.toString() + '/config.gradle'
buildscript {
repositories {
maven { url "https://mirrors.tencent.com/nexus/repository/maven-public/" }
maven { url "https://mirrors.tencent.com/repository/maven/thirdparty-snapshots/" }
maven { url "https://repo1.maven.org/maven2" }
maven { url "https://s01.oss.sonatype.org/content/groups/public" }
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.2'
classpath "com.bihe0832.android:GradleDependenciesCheck:4.1.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22"
}
}
task clean(type: Delete) {
println("clean " + rootProject.buildDir)
delete rootProject.buildDir
}
allprojects {
repositories {
maven { url "https://mirrors.tencent.com/nexus/repository/maven-public/" }
maven { url "https://mirrors.tencent.com/repository/maven/thirdparty-snapshots/" }
maven { url "https://repo1.maven.org/maven2" }
maven { url "https://s01.oss.sonatype.org/content/groups/public" }
flatDir {
dirs './../libs/'
}
}
}
subprojects {
afterEvaluate { Project subproject ->
// AGP 8.0+ 需要统一 Java 版本
if (subproject.hasProperty('android')) {
subproject.android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}
}
subproject.tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = "17"
}
}
}
}