Skip to content

Instantly share code, notes, and snippets.

@buzztaiki
Created March 16, 2012 19:56
Show Gist options
  • Select an option

  • Save buzztaiki/2052230 to your computer and use it in GitHub Desktop.

Select an option

Save buzztaiki/2052230 to your computer and use it in GitHub Desktop.
Gradle build file example
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
testCompile 'junit:junit:4.+'
}
test {
afterTest { desc, result ->
if (result.resultType == TestResult.ResultType.FAILURE) {
logger.error "${result.resultType}: ${desc.className}#${desc.name}: ${result.exception.message}"
}
}
onOutput { desc, event ->
event.message.eachLine {
logger.lifecycle "${desc.className}#${desc.name}: ${it}"
}
}
}
tasks.withType(Compile).all {
options.debug = true
options.compilerArgs = ['-Xlint:all']
}
task createProject << {
sourceSets.all {
allSource.srcDirs*.mkdirs()
}
project.properties.webAppDir?.mkdirs()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment