Introduce kotlin-dist-for-jps-meta maven artifact

^KTIJ-20875 Fixed

This artifact is used to denote maven artifacts from which IDEA Kotlin
plugin should compose kotlinc dist layout to use it in unbundled JPS
(KTIJ-11633)

Right now kotlin-dist-for-jps-meta tries as close as possible to a real
dist except for:
```
   js.engines.jar
   kotlin-ant.jar
   kotlin-preloader.jar
   mutability-annotations-compat.jar

   // It's compiler/cli/cli-runner.
   // It is `kotlin` in CLI and not needed for JPS
   kotlin-runner.jar

   // JPS doesn't support KAPT
   kotlin-annotation-processing-cli.jar

   // Sources
   kotlin-annotations-jvm-sources.jar
   kotlin-reflect-sources.jar
   kotlin-script-runtime-sources.jar
   kotlin-stdlib-jdk7-sources.jar
   kotlin-stdlib-jdk8-sources.jar
   kotlin-stdlib-js-sources.jar
   kotlin-stdlib-sources.jar
   kotlin-test-js-sources.jar
   kotlin-test-junit5-sources.jar
   kotlin-test-junit-sources.jar
   kotlin-test-sources.jar
   kotlin-test-testng-sources.jar
```
^ for elaboration on the list see KTIJ-20875

This commit is going to be cherry-picked to a bunch of old Kotlin
versions, so it needs to be conservative

Alternative fix: I could create a Gradle module but I didn't do that,
because I can't refer to compiler plugin maven modules which are also
specified in Maven poms `libraries/tools/kotlin-maven-*/pom.xml`.
  1. `api(project(":kotlin-maven-allopen"))` in imaginary Gradle fix
     obviously doesn't work
  2. `api("org.jetbrains.kotlin:kotlin-maven-noarg:${project.version}")`
     kinda works... but at least breaks IDE import (most probably, it
     breaks something else as well)
This commit is contained in:
Nikita Bobko
2022-05-09 16:40:42 +02:00
parent 2ceccec2b8
commit b033b9a48d
2 changed files with 228 additions and 0 deletions
+1
View File
@@ -87,6 +87,7 @@
<module>tools/kotlin-maven-lombok</module>
<module>tools/kotlin-bom</module>
<module>tools/kotlin-dist-for-jps-meta</module>
<module>tools/kotlin-maven-plugin-test</module>
@@ -0,0 +1,227 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<artifactId>kotlin-dist-for-jps-meta</artifactId>
<packaging>pom</packaging>
<parent>
<artifactId>kotlin-project</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<version>1.7.255-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<name>Kotlin Dist For Jps Meta</name>
<description>Kotlin Dist For Jps Meta</description>
<url>https://kotlinlang.org/</url>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<scm>
<connection>scm:git:https://github.com/JetBrains/kotlin.git</connection>
<developerConnection>scm:git:https://github.com/JetBrains/kotlin.git</developerConnection>
<url>https://github.com/JetBrains/kotlin</url>
</scm>
<developers>
<developer>
<name>Kotlin Team</name>
<organization>JetBrains</organization>
<organizationUrl>https://www.jetbrains.com</organizationUrl>
</developer>
</developers>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jvm-abi-gen</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-android-extensions-runtime</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-android-extensions</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-annotation-processing-runtime</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-annotation-processing</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-annotations-jvm</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-compiler</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-daemon-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-daemon</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-main-kts</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-parcelize-compiler</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-parcelize-runtime</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-reflect</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-script-runtime</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-scripting-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-scripting-compiler-impl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-scripting-compiler</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-scripting-js</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-scripting-jvm</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-stdlib-jdk7</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-stdlib-js</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-test-js</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-test-junit5</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-test-junit</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-test-testng</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-test</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.intellij.deps</groupId>
<artifactId>trove4j</artifactId>
<version>1.0.20200330</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core-jvm</artifactId>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>13.0</version>
</dependency>
<!-- Compiler plugins. They can be added to the JPS process via KOTLIN_BUNDLED Path Variable -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-maven-serialization</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-maven-sam-with-receiver</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-maven-allopen</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-maven-lombok</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>kotlin-maven-noarg</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>