Closed ZacSweers closed 5 years ago
mainClassName = "com.ubercab.intellijpatcher.IntellijPatcher"
lmao
we have this
mainClassName = 'com.lyft.buck.imlfixer.MainKt'
Im trying to switch us over to download kotlin compiler from github and hit an interesting issue - https://youtrack.jetbrains.com/issue/KT-29837
Suggestions welcome at this point, but im not willing to accept setting up a separate artifact mirror for the compiler zips ourselves
What does the gradle plugin do?
Specifically - I'd be surprised if consuming from github is the only way to make this work.
Context from our internal ticket details:
Kotlin Compiler release zip contains all the artifacts that is needed by the compiler classpath. (https://github.com/JetBrains/kotlin/releases/download/v1.3.20/kotlin-compiler-1.3.20.zip)
This zip compiler setup is used by buck & a bunch of other companies. We need to make okbuck use this zip as kotlin_home
instead of using a custom generation by using specific compiler jar and its dependencies.
Work that needs to be done to achieve this:
kotlin-allopen
etc. (note kotlin-allopen
was renamed to allopen-compiler-plugin
in 1.3.20)<zip>/lib
folder (or only the required ones) to the classpath of the compiler. Kotlin 1.3.20 adds a new jar trove4j.jar
which requires a buck upgrade. Adding all jar's in the zip will ensure that newer version of kotlin won't fail on old version of buck.this will unblock:
gradle upgrade to 5.1:
It seems to me like the real issue is more that buck is using this zip, when it maybe shouldn't?
Using the zip is the right solution because as we have seen with this issue
The kotlin gradle plugin must be able to deal with this in a way that plays nice with the gradle/maven ecosystem right?
Im not sure about how the gradle plugin does things. We are only interested in the cli compiler. The gradle plugin probably has additional plumbing. The cli has to rely on file paths etc. to find its deps. We want to follow their recommendation to use the zip from https://kotlinlang.org/docs/tutorials/command-line.html
I think I found a creative solution to the problem without needing to modify buck to switch it to the compiler zip artifact and to support future kotlin versions by keeping changes in okbuck only. I'll upload the pr today
I'll make a separate change to buck as a follow-up since it's better to have it for folks that don't use okbuck
The said project doesn't use kapt or annotationProcessor