mirror of
https://github.com/MovingBlocks/Terasology
synced 2026-05-24 09:28:22 +00:00
16 lines
747 B
Groovy
16 lines
747 B
Groovy
// Copyright 2021 The Terasology Foundation
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// This magically allows subdirs in this subproject to themselves become sub-subprojects in a proper tree structure
|
|
new File(rootDir, "subsystems").eachDir { possibleSubprojectDir ->
|
|
if (!possibleSubprojectDir.name.startsWith(".")) {
|
|
def subprojectName = "subsystems:" + possibleSubprojectDir.name
|
|
logger.info("Including '{}' as a sub-project.", subprojectName)
|
|
include(subprojectName)
|
|
def subprojectPath = ":" + subprojectName
|
|
def subproject = project(subprojectPath)
|
|
subproject.projectDir = possibleSubprojectDir
|
|
} else {
|
|
logger.info("Ignoring hidden folder '{}'.", possibleSubprojectDir)
|
|
}
|
|
}
|