init: 클린 아키텍처 백엔드
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user