Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Transitive dependencies to org.jetbrains.annotations are causing conflicts #9

Open
stefan-niedermann opened this issue Nov 26, 2020 · 2 comments

Comments

@stefan-niedermann
Copy link

See for example Nextcloud: https://github.com/nextcloud/android/blob/master/build.gradle#L49-L54

Complete error message when building without excluding the transitive dependency:

Duplicate class org.intellij.lang.annotations.Flow found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.Identifier found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.JdkConstants found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.JdkConstants$AdjustableOrientation found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.JdkConstants$BoxLayoutAxis found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.JdkConstants$CalendarMonth found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.JdkConstants$CursorType found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.JdkConstants$FlowLayoutAlignment found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.JdkConstants$FontStyle found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.JdkConstants$HorizontalAlignment found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.JdkConstants$InputEventMask found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.JdkConstants$ListSelectionMode found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.JdkConstants$PatternFlags found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.JdkConstants$TabLayoutPolicy found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.JdkConstants$TabPlacement found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.JdkConstants$TitledBorderJustification found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.JdkConstants$TitledBorderTitlePosition found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.JdkConstants$TreeSelectionMode found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.Language found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.MagicConstant found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.Pattern found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.PrintFormat found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.PrintFormatPattern found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.RegExp found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.intellij.lang.annotations.Subst found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.jetbrains.annotations.Contract found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.jetbrains.annotations.Nls found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.jetbrains.annotations.NonNls found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.jetbrains.annotations.NotNull found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.jetbrains.annotations.Nullable found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.jetbrains.annotations.PropertyKey found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)
Duplicate class org.jetbrains.annotations.TestOnly found in modules jetified-annotations-13.0 (org.jetbrains:annotations:13.0) and jetified-annotations-java5-17.0 (org.jetbrains:annotations-java5:17.0.0)

(Side note: io.noties.markwon:syntax-highlight:4.6.0 has the same issue)

@rshah
Copy link

rshah commented Feb 10, 2021

I have this problem too.
I found this: noties/Markwon#148 (comment)
Maybe it will help @stefan-niedermann

@stefan-niedermann
Copy link
Author

Yes, i am using this workaround myself, but it's only against the symptoms, but no real solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants