forked from fkorotkov/intellij-thrift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.gradle
45 lines (38 loc) · 1.24 KB
/
settings.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
/*
* This file was generated by the Gradle 'init' task.
*
* The settings file is used to specify which projects to include in your build.
*
* Detailed information about configuring a multi-project build in Gradle can be found
* in the user manual at https://docs.gradle.org/6.0/userguide/multi_project_builds.html
*/
rootProject.name = 'intellij-thrift'
import static groovy.io.FileType.DIRECTORIES
final excludedDirs = new HashSet(["build", "src"])
String getProjectName(File projectDir) {
return rootDir.toURI()
.relativize(projectDir.toURI())
.toString()
.replaceAll("/", ":")
}
rootDir.traverse(
type: DIRECTORIES,
excludeNameFilter: { it -> excludedDirs.contains(it) }
) { dir ->
if (new File(dir, "build.gradle").exists()) {
include getProjectName(dir)
}
}
ext.isCiServer = System.getenv().containsKey("CIRRUS_CI")
ext.isMasterBranch = System.getenv()["CIRRUS_BRANCH"] == "master"
ext.buildCacheHost = System.getenv().getOrDefault("CIRRUS_HTTP_CACHE_HOST", "localhost:12321")
buildCache {
local {
enabled = !isCiServer
}
remote(HttpBuildCache) {
url = "http://${buildCacheHost}/"
enabled = isCiServer
push = isMasterBranch
}
}