}
}
-clean {
- group = "JPF Build"
-}
-
task generateVersion {
+ group = "JPF Resources"
description = "Generates the .version file with the current revision hash"
- group = "JPF Build Properties"
-
doLast {
def revision = "git rev-parse HEAD".execute().text
new File(".version").withWriter("utf-8") { writer ->
}
task buildInfo {
- group = "JPF Build Properties"
+ group = "JPF Resources"
description = "Creates build info properties."
doLast {
def writer = new File("build.properties").newWriter("utf-8")
info.store(writer, "JPF core build info")
writer.close()
-
- // Copies generated build.properties file to the build directory
- from "build.properties"
- into sourceSets.main.java.outputDir.path + "/gov/nasa/jpf"
}
}
-task compile(type: Copy) {
+task copyResources(type: Copy) {
+ group = "JPF Resources"
+ description = "Copies .version and build.properties files to the build directory."
+
+ dependsOn buildInfo
+ dependsOn generateVersion
+
+ from "build.properties"
+ into sourceSets.main.java.outputDir.path + "/gov/nasa/jpf"
+
+ from ".version"
+ into sourceSets.main.java.outputDir.path + "/gov/nasa/jpf"
+}
+
+
+task compile {
group = "JPF Build"
description = "Compiles all JPF core sources."
// These are automatic generated tasks from the Java Gradle Plugin.
- // Gradle is able to infer the ordering of the source sets
+ // Gradle is able to infer the order of the source sets
// due to the compileClasspath attribute
- dependsOn compileTestJava, compileExamplesJava, generateVersion
-
- // Copies .version file to the build directory
- from ".version"
- into sourceSets.main.java.outputDir.path + "/gov/nasa/jpf"
+ dependsOn compileTestJava
+ dependsOn compileExamplesJava
}
task srcDist(type: Zip) {
group = "JPF Jars"
dependsOn compile
+ dependsOn copyResources
from sourceSets.classes.java.outputDir
from sourceSets.annotations.java.outputDir
group = "JPF Jars"
dependsOn compile
+ dependsOn copyResources
from sourceSets.main.java.outputDir
from sourceSets.peers.java.outputDir
group = "JPF Jars"
dependsOn compile
+ dependsOn copyResources
from sourceSets.annotations.java.outputDir
}
group = "JPF Jars"
dependsOn compile
+ dependsOn copyResources
from(sourceSets.test.java.outputDir) {
include "classloader_specific_tests/*.class"
group = "JPF Jars"
dependsOn compile
+ dependsOn copyResources
from(sourceSets.main.java.outputDir) {
include "gov/nasa/jpf/tool/Run.class"
group = "JPF Jars"
dependsOn compile
+ dependsOn copyResources
from(sourceSets.main.java.outputDir) {
include "gov/nasa/jpf/tool/Run.class"
task buildJars {
group = "JPF Build"
- description = "Generates the core JPF jar files."
-
- dependsOn buildInfo
-
- dependsOn classloaderSpecificTestsJar, annotationsJar,
- jpfClassesJar, jpfJar, runJpfJar,
- runTestJar
+ description = "Generates all core JPF jar files."
+
+ dependsOn classloaderSpecificTestsJar
+ dependsOn annotationsJar
+ dependsOn jpfClassesJar
+ dependsOn jpfJar
+ dependsOn runJpfJar
+ dependsOn runTestJar
}
test {