From 8a79d10dd3422f7badb570ba68fc9f22c3845553 Mon Sep 17 00:00:00 2001 From: Daniel Felipe Gonzalez Obando <danyfel80@gmail.com> Date: Mon, 26 Nov 2018 13:48:36 +0100 Subject: [PATCH] edited to include class files on source jar --- SLIC/build.gradle | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/SLIC/build.gradle b/SLIC/build.gradle index 6b40470..f54db06 100644 --- a/SLIC/build.gradle +++ b/SLIC/build.gradle @@ -4,13 +4,20 @@ apply plugin: 'eclipse' version = '0.1.0' println project.name +configurations { + extraLibs // configuration that holds jars to include in the jar +} + repositories { mavenCentral() jcenter() } +println "ICY_HOME=${System.env.ICY_HOME}" dependencies { - compile 'org.slf4j:slf4j-api:1.7.21' + extraLibs 'org.slf4j:slf4j-api:1.7.21' + + configurations.implementation.extendsFrom(configurations.extraLibs) compile files("${System.env.ICY_HOME}/icy.jar") // Icy core compile files("${System.env.ICY_HOME}/lib/bioformats.jar") // bioformats @@ -43,9 +50,11 @@ eclipse { } } -task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' - from sourceSets.main.allSource +task sourcesJar(type: Jar) { + classifier = 'sources' + from sourceSets.main.output + from sourceSets.main.java + from configurations.extraLibs.collect { it.isDirectory() ? it : zipTree(it) } } task javadocJar(type: Jar, dependsOn: javadoc) { -- GitLab