Check Android compatibility using AnimalSniffer

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Check Android compatibility using AnimalSniffer

Florian Schmaus
Would the legion be interested in a little patch that introduces Android
compatibility verification to the test suite?

I've created a GitHub pull request at

https://github.com/bcgit/bc-java/pull/336

which adds the AninimalSniffer [1] Gradle plugin to the Gradle build
process and activates Android 8 compatibility verification for all
subprojects.

I know that Bouncycastle is used a lot on Android (OpenKeychain, …) and
I'm mentoring a GSOC project which will use Bouncycastle on Android too.
Therefore it appears to be a good idea to check for Android
compatibility to avoid runtime errors because of linkage errors.

Since this is my first contribution to the Bouncycastle project, I'm
happy to hear your thoughts on this matter.

As a related side note: After cloning Bouncycastle, issuing "gradle
check" does not succeed as the S/MIME junit tests fail. I think the root
cause is

java.lang.NoClassDefFoundError: Could not initialize class
org.bouncycastle.mail.smime.test.NewSMIMESignedTest
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at junit.framework.TestSuite.createTest(TestSuite.java:68)
        at junit.framework.TestSuite.addTestMethod(TestSuite.java:310)
        at junit.framework.TestSuite.addTestsFromTestCase(TestSuite.java:153)
        at junit.framework.TestSuite.<init>(TestSuite.java:132)
        at junit.framework.TestSuite.addTestSuite(TestSuite.java:219)
        at org.bouncycastle.mail.smime.test.AllTests.suite(AllTests.java:25)

Is there any special setup needed prior running the tests?

- Florian

1: https://github.com/xvik/gradle-animalsniffer-plugin


signature.asc (631 bytes) Download Attachment