autaut03 / kottle

Kotlin language provider for Forge 1.13.2+
GNU Lesser General Public License v3.0
30 stars 13 forks source link

Fixed compilation of version 1.3.21. #2

Closed liushiqi closed 5 years ago

liushiqi commented 5 years ago

This fixed the problem:

Execution failed for task ':compileKotlin'.
> CANONICAL

The reason is that,

  1. ForgeGradle depends on javaxdelta, which depends on trove:trove:1.0.2(trove)
  2. kotlin-gradle-plugin depends on kotlin-compiler-embeddable, which depends on org.jetbrains.intellij.deps:trove4j:1.0.20181211(trove4j). In the package trove4j, interface TObjectHashingStrategy has two static field, IDENTITY and CANONICAL, but in trove, they didn't exist. In version 1.3.11, the package trove4j was shaded into kotlin-compiler-embeddable with another name, so they don't have any conflict. But in version 1.3.21, it was marked as a separate dependency, then the two library was conflicted. When compiling kotlin, kotlin-compiler-embeddable mistakenly used trove, and it did not found CANONICAL, and caused crash of compiler. Fixing it is also simple, just exclude trove in ForgeGradle. Sorry for my poor English :)
autaut03 commented 5 years ago

I think we can simplify readme a little, as it's already kind of bloated with instructions, but overall this is a great PR. Thank you for your contribution :)