[Gradle, Build] Publish an artifact with unpublished compiler modules for KGP
#KT-61449 In Progress
This commit is contained in:
committed by
Space Team
parent
c3f8706fe2
commit
6cfa165ddb
@@ -27,3 +27,7 @@ sourceSets {
|
||||
}
|
||||
|
||||
projectTest(jUnitMode = JUnitMode.JUnit5, parallel = true)
|
||||
|
||||
publish()
|
||||
|
||||
standardPublicJars()
|
||||
@@ -20,6 +20,7 @@
|
||||
<trust group="org.jetbrains.kotlin" name="kotlin-assignment" version="1.9.[2,3]?[0-9](-.+)?" regex="true"/>
|
||||
<trust group="org.jetbrains.kotlin" name="kotlin-assignment-compiler-plugin-embeddable" version="1.9.[2,3]?[0-9](-.+)?" regex="true"/>
|
||||
<trust group="org.jetbrains.kotlin" name="kotlin-build-common" version="1.9.[2,3]?[0-9](-.+)?" regex="true"/>
|
||||
<trust group="org.jetbrains.kotlin" name="kotlin-build-statistics" version="1.9.[2,3]?[0-9](-.+)?" regex="true"/>
|
||||
<trust group="org.jetbrains.kotlin" name="kotlin-build-tools-api" version="1.9.[2,3]?[0-9](-.+)?" regex="true"/>
|
||||
<trust group="org.jetbrains.kotlin" name="kotlin-build-tools-enum-compat" version="1.9.[2,3]?[0-9](-.+)?" regex="true"/>
|
||||
<trust group="org.jetbrains.kotlin" name="kotlin-build-tools-impl" version="1.9.[2,3]?[0-9](-.+)?" regex="true"/>
|
||||
@@ -30,6 +31,7 @@
|
||||
<trust group="org.jetbrains.kotlin" name="kotlin-gradle-plugin" version="1.9.[2,3]?[0-9](-.+)?" regex="true"/>
|
||||
<trust group="org.jetbrains.kotlin" name="kotlin-gradle-plugin-annotations" version="1.9.[2,3]?[0-9](-.+)?" regex="true"/>
|
||||
<trust group="org.jetbrains.kotlin" name="kotlin-gradle-plugin-api" version="1.9.[2,3]?[0-9](-.+)?" regex="true"/>
|
||||
<trust group="org.jetbrains.kotlin" name="kotlin-gradle-plugin-compiler-dependencies" version="1.9.[2,3]?[0-9](-.+)?" regex="true"/>
|
||||
<trust group="org.jetbrains.kotlin" name="kotlin-gradle-plugin-idea" version="1.9.[2,3]?[0-9](-.+)?" regex="true"/>
|
||||
<trust group="org.jetbrains.kotlin" name="kotlin-gradle-plugin-idea-proto" version="1.9.[2,3]?[0-9](-.+)?" regex="true"/>
|
||||
<trust group="org.jetbrains.kotlin" name="kotlin-gradle-plugin-model" version="1.9.[2,3]?[0-9](-.+)?" regex="true"/>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import com.github.jengelman.gradle.plugins.shadow.transformers.DontIncludeResourceTransformer
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import org.jetbrains.kotlin.pill.PillExtension
|
||||
|
||||
@@ -62,7 +61,7 @@ dependencies {
|
||||
}
|
||||
}
|
||||
|
||||
commonCompileOnly(project(":compiler:incremental-compilation-impl"))
|
||||
commonCompileOnly(project(":compiler:cli"))
|
||||
commonCompileOnly(project(":daemon-common"))
|
||||
commonCompileOnly(project(":kotlin-daemon-client"))
|
||||
commonCompileOnly(project(":kotlin-gradle-compiler-types"))
|
||||
@@ -99,21 +98,23 @@ dependencies {
|
||||
}
|
||||
commonCompileOnly(project(":kotlin-tooling-metadata"))
|
||||
commonCompileOnly(project(":compiler:build-tools:kotlin-build-statistics"))
|
||||
|
||||
commonCompileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) { isTransitive = false }
|
||||
|
||||
commonImplementation(project(":kotlin-gradle-plugin-idea"))
|
||||
commonImplementation(project(":kotlin-gradle-plugin-idea-proto"))
|
||||
commonImplementation(project(":kotlin-util-klib"))
|
||||
commonImplementation(project(":native:kotlin-klib-commonizer-api"))
|
||||
commonImplementation(project(":compiler:build-tools:kotlin-build-tools-api"))
|
||||
commonImplementation(project(":compiler:build-tools:kotlin-build-statistics"))
|
||||
|
||||
commonRuntimeOnly(project(":kotlin-compiler-embeddable"))
|
||||
commonRuntimeOnly(project(":kotlin-compiler-runner")) {
|
||||
// Excluding dependency with not-relocated 'com.intellij' types
|
||||
exclude(group = "org.jetbrains.kotlin", module = "kotlin-build-common")
|
||||
exclude(group = "org.jetbrains.kotlin", module = "kotlin-compiler-embeddable")
|
||||
}
|
||||
commonRuntimeOnly(project(":kotlin-scripting-compiler-embeddable"))
|
||||
commonRuntimeOnly(project(":kotlin-scripting-compiler-impl-embeddable"))
|
||||
commonRuntimeOnly(project(":kotlin-util-klib"))
|
||||
commonRuntimeOnly(project(":prepare:kotlin-gradle-plugin-compiler-dependencies"))
|
||||
|
||||
embedded(project(":kotlin-gradle-build-metrics"))
|
||||
embedded(project(":kotlin-gradle-statistics"))
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
description = "Kotlin Compiler dependencies (used directly in KGP)"
|
||||
|
||||
plugins {
|
||||
`java`
|
||||
}
|
||||
|
||||
// avoid adding new dependencies here
|
||||
val compilerModules = listOf(
|
||||
":compiler:cli", // for MessageRenderer, related to MessageCollector usage
|
||||
":compiler:cli-base", // for kotlinx-benchmark
|
||||
":compiler:cli-common", // for compiler arguments setup, for logging via MessageCollector, CompilerSystemProperties, ExitCode
|
||||
":compiler:config.jvm", // for K2JVMCompilerArguments initialization
|
||||
":compiler:config", // for kotlinx-benchmark
|
||||
":compiler:frontend", // for kotlinx-benchmark
|
||||
":compiler:ir.tree", // for PartialLinkageMode (K/N)
|
||||
":compiler:util", // for CommonCompilerArguments initialization, K/N
|
||||
":compiler:compiler.version", // for user projects buildscripts
|
||||
":core:compiler.common", // for kotlinx-benchmark
|
||||
":core:compiler.common.jvm", // for FUS statistics parsing all the compiler arguments, otherwise it fails silently
|
||||
":core:compiler.common.native", // for kotlinx-benchmark
|
||||
":core:descriptors", // for kotlinx-benchmark
|
||||
":core:deserialization.common", // for kotlinx-benchmark
|
||||
":core:deserialization", // for kotlinx-benchmark
|
||||
":core:metadata", // for kotlinx-benchmark
|
||||
":core:util.runtime", // for stdlib extensions
|
||||
":kotlin-build-common", // for incremental compilation setup
|
||||
":js:js.config", // for k/js task
|
||||
)
|
||||
|
||||
dependencies {
|
||||
for (dependency in compilerModules) {
|
||||
embedded(project(dependency)) { isTransitive = false }
|
||||
}
|
||||
embedded(intellijUtilRt()) { isTransitive = false } // for kapt (PathUtil.getJdkClassesRoots)
|
||||
embedded(intellijPlatformUtil()) { isTransitive = false } // for kapt (JavaVersion), KotlinToolRunner (escapeStringCharacters)
|
||||
embedded(intellijPlatformUtilBase()) { isTransitive = false } // for kapt (PathUtil.getJdkClassesRoots)
|
||||
embedded(commonDependency("org.jetbrains.intellij.deps.fastutil:intellij-deps-fastutil")) { isTransitive = false } // for kapt (PathUtil.getJdkClassesRoots)
|
||||
embedded(jpsModelImpl()) { isTransitive = false } // for kapt (PathUtil.getJdkClassesRoots)
|
||||
embedded(protobufLite()) { isTransitive = false } // for kotlinx-benchmark
|
||||
embedded(commonDependency("org.jetbrains.intellij.deps:trove4j")) { isTransitive = false } // for k/js task
|
||||
}
|
||||
|
||||
publish()
|
||||
|
||||
runtimeJar(rewriteDefaultJarDepsToShadedCompiler())
|
||||
|
||||
sourcesJar {
|
||||
dependsOn(":compiler:ir.tree:generateTree")
|
||||
}
|
||||
javadocJar()
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-build-statistics</artifactId>
|
||||
<version>ArtifactsTest.version</version>
|
||||
<name>Kotlin Build Statistics</name>
|
||||
<description>Kotlin Build Report Common</description>
|
||||
<url>https://kotlinlang.org/</url>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Kotlin Team</name>
|
||||
<organization>JetBrains</organization>
|
||||
<organizationUrl>https://www.jetbrains.com</organizationUrl>
|
||||
</developer>
|
||||
</developers>
|
||||
<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>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-build-tools-api</artifactId>
|
||||
<version>ArtifactsTest.version</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.9</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://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>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-gradle-plugin-compiler-dependencies</artifactId>
|
||||
<version>ArtifactsTest.version</version>
|
||||
<name>Kotlin Gradle Plugin Compiler Dependencies</name>
|
||||
<description>Kotlin Compiler dependencies (used directly in KGP)</description>
|
||||
<url>https://kotlinlang.org/</url>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Kotlin Team</name>
|
||||
<organization>JetBrains</organization>
|
||||
<organizationUrl>https://www.jetbrains.com</organizationUrl>
|
||||
</developer>
|
||||
</developers>
|
||||
<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>
|
||||
</project>
|
||||
+69
-33
@@ -170,38 +170,6 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-util-klib</artifactId>
|
||||
<version>ArtifactsTest.version</version>
|
||||
<scope>runtime</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-reflect</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-stdlib-jdk7</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-stdlib</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-script-runtime</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-stdlib-common</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-klib-commonizer-api</artifactId>
|
||||
@@ -268,7 +236,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-compiler-embeddable</artifactId>
|
||||
<artifactId>kotlin-build-statistics</artifactId>
|
||||
<version>ArtifactsTest.version</version>
|
||||
<scope>runtime</scope>
|
||||
<exclusions>
|
||||
@@ -304,6 +272,10 @@
|
||||
<version>ArtifactsTest.version</version>
|
||||
<scope>runtime</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-compiler-embeddable</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-reflect</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
@@ -398,5 +370,69 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-util-klib</artifactId>
|
||||
<version>ArtifactsTest.version</version>
|
||||
<scope>runtime</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-reflect</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-stdlib-jdk7</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-stdlib</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-script-runtime</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-stdlib-common</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-gradle-plugin-compiler-dependencies</artifactId>
|
||||
<version>ArtifactsTest.version</version>
|
||||
<scope>runtime</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-reflect</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-stdlib-jdk7</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-stdlib</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-script-runtime</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-stdlib-common</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -21,6 +21,7 @@ fun Project.jpsBuild() = "com.jetbrains.intellij.platform:jps-build:$intellijVer
|
||||
fun Project.testFramework() = "com.jetbrains.intellij.platform:test-framework:$intellijVersion"
|
||||
fun Project.devKitJps() = "com.jetbrains.intellij.devkit:devkit-jps:$intellijVersion"
|
||||
fun Project.intellijPlatformUtil() = "com.jetbrains.intellij.platform:util:$intellijVersion"
|
||||
fun Project.intellijPlatformUtilBase() = "com.jetbrains.intellij.platform:util-base:$intellijVersion"
|
||||
fun Project.intellijJavaRt() = "com.jetbrains.intellij.java:java-rt:$intellijVersion"
|
||||
fun Project.intellijAnalysis() = "com.jetbrains.intellij.platform:analysis:$intellijVersion"
|
||||
fun Project.intellijResources() = "com.jetbrains.intellij.platform:resources:$intellijVersion"
|
||||
|
||||
@@ -81,6 +81,8 @@ val kotlinGradlePluginAndItsRequired = arrayOf(
|
||||
":kotlin-test-js-runner",
|
||||
":native:kotlin-klib-commonizer-embeddable",
|
||||
":native:kotlin-klib-commonizer-api",
|
||||
":prepare:kotlin-gradle-plugin-compiler-dependencies",
|
||||
":compiler:build-tools:kotlin-build-statistics",
|
||||
":compiler:build-tools:kotlin-build-tools-api",
|
||||
":compiler:build-tools:kotlin-build-tools-impl",
|
||||
)
|
||||
|
||||
+2
-1
@@ -268,7 +268,8 @@ include ":kotlin-imports-dumper-compiler-plugin",
|
||||
":wasm:wasm.frontend",
|
||||
":wasm:wasm.config",
|
||||
":repo:codebase-tests",
|
||||
":repo:artifacts-tests"
|
||||
":repo:artifacts-tests",
|
||||
":prepare:kotlin-gradle-plugin-compiler-dependencies"
|
||||
|
||||
include ":kotlin-atomicfu-compiler-plugin",
|
||||
":kotlin-atomicfu-compiler-plugin-embeddable",
|
||||
|
||||
Reference in New Issue
Block a user