Skip to content

Commit 6b45091

Browse files
authored
Merge pull request #12 from IBM/exclude-signature-related-patterns-in-built-jar
Exclude signature related patterns in built jar
2 parents 30a8700 + c0da96e commit 6b45091

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

build.gradle

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,23 @@ dependencies {
118118
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
119119
}
120120

121-
task fatjar(type: Jar) {
121+
task fatJar(type: Jar) {
122122
archiveBaseName = 'codeanalyzer'
123123
archiveFileName = 'codeanalyzer.jar'
124124
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
125125
manifest {
126-
attributes 'Implementation-Title': 'Northstar Codeanalyzer',
127-
'Implementation-Version': archiveVersion,
128-
'Main-Class': 'com.ibm.northstar.CodeAnalyzer'
126+
attributes(
127+
'Implementation-Title': 'Northstar Codeanalyzer',
128+
'Implementation-Version': project.version,
129+
'Main-Class': 'com.ibm.northstar.CodeAnalyzer'
130+
)
129131
}
130-
from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
132+
133+
// Collect and include runtime classpath dependencies, excluding signature files
134+
from {
135+
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
136+
}
137+
exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA'
131138
with jar
132139
}
133140

0 commit comments

Comments
 (0)