Skip to content

Instantly share code, notes, and snippets.

@jrglee
Last active March 31, 2016 04:54
Show Gist options
  • Save jrglee/92824e2071edb87820ad30172c749df0 to your computer and use it in GitHub Desktop.
Save jrglee/92824e2071edb87820ad30172c749df0 to your computer and use it in GitHub Desktop.
Initial Gradle build for Java projects
apply plugin: 'java'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
dependencies {
compile 'org.projectlombok:lombok:1.16.8'
testCompile 'junit:junit:4.12'
testCompile 'org.assertj:assertj-core:3.2.0'
}
repositories {
mavenCentral()
}
test {
testLogging {
events "passed", "skipped", "failed"
afterSuite { desc, result ->
if (!desc.parent) {
println "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)"
}
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.12'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment