Plugin conflicts cause `java.lang.NoClassDefFoundError: org/apache/batik/w3c/dom/ElementTraversal`
See original GitHub issueI think I have a similar issue to #1336. I’m working on enhancements to detekt’s Gradle plugin, namely auto-generating a detekt task for each Android build variant.
But when both detekt and SQLDelight’s Gradle plugins are on the build classpath together I get errors like:
Execution failed for task ':android:app:mergeProdReleaseResources'.
> org/apache/batik/w3c/dom/ElementTraversal
With the stacktrace showing “Caused by: java.lang.NoClassDefFoundError: org/apache/batik/w3c/dom/ElementTraversal”
I believe I’ve narrowed it down to the fact IntelliJ core is bundled with sqldelight plugin, since IntelliJ contains this interface:
package org.w3c.dom;
public interface ElementTraversal extends org.apache.batik.w3c.dom.ElementTraversal {}
I don’t know why it causes issues when both detekt and SQLDelight’s Gradle plugins are on the classpath, but there’s no issue when only one of them is (when only detekt plugin is on the build classpath there’s no issue, likewise when only SQLDelight is applied).
If there’s a known workaround can you please share? Thank you!
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (3 by maintainers)
Top GitHub Comments
Thanks for the hint. I was working on Kotlin Multiplatform project where I used Gradle Composite Builds to test out a Gradle Plugin. Moving my Gradle Plugin’s
classpath
to top fixed the issue.is it this stack trace? https://github.com/cashapp/sqldelight/issues/2058#issuecomment-713561334
and are you also on AS Canary?