-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
77 lines (63 loc) · 2 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
import java.util.concurrent.TimeUnit
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
useBytex = USE_BYTEX == "true"
}
repositories {
google()
mavenLocal()
mavenCentral()
maven { url "https://artifact.bytedance.com/repository/byteX/" }
}
dependencies {
classpath "com.android.tools.build:gradle:$AGP_VERSION"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN_VERSION"
if (useBytex) {
classpath "com.bytedance.android.byteX:base-plugin:$BYTEX_VERSION"
classpath "io.github.porum:muddy-gradle-plugin-bytex:$VERSION"
} else {
classpath "io.github.porum:muddy-gradle-plugin:$VERSION"
}
}
}
allprojects {
group = GROUP
version = VERSION
repositories {
google()
mavenLocal()
mavenCentral()
maven { url "https://artifact.bytedance.com/repository/byteX/" }
}
tasks.withType(Javadoc) {
options.encoding = "UTF-8"
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
}
Properties props = new Properties()
props.load(new FileInputStream(rootProject.file("local.properties")))
project.ext {
setProperty("sonatypeUserName", props["sonatypeUserName"])
setProperty("sonatypePassword", props["sonatypePassword"])
setProperty("signing.keyId", props["signing.keyId"])
setProperty("signing.password", props["signing.password"])
setProperty("signing.secretKeyRingFile", props["signing.secretKeyRingFile"])
}
File publishScript = project.file("publish.gradle")
subprojects {
if (name.startsWith("muddy")) {
apply from: publishScript
}
configurations.configureEach {
resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS)
}
}
configurations.configureEach {
resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS)
}
task clean(type: Delete) {
delete rootProject.buildDir
}