Added missing packaging tasks on Gradle build (#84)
authorJeanderson Barros Candido <jeandersonbc@gmail.com>
Fri, 15 Jun 2018 06:14:15 +0000 (03:14 -0300)
committercyrille-artho <cyrille-artho@users.noreply.github.com>
Fri, 15 Jun 2018 06:14:15 +0000 (15:14 +0900)
* Added srcDist task (#82)

* Added dist task (#82)

build.gradle

index 1ee8699..af52894 100644 (file)
@@ -108,6 +108,53 @@ task compile(type: Copy) {
     into sourceSets.main.java.outputDir.path + "/gov/nasa/jpf"
 }
 
+task srcDist(type: Zip) {
+    group = "JPF Build"
+    description = "Builds the source distribution"
+
+    baseName = project.name
+    version = "git rev-parse --short HEAD".execute().text.trim()
+    classifier = "src"
+    extension = "zip"
+
+    destinationDir = buildDir
+    includeEmptyDirs = false
+
+    from projectDir
+    include "build.gradle"
+    include "settings.gradle"
+    include "gradlew"
+    include "gradlew.bat"
+    include "gradle/**/*"
+    include "nbproject/**/*"
+    include "eclipse/**/*"
+    include "src/**/*"
+    include "bin/**/*"
+    include "jpf.properties"
+    include "build.properties"
+    include "LICENSE-2.0.txt"
+    include "README.md"
+}
+
+task dist(type: Zip) {
+    group = "JPF Build"
+    description = "Builds binary distribution"
+
+    baseName = project.name
+    version = "git rev-parse --short HEAD".execute().text.trim()
+    extension = "zip"
+
+    destinationDir = buildDir
+    includeEmptyDirs = false
+
+    from projectDir
+    include "jpf.properties"
+    include "build.properties"
+    include "bin/**/*"
+    include "lib/**/*"
+    include "${buildDir.name}/**/*.jar"
+}
+
 task jpfClassesJar(type: Jar) {
     archiveName = "jpf-classes.jar"
     destinationDir = file("${buildDir}")