craigwblake / redline

Pure Java Rpm Library
http://redline-rpm.org
MIT License
128 stars 97 forks source link

Shading Bouncy Castle classes to prevent collision with Gradle API #80

Closed dmnjohns closed 9 years ago

dmnjohns commented 9 years ago

I've been working on a patch for the os-package Gradle plugin (https://github.com/nebula-plugins/gradle-ospackage-plugin) to support signing RPM/DEB packages. Luckily for me, both jDeb and Redline RPM already support signing packages, and those libraries are already being used by os-package. Unluckily for me, making use of the Gradle API for plugins causes some odd issues with dependencies; notably, even though Redline RPM has a dependency on Bouncy Castle 1.50, I'm seeing the Bouncy Castle 1.46 jar on the classpath which directly causes a MethodNotFound exception due to a changed contract between those versions. More information on Gradle's weirdness can be found on this blog post: http://jdpgrailsdev.github.io/blog/2014/04/15/gradle_api_dependencies.html .

This PR addresses the root issue for me by shading the Bouncy Castle classes in the Redline RPM jar.

craigwblake commented 9 years ago

Thanks for the update!