-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.gradle
56 lines (45 loc) · 1.41 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
46
47
48
49
50
51
52
53
54
55
56
rootProject.name = 'hale-core'
// This script automatically discovers sub-projects.
// It should not contain any project-specific information.
boolean isProjectDir(File f, filter = null) {
f.isDirectory() && !f.name.startsWith('.') && f.name != 'buildSrc' && new File(f, 'build.gradle').isFile() && (filter == null || filter(f))
}
void searchDir(collectDirs, File dir, filter = null) {
if (isProjectDir(dir, filter)) {
collectDirs << dir
}
else {
dir.eachDir { subDir ->
searchDir(collectDirs, subDir, filter)
}
}
}
void includeProjects(relativeDirPath = null, filter = null) {
def dir = relativeDirPath ? new File(rootProject.projectDir, relativeDirPath) : rootProject.projectDir
if(dir.exists() && dir.isDirectory()) {
def rootPath = rootProject.projectDir.absolutePath
def projectDirs = []
dir.eachDir { subDir ->
if (subDir.name != 'build') {
searchDir(projectDirs, subDir, filter)
}
}
projectDirs.each { File subdir ->
include subdir.absolutePath.substring(rootPath.length() + 1).replace(File.separator, ':')
}
}
}
includeProjects()
// dependency resolution management
dependencyResolutionManagement {
versionCatalogs {
// testLibs separate version catalog
testLibs {
from(files("gradle/test-libs.versions.toml"))
}
// offline resources
resJars {
from(files("gradle/resources.versions.toml"))
}
}
}