Files
apollo/settings.gradle
T
Gary Tierney 0651d535fa Update to Kotlin 1.60 and Gradle 4.9
Removes the dependency on legacy script compilation and now relies on script
discovery.  In addition, the Gradle build scripts were refactored and updated
to be compatible with Gradle 5.0 and make use of the new java-library
configurations.
2018-08-19 19:26:51 +01:00

40 lines
995 B
Groovy

import java.nio.file.Paths
import java.nio.file.Path
rootProject.name = 'org.apollo'
include ':cache'
include ':game'
include ':game:plugin'
include ':game:plugin-testing'
include ':net'
include ':util'
def pluginDirs = [
rootProject.projectDir.toPath().resolve("game/plugin"),
]
def processPluginDir(Path pluginDir) {
if (pluginDir.toFile().exists()) {
def pluginFileFinder = new FileNameFinder();
def pluginFiles = pluginFileFinder.getFileNames(pluginDir.toString(), "**/*.gradle");
pluginFiles.each { filename ->
def path = Paths.get(filename)
def parentPath = path.parent
if (parentPath == pluginDir) {
return
}
def relativePath = pluginDir.relativize(parentPath)
def pluginName = relativePath.toString().replace(File.separator, ":")
include ":game:plugin:$pluginName"
}
}
}
pluginDirs.each { processPluginDir(it) }
include 'test-plugin'