From 17ed1b71e7e640cc1a086c6a7151fe20300b15e6 Mon Sep 17 00:00:00 2001 From: Kalle Stenflo Date: Thu, 16 Oct 2014 10:58:47 +0200 Subject: [PATCH] Added task to create distribution bundle. --- json-path/build.gradle | 59 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/json-path/build.gradle b/json-path/build.gradle index 6c45d79a..caf7fa1e 100644 --- a/json-path/build.gradle +++ b/json-path/build.gradle @@ -20,3 +20,62 @@ dependencies { testCompile libs.test } +task distZip(type: Zip, dependsOn: assemble) { + classifier = 'with-dependencies' + + from('build/docs') { + into 'api' + } + from(sourcesJar) { + into 'source' + } + from(jar) { + into 'lib' + } + from(project.configurations.compile) { + into 'lib' + exclude { it.file.name.contains('gson') || it.file.name.contains('jackson') } + } + from(project.configurations.compile) { + into 'lib-optional/jackson' + include { it.file.name.contains('jackson') } + } + from(project.configurations.compile) { + into 'lib-optional/gson' + include { it.file.name.contains('gson') } + } +} + +task distTar(type: Tar, dependsOn: assemble) { + classifier = 'with-dependencies' + compression = Compression.GZIP + extension = 'tar.gz' + + from('build/docs') { + into 'api' + } + from(sourcesJar) { + into 'source' + } + from(jar) { + into 'lib' + } + from(project.configurations.compile) { + into 'lib' + exclude { it.file.name.contains('gson') || it.file.name.contains('jackson') } + } + from(project.configurations.compile) { + into 'lib-optional/jackson' + include { it.file.name.contains('jackson') } + } + from(project.configurations.compile) { + into 'lib-optional/gson' + include { it.file.name.contains('gson') } + } +} + +task dist(){ + +} +dist.dependsOn distZip +dist.dependsOn distTar