I have the following JobDSL spec:
job {
steps {
gradle('generateLock saveLock', '-PdependencyLock.includeTransitives=true', true) { node ->
node / wrapperScript('${NEBULA_HOME}/gradlew')
}
gradle('check', '', true) { node ->
node / wrapperScript('${NEBULA_HOME}/gradlew')
}
}
}
I'd like to refactor the common code, say, into a function:
def gradlew(String tasks, String options) {
gradle(tasks, options, true) { node ->
node / wrapperScript('${NEBULA_HOME}/gradlew')
}
}
But the gradle
function isn't visible from within the gradlew
function. What's the right way to do this?