forked from Leifzhang/GradleSample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
53 lines (46 loc) · 1.75 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.7.10"
repositories {
maven { setUrl("https://maven.aliyun.com/repository/central/") }
maven {
setUrl("https://storage.googleapis.com/r8-releases/raw")
}
google()
}
dependencies {
classpath("com.android.tools:r8:3.2.60")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
plugins {
id("kronos.dependencies") apply(false)
id("kronos.library") apply(false)
id('com.android.application') version '7.2.2' apply false
id('com.android.library') version '7.2.2' apply false
id 'org.jetbrains.kotlin.jvm' version '1.7.10' apply false
id("kronos.a8") apply(false)
}
allprojects {
apply from: new File(getRootDir(), ".buildscripts/flavor.gradle")
group = "com.kronos.sample"
configurations.all { Configuration c ->
c.resolutionStrategy {
dependencySubstitution {
all { DependencySubstitution dependency ->
if (dependency.requested instanceof ModuleComponentSelector) {
def p = rootProject.allprojects.find { p -> p.group == dependency.requested.group && p.name == dependency.requested.module }
if (p != null) {
logger.lifecycle(project(p.path).name + ":selected local project")
dependency.useTarget(project(p.path), 'selected local project')
}
}
}
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}