Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markwon 4 appears to repackage jetbrains annotations #148

Closed
ZacSweers opened this issue Jul 2, 2019 · 3 comments
Closed

Markwon 4 appears to repackage jetbrains annotations #148

ZacSweers opened this issue Jul 2, 2019 · 3 comments
Labels
dependencies Pull requests that update a dependency file

Comments

@ZacSweers
Copy link

Updating to 4.x yields the following trace

Repro branch here: https://github.com/ZacSweers/CatchUp/tree/z/markwon4. Just run ./gradlew :app:assembleDebug

* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
  java.lang.RuntimeException: Duplicate class org.intellij.lang.annotations.Flow found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.Identifier found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.JdkConstants found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.JdkConstants$AdjustableOrientation found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.JdkConstants$BoxLayoutAxis found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.JdkConstants$CalendarMonth found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.JdkConstants$CursorType found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.JdkConstants$FlowLayoutAlignment found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.JdkConstants$FontStyle found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.JdkConstants$HorizontalAlignment found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.JdkConstants$HorizontalScrollBarPolicy found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.JdkConstants$InputEventMask found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.JdkConstants$ListSelectionMode found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.JdkConstants$PatternFlags found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.JdkConstants$TabLayoutPolicy found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.JdkConstants$TabPlacement found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.JdkConstants$TitledBorderJustification found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.JdkConstants$TitledBorderTitlePosition found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.JdkConstants$TreeSelectionMode found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.JdkConstants$VerticalScrollBarPolicy found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.Language found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.MagicConstant found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.Pattern found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.PrintFormat found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.PrintFormatPattern found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.RegExp found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.intellij.lang.annotations.Subst found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.jetbrains.annotations.Async found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.jetbrains.annotations.Async$Execute found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.jetbrains.annotations.Async$Schedule found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.jetbrains.annotations.Contract found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.jetbrains.annotations.Nls found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.jetbrains.annotations.Nls$Capitalization found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.jetbrains.annotations.NonNls found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.jetbrains.annotations.NotNull found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.jetbrains.annotations.Nullable found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.jetbrains.annotations.PropertyKey found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  Duplicate class org.jetbrains.annotations.TestOnly found in modules annotations-16.0.1.jar (org.jetbrains:annotations:16.0.1) and annotations-java5-17.0.0.jar (org.jetbrains:annotations-java5:17.0.0)
  
  Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
@noties
Copy link
Owner

noties commented Jul 2, 2019

Hello @ZacSweers !

syntax-highlight module uses prism4j library that uses annotations-java5 library... I'm trying to add an explicit prism4j dependency and exclude annotations, but... with no effect

implementation('io.noties:prism4j:2.0.0') {
    exclude group: 'org.jetbrains', module: 'annotations-java5'
}

I need to investigate this further

@ZacSweers
Copy link
Author

ZacSweers commented Jul 2, 2019 via email

@noties
Copy link
Owner

noties commented Jul 3, 2019

Okay, this one works (it will exclude annotations-java5 from all dependencies, which is what you would want anyway):

configurations.all {
    exclude group: 'org.jetbrains', module: 'annotations-java5'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants