Skip to content

Commit 3ef7de3

Browse files
committed
Collect and include files from compile classpath, excluding signature-related files
Signed-off-by: Rahul Krishna <[email protected]>
1 parent 649f5b5 commit 3ef7de3

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

build.gradle

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,21 @@ task fatjar(type: Jar) {
127127
'Implementation-Version': archiveVersion,
128128
'Main-Class': 'com.ibm.northstar.CodeAnalyzer'
129129
}
130-
from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
130+
// Collect and include files from compile classpath, excluding signature-related files
131+
from (configurations.runtimeClasspath) {
132+
exclude 'META-INF/*.SF'
133+
exclude 'META-INF/*.DSA'
134+
exclude 'META-INF/*.RSA'
135+
exclude 'META-INF/MANIFEST.MF'
136+
// Use zipTree to process JAR files
137+
eachFile { details ->
138+
if (details.file.isFile() && details.name.endsWith('.jar')) {
139+
zipTree(details.file)
140+
} else {
141+
details.file
142+
}
143+
}
144+
}
131145
with jar
132146
}
133147

0 commit comments

Comments
 (0)