Skip to content

Instantly share code, notes, and snippets.

@jlmelville
Created November 1, 2015 22:13
Show Gist options
  • Save jlmelville/16493f0562254ba0b02b to your computer and use it in GitHub Desktop.
Save jlmelville/16493f0562254ba0b02b to your computer and use it in GitHub Desktop.
Manually creating a Gradle task with the Jenkins Jobs DSL
configure { project ->
project / builders / 'hudson.plugins.gradle.Gradle' {
description 'Builds and runs unit tests.'
tasks "clean test javadoc"
rootBuildScriptDir ''
fromRootBuildScriptDir true
useWrapper true
makeExecutable true
useWorkspaceAsHome false
}
}
@jlmelville
Copy link
Author

When I was using the Jenkins Job DSL for some reason I couldn't get the Gradle command to work. Fortunately, it's quite easy to write the XML directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment