Skip to content

Commit 6675bdc

Browse files
authored
Reduce artifact size (#1138)
1 parent e5ffc6b commit 6675bdc

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

de.peeeq.wurstscript/build.gradle

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ dependencies {
8686
// Antlr
8787
antlr "org.antlr:antlr4:4.13.1"
8888

89+
implementation "org.antlr:antlr4-runtime:4.13.1"
90+
8991
// abstractsyntaxgen (available to IDE via compileOnly; used at runtime via astgen)
9092
compileOnly 'com.github.peterzeller:abstractsyntaxgen:623da1c60f'
9193
astgen 'com.github.peterzeller:abstractsyntaxgen:623da1c60f'
@@ -116,6 +118,12 @@ dependencies {
116118
testImplementation 'com.github.peterzeller:java-smallcheck:3f6a178ba7'
117119
}
118120

121+
configurations {
122+
runtimeClasspath {
123+
exclude group: "org.antlr", module: "antlr4"
124+
}
125+
}
126+
119127
configurations.configureEach {
120128
exclude group: "org.slf4j", module: "slf4j-log4j12"
121129
exclude group: "log4j", module: "log4j"
@@ -261,6 +269,18 @@ shadowJar {
261269
manifest {
262270
attributes 'Main-Class': mainClassName
263271
}
272+
exclude 'OSGI-INF/**'
273+
exclude '**/DefaultListfile.txt'
274+
275+
// exclude fastutil type-specialized packages (keep objects + refs)
276+
exclude 'it/unimi/dsi/fastutil/doubles/**'
277+
exclude 'it/unimi/dsi/fastutil/floats/**'
278+
exclude 'it/unimi/dsi/fastutil/longs/**'
279+
exclude 'it/unimi/dsi/fastutil/shorts/**'
280+
exclude 'it/unimi/dsi/fastutil/chars/**'
281+
exclude 'it/unimi/dsi/fastutil/bytes/**'
282+
exclude 'it/unimi/dsi/fastutil/booleans/**'
283+
exclude 'it/unimi/dsi/fastutil/io/**'
264284
}
265285

266286
def fatJar = shadowJar.archiveFile.map { it.asFile }

0 commit comments

Comments
 (0)