-dependencies {
- testImplementation "junit:junit:4.12"
-}
-
-sourceSets {
- annotations {
- java.srcDirs = ["src/annotations"]
- java.outputDir = file("${buildDir}/annotations")
- }
- main {
- java.srcDirs = ["src/main"]
- java.outputDir = file("${buildDir}/main")
- compileClasspath += sourceSets.annotations.output
- }
- examples {
- java.srcDirs = ["src/examples"]
- java.outputDir = file("${buildDir}/examples")
- compileClasspath += sourceSets.main.output
- }
- classes {
- java.srcDirs = ["src/classes"]
- java.outputDir = file("${buildDir}/classes")
- compileClasspath += sourceSets.main.output + sourceSets.annotations.output
- }
- peers {
- java.srcDirs = ["src/peers"]
- java.outputDir = file("${buildDir}/peers")
- compileClasspath += sourceSets.main.output + sourceSets.annotations.output
- }
- test {
- java.srcDirs = ["src/tests"]
- java.outputDir = file("${buildDir}/tests")
- compileClasspath += sourceSets.annotations.output + sourceSets.classes.output + sourceSets.peers.output
- runtimeClasspath += compileClasspath
- }
-}
-
-task generateVersion {
- group = "JPF Build Resources"
- description = "Generates the .version file with the current revision hash"
- doLast {
- def revision = "git rev-parse HEAD".execute().text
- new File(".version").withWriter("utf-8") { writer ->
- writer.writeLine revision