Skip to content

Commit

Permalink
Merge pull request #12 from IBM/exclude-signature-related-patterns-in…
Browse files Browse the repository at this point in the history
…-built-jar

Exclude signature related patterns in built jar
  • Loading branch information
rahlk authored Apr 25, 2024
2 parents 30a8700 + c0da96e commit 6b45091
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,23 @@ dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
}

task fatjar(type: Jar) {
task fatJar(type: Jar) {
archiveBaseName = 'codeanalyzer'
archiveFileName = 'codeanalyzer.jar'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes 'Implementation-Title': 'Northstar Codeanalyzer',
'Implementation-Version': archiveVersion,
'Main-Class': 'com.ibm.northstar.CodeAnalyzer'
attributes(
'Implementation-Title': 'Northstar Codeanalyzer',
'Implementation-Version': project.version,
'Main-Class': 'com.ibm.northstar.CodeAnalyzer'
)
}
from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }

// Collect and include runtime classpath dependencies, excluding signature files
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA'
with jar
}

Expand Down

0 comments on commit 6b45091

Please sign in to comment.