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