This scheme will be common for all compiler plugins with K1 and K2 support:
- `plugin-common` contains classes shared with K1 and K2 implementations (if any)
- `plugin-k1` contains implementation for K1 compiler
- `plugin-k2` contains implementation for K2 compiler
- `plugin-backend` contains implementation for backend extensions (if any)
- `plugin-cli` is module for registration of plugin in CLI compiler
- `plugin` is a root module with tests and all submodules embedded
This structure is needed to distinguish parts related to different frontends,
which is needed for proper dependencies settings for Kotlin IDE plugins
`kotlin-jps-plugin-classpath` isn't dropped because, in some places, IDE
depends on the old artifact so I want to keep it for a while until I
cleanup IDE completely.
I tried to put as much libraries into `kotlinJpsPluginMavenDependencies`
as possible in the previous commit. Right now,
`kotlin-jps-plugin-classpath` is 33Mb, `kotlin-jps-plugin` is 20Mb (all
are not compresed)
This plugin should do project common configuration in the Kotlin repo.
As a first thing I moved gson version constraint into it, because
current approach has Gradle bug:
https://github.com/gradle/gradle/issues/20548
But still compile stdlib, reflect, kotlin.test and scripting runtimes
with JVM target 1.6 to simplify migration from Kotlin 1.6 to 1.7.
#KT-45165 Fixed
AppCode KMM uses parts of `backend.native` for its Kotlin-ObjC
cross-resolve. Thus, this IDE dependency needs to be kept up-to-date
with the other Kotlin compiler for IDE artifacts. This commit integrates
a stripped down version into the existing `ide-plugin-dependencies`
build infrastructure to make it easier to keep them in sync.
Implementation details:
* Proguard-based removal of code irrelevant for IDE for smaller jar size
* Publication of non-stripped-down sources for better IDE experience
This is needed to prevent leaking dependency on `dukat:0.5.8-rc.4` into
dependency of Kotlin project after import to IDE. This jar contains
unshaded classes of some outdated compiler version and it confuses
IDEA tooling (like debugger), so it shows those classes instead of
real sources from project
- Introduce `kotlin-gradle-plugin-idea` module that allows
to share models between the IDE and KGP
- Add `kotlin-gradle-plugin-idea` to the RuntimePublicAPITest to
ensure binary compatibility
^KT-51262
This is needed to avoid bundling of FIR classes to IDE plugin for
parcelize, because it can cause compatibility issues, because
IDE plugin does not contain FIR compiler