File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff 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" )
You can’t perform that action at this time.
0 commit comments