diff --git a/SLIC/build.gradle b/SLIC/build.gradle
index 6b404701501477297e68b9fa9b558be6fd0db300..f54db0661e4f1a9d8f1afe6048f03e9999cbe728 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) {