Skip to content

Commit cba9520

Browse files
committed
Upgrade the shadow dependency and explicitly declare our own dependencies.
I believe that we were previously relying on the shadow plugin to bring in too many of our dependencies, and with recent versions of the plugin those dependency declarations went away. This commit gets the missing dependencies compiling again, and addresses one backwards incompatible change with the asm-commons library, see: https://issues.apache.org/jira/browse/MSHADE-258
1 parent 19487a8 commit cba9520

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

jar-plugin/build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@ generateTestConfig {
1717

1818
dependencies {
1919
compile project(':jruby-gradle-plugin')
20-
compile 'com.github.jengelman.gradle.plugins:shadow:[1.2.2,2.0)' // NEED TO FIX THIS OPEN END
20+
/*
21+
* NOTE: version 5.0.0 of the shadow plugin supports only Gradle 5.x and later
22+
*/
23+
compile 'com.github.jengelman.gradle.plugins:shadow:[4.0.2,5.0)'
24+
compile 'org.codehaus.plexus:plexus-utils:[3.2.0,3.3)'
25+
compile 'org.apache.commons:commons-io:1.3.2'
26+
compile 'org.ow2.asm:asm-commons:[6.1,6.99)'
27+
compile 'org.apache.ant:ant:[1.10.6,2.0)'
2128

2229
testCompile (spockVersion) {
2330
exclude module : 'groovy-all'

jar-plugin/src/main/groovy/com/github/jrubygradle/jar/internal/JRubyJarCopyAction.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import org.gradle.internal.UncheckedException
3737
import org.objectweb.asm.ClassReader
3838
import org.objectweb.asm.ClassVisitor
3939
import org.objectweb.asm.ClassWriter
40-
import org.objectweb.asm.commons.RemappingClassAdapter
40+
import org.objectweb.asm.commons.ClassRemapper
4141

4242
import java.util.zip.ZipException
4343

@@ -235,7 +235,7 @@ class JRubyJarCopyAction implements CopyAction {
235235
// that use the constant pool to determine the dependencies of a class.
236236
ClassWriter cw = new ClassWriter(0)
237237

238-
ClassVisitor cv = new RemappingClassAdapter(cw, remapper)
238+
ClassVisitor cv = new ClassRemapper(cw, remapper)
239239

240240
try {
241241
cr.accept(cv, ClassReader.EXPAND_FRAMES)

0 commit comments

Comments
 (0)