Skip to content

Commit 21263fe

Browse files
committed
exclude unneeded text files from resulting jar and format file
1 parent b276d3a commit 21263fe

File tree

1 file changed

+14
-23
lines changed

1 file changed

+14
-23
lines changed

build.gradle

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import com.github.jengelman.gradle.plugins.shadow.transformers.PreserveFirstFoundResourceTransformer
21
import org.apache.tools.ant.taskdefs.condition.Os
32

43
plugins {
@@ -77,10 +76,10 @@ tasks.register('jre') {
7776
ignoreExitValue = true
7877
commandLine = [
7978
jlink.toString(), '-v',
80-
*(inputs.properties['options'] as List),
81-
'--module-path', jmods.toString(),
82-
'--add-modules', (inputs.properties['modules'] as List).join(','),
83-
'--output', jreOutputDir.get().toString()
79+
*(inputs.properties['options'] as List),
80+
'--module-path', jmods.toString(),
81+
'--add-modules', (inputs.properties['modules'] as List).join(','),
82+
'--output', jreOutputDir.get().toString()
8483
]
8584
}
8685

@@ -131,24 +130,16 @@ application {
131130
shadowJar {
132131
duplicatesStrategy = DuplicatesStrategy.INCLUDE
133132
mergeServiceFiles()
134-
135-
transform(PreserveFirstFoundResourceTransformer) {
136-
resources.addAll(
137-
'META-INF/LICENSE',
138-
'META-INF/LICENSE.txt',
139-
'META-INF/NOTICE',
140-
'META-INF/NOTICE.txt',
141-
'license/LICENSE',
142-
'license/LICENSE.dom-documentation.txt',
143-
'license/LICENSE.dom-software.txt',
144-
'license/NOTICE',
145-
'license/README.dom.txt'
146-
)
147-
}
148-
149133
failOnDuplicateEntries = true
150134

151-
dependencies {
152-
exclude('dist_webp_binaries/')
153-
}
135+
exclude('dist_webp_binaries/',
136+
'META-INF/LICENSE',
137+
'META-INF/LICENSE.txt',
138+
'META-INF/NOTICE',
139+
'META-INF/NOTICE.txt',
140+
'license/LICENSE',
141+
'license/LICENSE.dom-documentation.txt',
142+
'license/LICENSE.dom-software.txt',
143+
'license/NOTICE',
144+
'license/README.dom.txt')
154145
}

0 commit comments

Comments
 (0)