-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.gradle
35 lines (32 loc) · 1.2 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
/*
* Copyright (c) 2025 Rahul Anishetty
*
* This program is dual-licensed under either AGPL-3.0 or a commercial license.
* For commercial licensing options, please contact the author.
* For AGPL-3.0 licensing details, see the LICENSE file in the repository root.
*/
plugins {
// Apply the foojay-resolver plugin to allow automatic download of JDKs
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0'
}
rootProject.name = 'upo'
def includeProjects(File rootDir) {
rootDir.traverse(
type: groovy.io.FileType.DIRECTORIES,
preDir: { File dir ->
// Return false to skip directory
if (dir.name in ['src', 'test', 'build']) {
return false
}
// Check for build.gradle and include if found
if (new File(dir, 'build.gradle').exists() && !new File(dir, 'settings.gradle').exists()) {
def relativePath = rootDir.toURI().relativize(dir.toURI()).toString()
def rewrittenName = ':' + relativePath.replaceAll('/$', '').replace('/', '-')
include rewrittenName
project(rewrittenName).projectDir = dir
println("including project: " + rewrittenName + ", for directory: " + dir.toString())
}
return true // Continue traversing
})
}
includeProjects(file('./'))