Skip to content

Commit 4fec6bb

Browse files
committed
Remove Akka/Scala warnings during r8 build
1 parent c2e026f commit 4fec6bb

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

build.gradle

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,15 @@ tasks.register('r8Jar', JavaExec) { task ->
116116
'--classfile',
117117
'--output', r8File.toString(),
118118
'--pg-conf', rules.toString()
119-
] + configurations.compileOnly.collect {path ->
120-
['--lib', path.toString()] // Include libs from every runtime-only dep, so R8 can resolve them
121-
}.flatten()
119+
] + (configurations.compileOnly.filter { path ->
120+
// Include libs for a few runtime-only deps, so R8 can resolve them during optimization:
121+
path.getName().startsWith("jna-") ||
122+
path.getName().startsWith("jetty-util-") ||
123+
path.getName().startsWith("commons-httpclient-") ||
124+
path.getName().startsWith("async-http-client-")
125+
}.collect {path ->
126+
['--lib', path.toString()]
127+
}.flatten())
122128

123129
doFirst {
124130
def java8Home = System.getenv("JAVA_HOME_8_X64")

0 commit comments

Comments
 (0)