I have a problem of conflicting dependencies.
The two jars are:
net.sf.jasperreports:jasperreports:6.4.1com.connectifier.xero:client:0.13Which both seem to be loading different versions of the same dependency:
org.bouncycastle.
I can't seem to get it to work no matter what I try.
Have been trying something like this:
configure(globalModule) {
dependencies {
    compile('net.sf.jasperreports:jasperreports:6.4.1')
    compile('com.lowagie:itext:2.1.7') {
       exclude group: 'org.bouncycastle'
    }
    compile('com.connectifier.xero:client:0.13') {
       exclude group: 'org.bouncycastle'
    }
}
The error I keep getting is:
SecurityException: class "org.bouncycastle.asn1.pkcs.RSAPublicKey"'s signer information does not match signer information of other classes in the same package
The app will run fine if I do not import JasperReports, but I definitely need this.
I have resolved it! The normal method of exclude in gradle was not working and the workaround was as follows:
configure(globalModule) {
    dependencies {
        compile('net.sf.jasperreports:jasperreports:6.4.1')
        compile('com.connectifier.xero:client:0.13')    
        compile('com.lowagie:itext:2.1.7')    
    }   
    configurations {
        compile {
            exclude group: 'org.bouncycastle'
            exclude module: 'bcprov-jdk14'
        }
    }
    task enhance(type: CubaEnhancing)   
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With