wtekiela / opensub4j

Java library for communicating with opensubtitles.org XML-RPC API
Other
47 stars 19 forks source link

R8 integration issue when building release with gradle in android application #18

Closed courville closed 4 years ago

courville commented 4 years ago

Hi,

I am trying to switch to opensub4j in my Nova Video Player android application and when adding in dependenciesimplementation 'com.github.wtekiela:opensub4j:0.2.3' I cannot build anymore my application and R8 throws the following error:

.gradle/caches/modules-2/files-2.1/junit/junit/3.8.1/99129f16442844f6a4a11ae22fbbee40b14d774f/junit-3.8.1.jar: R8: Illegal invoke-super to void java.awt.Component.setBounds(int, int, int, int) from class junit.awtui.ProgressBar

Would you have any workaround or recommendation?

Thank you for your work and contribution.

wtekiela commented 4 years ago

Hi, it looks like your error comes from junit-3.8.1.jar.

My library does not depend on it directly, but It seems like it is transitively included:

\--- org.apache.xmlrpc:xmlrpc-client:3.1.3
     \--- org.apache.xmlrpc:xmlrpc-common:3.1.3
          \--- org.apache.ws.commons.util:ws-commons-util:1.0.2
               +--- junit:junit:3.8.1
               \--- xml-apis:xml-apis:1.0.b2

For the time being, you need to exclude junit transitive dependency in your project, e.g. like this:

    compile('com.github.wtekiela:opensub4j:0.2.3') {
        exclude group: 'junit', module: 'junit'
    }

Will fix in 0.2.4.

courville commented 4 years ago

Thanks for the quick feedback, it works with your proposed fix. Will pick up 0.2.4 when available.

wtekiela commented 4 years ago

@courville released 0.2.4