WalletConnect / kotlin-walletconnect-lib

library to use WalletConnect with Kotlin or Java
MIT License
156 stars 98 forks source link

Compilation failure in v0.9.7 #29

Closed sgc-code closed 3 years ago

sgc-code commented 3 years ago

I can't compile the latest version (v0.9.7). It might be because my project needs the jetifier.

   > Failed to transform bcprov-jdk15on-1.66.jar (org.bouncycastle:bcprov-jdk15on:1.66) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
      > Execution failed for JetifyTransform: /Users/sgc-code/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.66/ed564ade61defca27e26fb1378a70b22831fc5c1/bcprov-jdk15on-1.66.jar.
         > Failed to transform '/Users/sgc-code/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.66/ed564ade61defca27e26fb1378a70b22831fc5c1/bcprov-jdk15on-1.66.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 59. (Run with --stacktrace for more details.)
           Suggestions:
            - Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
            - If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).

This is related to the latest update to org.bouncycastle:bcprov-jdk15on:1.66. As a workaround i'm using:

    implementation "com.github.WalletConnect:kotlin-walletconnect-lib:0.9.7", {
        exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on'
    }
    implementation 'org.bouncycastle:bcprov-jdk15on:1.65.01'

I tested with a few other versions of the bouncy castle library and here are the results:

    implementation 'org.bouncycastle:bcprov-jdk15on:1.64' // ok
    implementation 'org.bouncycastle:bcprov-jdk15on:1.65' // ok
    implementation 'org.bouncycastle:bcprov-jdk15on:1.65.01' // ok
    implementation 'org.bouncycastle:bcprov-jdk15on:1.66' // error
    implementation 'org.bouncycastle:bcprov-jdk15on:1.67' // error

Maybe we can revert to the last working version

soshial commented 12 months ago

Looking forward to updating to the version of bouncycastle that doesn't have vulnerabilities. Any blockers to upgrade to bcprov-jdk18on:1.76?