Skip to content

Commit cce0b40

Browse files
author
Rob Rudin
committed
#198 mlNewProject now updates mlAppConfig before generating scaffolding
1 parent 8b5f9f2 commit cce0b40

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/main/groovy/com/marklogic/gradle/task/NewProjectTask.groovy

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,18 @@ class NewProjectTask extends MarkLogicTask {
6363

6464
if (ant.mlScaffold == "y") {
6565
println "Writing project scaffolding files"
66-
new ScaffoldGenerator().generateScaffold(".", getAppConfig())
66+
def appConfig = getAppConfig()
67+
appConfig.setName(ant.mlAppName)
68+
appConfig.setHost(ant.mlHost)
69+
appConfig.setRestAdminUsername(ant.mlUsername)
70+
appConfig.setRestAdminPassword(ant.mlPassword)
71+
if (ant.mlRestPort) {
72+
appConfig.setRestPort(Integer.parseInt(ant.mlRestPort))
73+
}
74+
if (ant.mlTestRestPort) {
75+
appConfig.setTestRestPort(Integer.parseInt(ant.mlTestRestPort))
76+
}
77+
new ScaffoldGenerator().generateScaffold(".", appConfig)
6778
}
6879
}
6980

0 commit comments

Comments
 (0)