27 lines
1003 B
Groovy
27 lines
1003 B
Groovy
import groovy.json.JsonSlurper
|
|
|
|
plugins {
|
|
id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0'
|
|
}
|
|
|
|
rootProject.name = 'ca-skeleton'
|
|
|
|
File repositoryRoot = settingsDir.parentFile
|
|
File moduleRegistryFile = new File(repositoryRoot, '.harness/project/modules.yaml')
|
|
if (!moduleRegistryFile.isFile()) {
|
|
throw new GradleException("Missing module registry: ${moduleRegistryFile}")
|
|
}
|
|
|
|
def moduleRegistry = new JsonSlurper().parse(moduleRegistryFile)
|
|
if (!(moduleRegistry.modules instanceof List) || moduleRegistry.modules.isEmpty()) {
|
|
throw new GradleException("Module registry has no modules: ${moduleRegistryFile}")
|
|
}
|
|
|
|
moduleRegistry.modules.each { module ->
|
|
if (!(module.gradle_path instanceof String) || !(module.source_path instanceof String)) {
|
|
throw new GradleException("Each registry module needs string gradle_path and source_path")
|
|
}
|
|
include module.gradle_path
|
|
project(module.gradle_path).projectDir = new File(repositoryRoot, module.source_path)
|
|
}
|