Commit Graph

17 Commits

Author SHA1 Message Date
Sergey Igushkin 8ba131290a Fixup for 1f5fa5eb7 – adjust error message 2020-06-30 13:14:03 +03:00
Sergey Igushkin 1f5fa5eb7c Add back empty stub implementations of KotlinGradleSubplugin (KT-39809)
* If a KotlinGradleSubplugin implements
 KotlinCompilerPluginSupportPlugin, don't apply it as a legacy plugin

* Add the legacy KotlinGradleSubplugin implementations back so that
 when there's JAR hell with META-INF/services in the old artifacts
 pointing to the classes, loading the plugins with ServiceLoader (legacy
 implementation) from the new artifacts would not fail.

* There's a corner case for plugins not in kotlin-gradle-plugin
 If a newer and older version of such a subplugin is used with an older
 version of the Kotlin Gradle plugin, the latter will find the META-INF
 entries and will try to load the subplugins from the new version. With
 the original fix for KT-39809, this would result in silently ignored
 empty stub implementations.

 Given that the Kotlin Gradle plugin can now check if a subplugin
 supports the new API, it's OK to keep the old entries and make the
 stub implementations throw a build error when called, so that improper
 plugin versions are not ignored and are clearly reported.

 Note that this is only necessary for the subplugins not bundled in the
 kotlin-gradle-plugin module, as those will always be in sync with the
 Kotlin version.

Issue #KT-39809 Fixed
2020-06-30 12:51:51 +03:00
Sergey Igushkin a2e4b52747 Rework SerializationSubplugin for the new subplugins API 2020-06-19 17:30:08 +03:00
Sergey Igushkin 581b161611 Expose statically-typed kotlinOptions and compileKotlinTask in DSL
To simplify configuring a `KotlinCompilation` with Gradle Kotlin DSL, it
is essential to expose statically-known types where possible.

This commit parametrizes `KotlinCompilation` with its Kotlin options
type (a subtype of `KotlinCommonOptions`) and adds `kotlinOptions` and
`compileKotlinTask` to `KotlinCompilation`.

(minor) Also reduce the visibility of `attachClassesDir` and
`setupPlugins` to internal, since this API is not for external use.
2018-11-27 19:47:38 +03:00
Alexey Tsvetkov de261df6f5 Use separate configuration for resolving native compiler plugin artifacts
Kotlin/JVM and Kotlin/JS use shaded compiler, but
Kotlin/Native uses non-shaded one.
Serialization plugin was configured to use either shaded or non-shaded
plugin version, because we used one configuration for resolving
compiler plugins.
This change introduces 'kotlinNativeCompilerPluginClasspath' configuration
for resolving Kotlin/Native compiler plugins.
2018-09-25 11:08:39 +03:00
Leonid Startsev fa990174ef Rename kotlinx-serialization => kotlin-serialization
Discussed with @elizarov and @ilya-g
2018-09-11 17:31:38 +03:00
Leonid Startsev 7011e9422d Rename kotlinx-gradle-serialization-plugin => kotlinx-serialization 2018-09-11 13:22:17 +03:00
Leonid Startsev dea69e4469 Integrate serialization plugin into big Kotlin plugin
Split import handlers into multiple files
Add empty Maven handler for Android Studio

Add testRuntime dependency on kx-serialization-plugin for all modules which require compiler
plugins in test classpath
2018-09-07 21:17:07 +03:00
Leonid Startsev 087f60389a Migrating to 1.3 preview API 2018-09-07 21:17:06 +03:00
Leonid Startsev 359a37c9c3 Fix after rebase 2018-09-07 21:17:05 +03:00
Leonid Startsev 090f7e67eb Separate module for unshaded version 2018-09-07 21:17:04 +03:00
Leonid Startsev 6770cccd61 [IR-plugin] New symbol tables 2018-09-07 21:17:04 +03:00
Leonid Startsev 566e5ce603 Updates for new API 2018-09-07 21:17:03 +03:00
Leonid Startsev 223733558c Use new approach to resolve compiler plugin classpaths in gradle 2018-09-07 21:16:59 +03:00
Leonid Startsev 02d0322029 Plugins renaming: kotlinx-<buildSystem>-serialization-plugin 2018-09-07 21:16:48 +03:00
Leonid Startsev 8cacaecf90 Changed serialization gradle plugin build to gradle
Env variable for idea SDK on TeamCity
Fix kotlin_root dir relative path

Updated broken API after rebase to 1.1.50

Bintray upload setup
2018-09-07 21:16:46 +03:00
Leonid Startsev 841693643a KotlinX serialization plugin applied onto latest master
IntelliJ project, ant task and maven goal for serialization plugin
Serialization IDEA plugin
2018-09-07 21:16:45 +03:00