mirror of
https://github.com/jlengrand/korge-samples.git
synced 2026-03-10 08:31:18 +00:00
31 lines
782 B
Groovy
31 lines
782 B
Groovy
enableFeaturePreview("GRADLE_METADATA")
|
|
|
|
/*
|
|
for (file in rootDir.listFiles()) {
|
|
if (file.isDirectory() && file.name.startsWith("") && (new File(file, "build.gradle").exists() || new File(file, "build.gradle.kts").exists())) {
|
|
include(":${file.name}")
|
|
}
|
|
}
|
|
*/
|
|
|
|
String moduleName(File f) {
|
|
if (f.parentFile == rootDir || f.parentFile == null) {
|
|
return f.name
|
|
} else {
|
|
def p = moduleName(f.parentFile)
|
|
return "${p}:${f.name}"
|
|
}
|
|
}
|
|
|
|
fileTree(rootProject.projectDir) {
|
|
include("**"+"/build.gradle.kts")
|
|
include("**"+"/build.gradle")
|
|
exclude("**"+"/build/**")
|
|
}.forEach {
|
|
if (it.parentFile != null && !it.path.contains("korge-bundles")) {
|
|
def sample = moduleName(it.parentFile)
|
|
include(":$sample")
|
|
}
|
|
//project(":$sample").projectDir = File(relativePath(it.parent))
|
|
}
|