-
Notifications
You must be signed in to change notification settings - Fork 30
/
build-flags.gradle
51 lines (43 loc) · 1.93 KB
/
build-flags.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
def libDir = new File(buildscript.sourceFile.parentFile, 'lib')
apply from: "${libDir}/prerequisite.gradle"
apply from: "${libDir}/common-dependencies.gradle"
apply from: "${libDir}/common-git.gradle"
apply from: "${libDir}/common-info.gradle"
apply from: "${libDir}/common-publish.gradle"
apply from: "${libDir}/common-release.gradle"
apply from: "${libDir}/common-wrapper.gradle"
apply from: "${libDir}/common-misc.gradle"
if (!projectsWithFlags('bom').isEmpty()) {
apply from: "${libDir}/bom.gradle"
}
if (!projectsWithFlags('java').isEmpty()) {
apply from: "${libDir}/java.gradle"
apply from: "${libDir}/java-javadoc.gradle"
apply from: "${libDir}/java-coverage.gradle"
apply from: "${libDir}/java-rpc-thrift.gradle"
if (projectsWithFlags('java').find { it.ext.hasSourceDirectory('proto') }) {
if (!managedVersions.containsKey('com.google.protobuf:protobuf-gradle-plugin')) {
throw new IllegalStateException(
"com.google.protobuf:protobuf-gradle-plugin must be specified in dependencies.(toml|yml) " +
"to compile .proto files.")
}
apply from: "${libDir}/java-rpc-proto.gradle"
}
if (!projectsWithFlags('java', 'relocate').isEmpty()) {
['gradle.plugin.com.github.johnrengelman:shadow', 'com.guardsquare:proguard-gradle'].each {
if (!managedVersions.containsKey(it)) {
throw new IllegalStateException(
"${it} must be specified in dependencies.(toml|yml) to use the 'relocate' flag.")
}
}
apply from: "${libDir}/java-shade.gradle"
}
apply from: "${libDir}/java-versionprops.gradle"
apply from: "${libDir}/java-publish.gradle"
}
if (!projectsWithFlags('kotlin').isEmpty()) {
apply from: "${libDir}/kotlin.gradle"
}
if (!projectsWithFlags('scala_2.12').isEmpty() || !projectsWithFlags('scala_2.13').isEmpty()) {
apply from: "${libDir}/scala.gradle"
}