OutputDir defaults to the build name.
This commit is contained in:
parent
d1c8a74355
commit
a221980d98
@ -24,6 +24,7 @@ abstract class BuildScriptBase extends Script {
|
||||
private String extending
|
||||
private Closure buildClosure = { }
|
||||
private File projectRoot
|
||||
private String buildName
|
||||
|
||||
/* --- Instance DSL helpers --- */
|
||||
|
||||
@ -55,6 +56,11 @@ abstract class BuildScriptBase extends Script {
|
||||
this.projectRoot = requireNonNull(projectRoot)
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
void setBuildName(String buildName) {
|
||||
this.buildName = buildName
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
@Nullable
|
||||
String getExtending() {
|
||||
|
@ -22,6 +22,7 @@ final class BuildScriptGetter {
|
||||
def buildScript = scriptClass.getConstructor().newInstance()
|
||||
buildScript.binding = new Binding(this.scriptCliArgs)
|
||||
buildScript.projectRoot = projectDir
|
||||
buildScript.buildName = fqn
|
||||
buildScript.run()
|
||||
buildScript
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ class BuildScriptToBuildSpecConverter {
|
||||
}
|
||||
|
||||
def delegate = this.buildDelegateSupplier.get()
|
||||
delegate.outputDir.setConvention(new File(name.replaceAll(/\./, File.separator)))
|
||||
while (!buildHierarchy.isEmpty()) {
|
||||
def currentScript = buildHierarchy.pop()
|
||||
currentScript.buildClosure.delegate = delegate
|
||||
|
@ -20,7 +20,6 @@ final class BuildDelegate {
|
||||
return {
|
||||
new BuildDelegate(projectDir).tap {
|
||||
basePackages.convention = [] as Set<String>
|
||||
outputDir.convention = new File(projectDir, 'dist')
|
||||
globals.convention = [:]
|
||||
models.convention = [] as Set<Model>
|
||||
textsDirs.convention = [new File(projectDir, 'texts')] as Set<File>
|
||||
|
Loading…
Reference in New Issue
Block a user