diff --git a/.idea/dictionaries/4u7.xml b/.idea/dictionaries/4u7.xml index efc103abf3b..46a8ae53c11 100644 --- a/.idea/dictionaries/4u7.xml +++ b/.idea/dictionaries/4u7.xml @@ -5,13 +5,16 @@ cacheability cacheable cidr + fastutil foldable instrumentator jdks + proguarded protobuf redirector remapper sonatype + streamex unpresent diff --git a/analysis/analysis-api-fir/analysis-api-fir-generator/build.gradle.kts b/analysis/analysis-api-fir/analysis-api-fir-generator/build.gradle.kts index 7d3cf8a8a51..fd48d9c28be 100644 --- a/analysis/analysis-api-fir/analysis-api-fir-generator/build.gradle.kts +++ b/analysis/analysis-api-fir/analysis-api-fir-generator/build.gradle.kts @@ -15,10 +15,11 @@ dependencies { implementation(project(":kotlin-reflect-api")) /* - We do not need guava in the generator, but because of a bug in the IJ project importing, we need to have a dependency on intellijCoreDep + We do not need guava in the generator, but because of a bug in the IJ project importing, we need to have a dependency on intellijCore the same as it is in `:fir:tree:tree-generator` module to the project be imported correctly */ - compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("com.google.guava:guava")) implementation(project(":compiler:psi")) } diff --git a/analysis/analysis-api-fir/build.gradle.kts b/analysis/analysis-api-fir/build.gradle.kts index 6b7fa936f9e..0976a6d64b8 100644 --- a/analysis/analysis-api-fir/build.gradle.kts +++ b/analysis/analysis-api-fir/build.gradle.kts @@ -18,7 +18,7 @@ dependencies { api(project(":analysis:analysis-api")) api(project(":analysis:analysis-api-impl-base")) api(project(":compiler:light-classes")) - api(intellijCoreDep()) + api(intellijCore()) implementation(project(":analysis:analysis-api-providers")) implementation(project(":analysis:analysis-internal-utils")) @@ -33,26 +33,6 @@ dependencies { testApi(toolsJar()) testApiJUnit5() testApi(project(":analysis:symbol-light-classes")) - - testRuntimeOnly(intellijDep()) { - includeJars( - "jps-model", - "extensions", - "util", - "platform-api", - "platform-impl", - "idea", - "guava", - "trove4j", - "asm-all", - "log4j", - "jdom", - "streamex", - "bootstrap", - "jna", - rootProject = rootProject - ) - } } sourceSets { diff --git a/analysis/analysis-api-impl-barebone/build.gradle.kts b/analysis/analysis-api-impl-barebone/build.gradle.kts index 0944e7c6c4e..fc74ba5558e 100644 --- a/analysis/analysis-api-impl-barebone/build.gradle.kts +++ b/analysis/analysis-api-impl-barebone/build.gradle.kts @@ -7,7 +7,7 @@ dependencies { api(project(":compiler:psi")) api(project(":analysis:analysis-api-providers")) api(project(":analysis:project-structure")) - api(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) } + api(intellijCore()) testApiJUnit5() testApi(project(":kotlin-test:kotlin-test-junit")) diff --git a/analysis/analysis-api-impl-base/build.gradle.kts b/analysis/analysis-api-impl-base/build.gradle.kts index e5228dd058c..10bc59a9a11 100644 --- a/analysis/analysis-api-impl-base/build.gradle.kts +++ b/analysis/analysis-api-impl-base/build.gradle.kts @@ -7,7 +7,7 @@ dependencies { api(project(":compiler:psi")) api(project(":analysis:analysis-api")) api(project(":analysis:analysis-api-impl-barebone")) - api(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) } + api(intellijCore()) implementation(project(":analysis:analysis-internal-utils")) testApiJUnit5() diff --git a/analysis/analysis-api-providers/build.gradle.kts b/analysis/analysis-api-providers/build.gradle.kts index 048fbd4edcd..4aede978038 100644 --- a/analysis/analysis-api-providers/build.gradle.kts +++ b/analysis/analysis-api-providers/build.gradle.kts @@ -8,7 +8,7 @@ dependencies { implementation(project(":compiler:frontend.java")) implementation(project(":core:compiler.common")) implementation(project(":analysis:project-structure")) - implementation(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) } + implementation(intellijCore()) } sourceSets { diff --git a/analysis/analysis-api/build.gradle.kts b/analysis/analysis-api/build.gradle.kts index 58b9c071830..735c4ed2b43 100644 --- a/analysis/analysis-api/build.gradle.kts +++ b/analysis/analysis-api/build.gradle.kts @@ -18,7 +18,8 @@ dependencies { implementation(project(":analysis:analysis-internal-utils")) implementation(project(":analysis:analysis-api-providers")) - api(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } + api(intellijCore()) + api(commonDependency("com.google.guava:guava")) } kotlin { diff --git a/analysis/analysis-internal-utils/build.gradle.kts b/analysis/analysis-internal-utils/build.gradle.kts index 98661c85300..78f57e0120c 100644 --- a/analysis/analysis-internal-utils/build.gradle.kts +++ b/analysis/analysis-internal-utils/build.gradle.kts @@ -5,7 +5,7 @@ plugins { dependencies { implementation(project(":compiler:psi")) - implementation(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) } + implementation(intellijCore()) } sourceSets { diff --git a/analysis/low-level-api-fir/build.gradle.kts b/analysis/low-level-api-fir/build.gradle.kts index 591a454a54e..518ac29f4d9 100644 --- a/analysis/low-level-api-fir/build.gradle.kts +++ b/analysis/low-level-api-fir/build.gradle.kts @@ -24,8 +24,7 @@ dependencies { implementation(project(":analysis:analysis-api-providers")) implementation(project(":analysis:analysis-internal-utils")) - api(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } - + api(intellijCore()) testApi(projectTests(":compiler:test-infrastructure-utils")) testApi(projectTests(":compiler:test-infrastructure")) @@ -42,21 +41,6 @@ dependencies { testImplementation(project(":analysis:symbol-light-classes")) testRuntimeOnly(project(":core:descriptors.runtime")) - - testApi(intellijDep()) { - includeJars( - "jps-model", - "platform-api", - "platform-impl", - "guava", - "trove4j", - "asm-all", - "log4j", - "jdom", - "streamex", - rootProject = rootProject - ) - } } sourceSets { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/firTestUtils.kt b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/firTestUtils.kt index cc8580b15e1..195c16383d6 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/firTestUtils.kt +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/firTestUtils.kt @@ -5,8 +5,6 @@ package org.jetbrains.kotlin.analysis.low.level.api.fir -import com.intellij.openapi.module.ModuleManager -import com.intellij.openapi.project.Project import org.jetbrains.kotlin.fir.FirElement import org.jetbrains.kotlin.fir.FirRenderer import org.jetbrains.kotlin.fir.declarations.FirDeclaration @@ -21,8 +19,6 @@ import org.jetbrains.kotlin.analysis.low.level.api.fir.sessions.FirIdeSession import org.jetbrains.kotlin.analysis.project.structure.getKtModule import org.jetbrains.kotlin.psi.KtElement -internal fun Project.allModules() = ModuleManager.getInstance(this).modules.toList() - internal fun FirElement.renderWithClassName(renderMode: FirRenderer.RenderMode = FirRenderer.RenderMode.Normal): String = "${this::class.simpleName} `${render(renderMode)}`" diff --git a/analysis/project-structure/build.gradle.kts b/analysis/project-structure/build.gradle.kts index 10dfd2ac8d7..77ec19aa537 100644 --- a/analysis/project-structure/build.gradle.kts +++ b/analysis/project-structure/build.gradle.kts @@ -7,7 +7,7 @@ dependencies { implementation(project(":core:compiler.common")) implementation(project(":compiler:util")) implementation(project(":compiler:psi")) - implementation(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) } + implementation(intellijCore()) } kotlin { diff --git a/analysis/symbol-light-classes/build.gradle.kts b/analysis/symbol-light-classes/build.gradle.kts index 07622a02e08..8bd5266a313 100644 --- a/analysis/symbol-light-classes/build.gradle.kts +++ b/analysis/symbol-light-classes/build.gradle.kts @@ -12,7 +12,7 @@ dependencies { implementation(project(":analysis:analysis-api")) implementation(project(":analysis:analysis-internal-utils")) implementation(project(":analysis:project-structure")) - implementation(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) } + implementation(intellijCore()) } sourceSets { diff --git a/benchmarks/build.gradle.kts b/benchmarks/build.gradle.kts index b68a38286c4..632987ea49f 100644 --- a/benchmarks/build.gradle.kts +++ b/benchmarks/build.gradle.kts @@ -13,10 +13,8 @@ dependencies { api(project(":compiler:frontend")) api(projectTests(":compiler:tests-common")) api(project(":compiler:cli")) - api(intellijCoreDep()) { includeJars("intellij-core") } - api(jpsStandalone()) { includeJars("jps-model") } - api(intellijPluginDep("java")) - api(intellijDep()) { includeIntellijCoreJarDependencies(project) } + api(intellijCore()) + api(jpsModel()) api("org.jetbrains.kotlinx:kotlinx-benchmark-runtime:$benchmarks_version") } diff --git a/build-common/build.gradle.kts b/build-common/build.gradle.kts index 4f05d49b1ef..c379cb351e7 100644 --- a/build-common/build.gradle.kts +++ b/build-common/build.gradle.kts @@ -14,10 +14,12 @@ dependencies { compileOnly(project(":js:js.serializer")) compileOnly(project(":js:js.config")) compileOnly(project(":kotlin-util-klib-metadata")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("asm-all", "trove4j", "util", rootProject = rootProject) } compileOnly(project(":kotlin-reflect-api")) + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) + compileOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) + testCompileOnly(project(":compiler:cli-common")) testApi(projectTests(":compiler:tests-common")) testApi(commonDependency("junit:junit")) diff --git a/build.gradle.kts b/build.gradle.kts index 1ee508574dd..1c2282a2314 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -154,22 +154,6 @@ extra["versions.kotlinx-metadata-jvm"] = "0.4.0" val useJvmFir by extra(project.kotlinBuildProperties.useFir) -val intellijSeparateSdks = project.getBooleanProperty("intellijSeparateSdks") ?: false - -extra["intellijSeparateSdks"] = intellijSeparateSdks - -extra["IntellijCoreDependencies"] = - listOf( - "asm-all-9.0", - "guava", - "jdom", - "jna", - "log4j", - "snappy-in-java", - "streamex", - "trove4j" - ).filterNotNull() - val irCompilerModules = arrayOf( ":compiler:ir.tree", ":compiler:ir.tree.impl", @@ -421,7 +405,10 @@ allprojects { val mirrorRepo: String? = findProperty("maven.repository.mirror")?.toString() repositories { - kotlinBuildLocalRepo(project) + if (kotlinBuildProperties.getOrNull("attachedIntellijVersion") != null) { + kotlinBuildLocalRepo(project) + } + mirrorRepo?.let(::maven) internalBootstrapRepo?.let(::maven)?.apply { @@ -444,11 +431,13 @@ allprojects { } maven(intellijRepo) + maven("https://packages.jetbrains.team/maven/p/ij/intellij-dependencies") mavenCentral() maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-dependencies") maven("https://dl.google.com/dl/android/maven2") - maven("https://packages.jetbrains.team/maven/p/ij/intellij-dependencies") + + maven("https://download.jetbrains.com/teamcity-repository/") jcenter() } diff --git a/buildSrc/src/main/kotlin/dependencies.kt b/buildSrc/src/main/kotlin/dependencies.kt index 6581a3939ba..80ee1188e18 100644 --- a/buildSrc/src/main/kotlin/dependencies.kt +++ b/buildSrc/src/main/kotlin/dependencies.kt @@ -237,11 +237,8 @@ fun Project.testApiJUnit5( testApi("$component:$componentsVersion") } - addDependencyTo(this, "testImplementation", intellijDep()) { - // This dependency is needed only for FileComparisonFailure - includeJars("idea_rt", rootProject = rootProject) - isTransitive = false - } + // This dependency is needed only for FileComparisonFailure + add("testImplementation", intellijJavaRt()) // This is needed only for using FileComparisonFailure, which relies on JUnit 3 classes add("testRuntimeOnly", commonDependency("junit:junit")) diff --git a/buildSrc/src/main/kotlin/intellijDependencies.kt b/buildSrc/src/main/kotlin/intellijDependencies.kt new file mode 100644 index 00000000000..6cd978f002f --- /dev/null +++ b/buildSrc/src/main/kotlin/intellijDependencies.kt @@ -0,0 +1,34 @@ +import org.gradle.api.Project +import org.gradle.kotlin.dsl.extra +import org.gradle.kotlin.dsl.project + +/* + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +val Project.intellijVersion + get() = rootProject.extra["versions.intellijSdk"] + +fun Project.intellijCore() = dependencies.project(":dependencies:intellij-core") + +fun Project.jpsModel() = "com.jetbrains.intellij.platform:jps-model:$intellijVersion" +fun Project.jpsModelSerialization() = "com.jetbrains.intellij.platform:jps-model-serialization:$intellijVersion" +fun Project.jpsModelImpl() = "com.jetbrains.intellij.platform:jps-model-impl:$intellijVersion" +fun Project.jpsBuildTest() = "com.jetbrains.intellij.idea:jps-build-test:$intellijVersion" +fun Project.intellijPlatformUtil() = "com.jetbrains.intellij.platform:util:$intellijVersion" +fun Project.intellijJavaRt() = "com.jetbrains.intellij.java:java-rt:$intellijVersion" +fun Project.intellijAnalysis() = "com.jetbrains.intellij.platform:analysis:$intellijVersion" + +/** + * Runtime version of annotations that are already in Kotlin stdlib (historically Kotlin has older version of this one). + * + * SHOULD NOT BE USED IN COMPILE CLASSPATH! + * + * `@NonNull`, `@Nullabe` from `idea/annotations.jar` has `TYPE` target which leads to different types treatment in Kotlin compiler. + * On the other hand, `idea/annotations.jar` contains org/jetbrains/annotations/Async annations which is required for IDEA debugger. + * + * So, we are excluding `annotaions.jar` from all other `kotlin.build` and using this one for runtime only + * to avoid accidentally including `annotations.jar` by calling `intellijDep()`. + */ +fun Project.intellijRuntimeAnnotations() = "org.jetbrains:annotations:${rootProject.extra["versions.annotations"]}" diff --git a/buildSrc/src/main/kotlin/localDependencies.kt b/buildSrc/src/main/kotlin/localDependencies.kt index a5cb4e037df..bbfae4cb371 100644 --- a/buildSrc/src/main/kotlin/localDependencies.kt +++ b/buildSrc/src/main/kotlin/localDependencies.kt @@ -80,33 +80,16 @@ fun Project.intellijDep(module: String? = null, forIde: Boolean = false) = fun Project.intellijCoreDep() = "kotlin.build:intellij-core:${rootProject.extra["versions.intellijSdk"]}" -fun Project.jpsStandalone() = "kotlin.build:jps-standalone:${rootProject.extra["versions.intellijSdk"]}" - -fun Project.jpsBuildTest() = "com.jetbrains.intellij.idea:jps-build-test:${rootProject.extra["versions.intellijSdk"]}" - -/** - * Runtime version of annotations that are already in Kotlin stdlib (historically Kotlin has older version of this one). - * - * SHOULD NOT BE USED IN COMPILE CLASSPATH! - * - * `@NonNull`, `@Nullabe` from `idea/annotations.jar` has `TYPE` target which leads to different types treatment in Kotlin compiler. - * On the other hand, `idea/annotations.jar` contains org/jetbrains/annotations/Async annations which is required for IDEA debugger. - * - * So, we are excluding `annotaions.jar` from all other `kotlin.build` and using this one for runtime only - * to avoid accidentally including `annotations.jar` by calling `intellijDep()`. - */ -fun Project.intellijRuntimeAnnotations() = "org.jetbrains:annotations:${rootProject.extra["versions.annotations"]}" - fun Project.intellijPluginDep(plugin: String, forIde: Boolean = false) = intellijDep(plugin, forIde) fun ModuleDependency.includeJars(vararg names: String, rootProject: Project? = null) { names.forEach { var baseName = it.removeSuffix(".jar") - if (rootProject != null && rootProject.extra.has("ignore.jar.$baseName")) { + if (rootProject != null && rootProject.extra.has("ignore.$baseName")) { return@forEach } - if (rootProject != null && rootProject.extra.has("versions.jar.$baseName")) { - baseName += "-${rootProject.extra["versions.jar.$baseName"]}" + if (rootProject != null && rootProject.extra.has("versions.$baseName")) { + baseName += "-${rootProject.extra["versions.$baseName"]}" } artifact { name = baseName @@ -130,11 +113,4 @@ object IntellijRootUtils { } } -@Suppress("UNCHECKED_CAST") -fun ModuleDependency.includeIntellijCoreJarDependencies(project: Project, jarsFilterPredicate: (String) -> Boolean = { true }): Unit = - includeJars( - *(project.rootProject.extra["IntellijCoreDependencies"] as List).filter(jarsFilterPredicate).toTypedArray(), - rootProject = project.rootProject - ) - fun Project.intellijRootDir() = IntellijRootUtils.getIntellijRootDir(project) \ No newline at end of file diff --git a/compiler/android-tests/build.gradle.kts b/compiler/android-tests/build.gradle.kts index 7bf01685295..40e8f3395f2 100644 --- a/compiler/android-tests/build.gradle.kts +++ b/compiler/android-tests/build.gradle.kts @@ -26,15 +26,11 @@ dependencies { testApi(commonDependency("junit:junit")) - testApi(intellijDep()) { includeJars("util", "idea", "idea_rt", rootProject = rootProject) } - testApi(intellijDep()) { includeJars("groovy", rootProject = rootProject) } - - testApi(intellijPluginDep("java")) { includeJars("jps-builders") } - testApi(jpsStandalone()) { includeJars("jps-model") } + testApi(jpsModel()) testApi(jpsBuildTest()) - testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") } - testRuntimeOnly(intellijDep()) { includeJars("jna", rootProject = rootProject) } + testRuntimeOnly(intellijCore()) + testRuntimeOnly(commonDependency("net.java.dev.jna:jna")) testApi("org.junit.platform:junit-platform-launcher:${commonDependencyVersion("org.junit.platform", "")}") } diff --git a/compiler/backend-common/build.gradle.kts b/compiler/backend-common/build.gradle.kts index 5e53698b5d8..c3d047a83ae 100644 --- a/compiler/backend-common/build.gradle.kts +++ b/compiler/backend-common/build.gradle.kts @@ -8,7 +8,7 @@ dependencies { api(project(":core:descriptors")) api(project(":compiler:util")) api(project(":compiler:frontend")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/backend.common.jvm/build.gradle.kts b/compiler/backend.common.jvm/build.gradle.kts index c5511952206..cb1e31ec804 100644 --- a/compiler/backend.common.jvm/build.gradle.kts +++ b/compiler/backend.common.jvm/build.gradle.kts @@ -6,7 +6,8 @@ plugins { dependencies { api(project(":core:compiler.common.jvm")) api(project(":compiler:config.jvm")) - api(intellijCoreDep()) { includeJars("asm-all", "guava", rootProject = rootProject) } + api(commonDependency("org.jetbrains.intellij.deps:asm-all")) + api(commonDependency("com.google.guava:guava")) } sourceSets { diff --git a/compiler/backend/build.gradle.kts b/compiler/backend/build.gradle.kts index 6a02463ee7c..f3b3a69c6ca 100644 --- a/compiler/backend/build.gradle.kts +++ b/compiler/backend/build.gradle.kts @@ -11,8 +11,10 @@ dependencies { api(project(":compiler:frontend.java")) api(project(":compiler:serialization")) api(project(":compiler:backend.common.jvm")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core", "asm-all", "guava", rootProject = rootProject) } - compileOnly(intellijDep()) { includeJars("trove4j", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) + compileOnly(commonDependency("com.google.guava:guava")) } sourceSets { diff --git a/compiler/build.gradle.kts b/compiler/build.gradle.kts index fc4f3e38d14..705d2627586 100644 --- a/compiler/build.gradle.kts +++ b/compiler/build.gradle.kts @@ -12,7 +12,7 @@ val otherCompilerModules = compilerModules.filter { it != path } val antLauncherJar by configurations.creating dependencies { - testImplementation(intellijDep()) { includeJars("platform-impl", rootProject = rootProject) } // Should come before compiler, because of "progarded" stuff needed for tests + testImplementation(intellijCore()) // Should come before compiler, because of "progarded" stuff needed for tests testApi(project(":kotlin-script-runtime")) testApi(project(":kotlin-test:kotlin-test-jvm")) @@ -33,21 +33,10 @@ dependencies { testApi(project(":kotlin-scripting-compiler")) testApi(project(":kotlin-script-util")) testCompileOnly(project(":kotlin-reflect-api")) + otherCompilerModules.forEach { testCompileOnly(project(it)) } - testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } - - testRuntimeOnly(intellijDep()) { - includeJars( - "jps-model", - "streamex", - "idea_rt", - rootProject = rootProject - ) - } - - testRuntimeOnly(intellijPluginDep("java")) testImplementation(project(":kotlin-reflect")) testImplementation(toolsJar()) diff --git a/compiler/cli/build.gradle.kts b/compiler/cli/build.gradle.kts index b22f8ab7df2..54a9c687048 100644 --- a/compiler/cli/build.gradle.kts +++ b/compiler/cli/build.gradle.kts @@ -39,8 +39,8 @@ dependencies { compileOnly(project(":compiler:ir.tree.impl")) compileOnly(toolsJarApi()) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeIntellijCoreJarDependencies(project) } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) testApi(project(":compiler:backend")) testApi(project(":compiler:cli")) diff --git a/compiler/cli/cli-common/build.gradle.kts b/compiler/cli/cli-common/build.gradle.kts index 24af8d482fc..d4288fd82ca 100644 --- a/compiler/cli/cli-common/build.gradle.kts +++ b/compiler/cli/cli-common/build.gradle.kts @@ -10,8 +10,9 @@ dependencies { api(project(":js:js.config")) api(project(":native:kotlin-native-utils")) compileOnly(project(":kotlin-reflect-api")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeIntellijCoreJarDependencies(project) } + compileOnly(intellijCore()) + compileOnly(commonDependency("com.google.guava:guava")) + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) } sourceSets { diff --git a/compiler/cli/cli-js/build.gradle.kts b/compiler/cli/cli-js/build.gradle.kts index 373cdbed9f9..bbcc24fbef9 100644 --- a/compiler/cli/cli-js/build.gradle.kts +++ b/compiler/cli/cli-js/build.gradle.kts @@ -19,7 +19,7 @@ dependencies { api(project(":js:js.dce")) api(project(":js:js.sourcemap")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/compiler-runner-unshaded/build.gradle.kts b/compiler/compiler-runner-unshaded/build.gradle.kts index c8a24c76558..175b6adc1a2 100644 --- a/compiler/compiler-runner-unshaded/build.gradle.kts +++ b/compiler/compiler-runner-unshaded/build.gradle.kts @@ -16,7 +16,7 @@ dependencies { compileOnly(project(":daemon-common")) compileOnly(project(":daemon-common-new")) compileOnly(project(":compiler:util")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/config.jvm/build.gradle.kts b/compiler/config.jvm/build.gradle.kts index ddc3e242a82..52e0265427c 100644 --- a/compiler/config.jvm/build.gradle.kts +++ b/compiler/config.jvm/build.gradle.kts @@ -6,7 +6,7 @@ plugins { dependencies { api(project(":compiler:config")) api(project(":core:compiler.common.jvm")) - compileOnly(intellijCoreDep()) { includeJars("asm-all", rootProject = rootProject) } + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) } sourceSets { diff --git a/compiler/config/build.gradle.kts b/compiler/config/build.gradle.kts index f6d6badc49c..113716af20a 100644 --- a/compiler/config/build.gradle.kts +++ b/compiler/config/build.gradle.kts @@ -7,7 +7,7 @@ dependencies { api(project(":core:metadata")) api(project(":core:compiler.common")) api(project(":compiler:util")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/container/build.gradle.kts b/compiler/container/build.gradle.kts index 2ec86eec503..41d4a0b7dc8 100644 --- a/compiler/container/build.gradle.kts +++ b/compiler/container/build.gradle.kts @@ -7,14 +7,16 @@ dependencies { api(project(":core:util.runtime")) api(commonDependency("javax.inject")) compileOnly(kotlinStdlib()) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) testApi(kotlinStdlib()) testCompileOnly("org.jetbrains:annotations:13.0") testApi(project(":kotlin-test:kotlin-test-jvm")) testApi(project(":kotlin-test:kotlin-test-junit")) testApi(commonDependency("junit:junit")) - testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } - testRuntimeOnly(intellijDep()) { includeJars("trove4j", "util") } + testCompileOnly(intellijCore()) + + testRuntimeOnly(intellijCore()) + testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) } sourceSets { diff --git a/compiler/daemon/build.gradle.kts b/compiler/daemon/build.gradle.kts index a933747d183..0d35cee8222 100644 --- a/compiler/daemon/build.gradle.kts +++ b/compiler/daemon/build.gradle.kts @@ -16,8 +16,8 @@ dependencies { compileOnly(project(":compiler:incremental-compilation-impl")) compileOnly(project(":daemon-common-new")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("trove4j") } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) runtimeOnly(project(":kotlin-reflect")) diff --git a/compiler/daemon/daemon-client-new/build.gradle.kts b/compiler/daemon/daemon-client-new/build.gradle.kts index 140466315e0..9df41c58d4e 100644 --- a/compiler/daemon/daemon-client-new/build.gradle.kts +++ b/compiler/daemon/daemon-client-new/build.gradle.kts @@ -29,7 +29,6 @@ dependencies { compileOnly(project(":js:js.frontend")) compileOnly(project(":daemon-common")) { isTransitive = false } compileOnly(commonDependency("net.rubygrapefruit", "native-platform")) - compileOnly(intellijDep()) { includeIntellijCoreJarDependencies(project) } embedded(project(":kotlin-daemon-client")) { isTransitive = false } embedded(project(":daemon-common")) { isTransitive = false } diff --git a/compiler/daemon/daemon-client/build.gradle.kts b/compiler/daemon/daemon-client/build.gradle.kts index 165b8d2f244..fc5d993027e 100644 --- a/compiler/daemon/daemon-client/build.gradle.kts +++ b/compiler/daemon/daemon-client/build.gradle.kts @@ -25,7 +25,6 @@ dependencies { compileOnly(project(":kotlin-reflect-api")) compileOnly(project(":js:js.frontend")) compileOnly(commonDependency("net.rubygrapefruit", "native-platform")) - compileOnly(intellijDep()) { includeIntellijCoreJarDependencies(project) } embedded(project(":daemon-common")) { isTransitive = false } embedded(commonDependency("net.rubygrapefruit", "native-platform")) diff --git a/compiler/daemon/daemon-common-new/build.gradle.kts b/compiler/daemon/daemon-common-new/build.gradle.kts index 02c59462d83..bd1770f6cb8 100644 --- a/compiler/daemon/daemon-common-new/build.gradle.kts +++ b/compiler/daemon/daemon-common-new/build.gradle.kts @@ -9,11 +9,8 @@ val ktorExcludesForDaemon: List> by rootProject.extra dependencies { compileOnly(project(":daemon-common")) api(kotlinStdlib()) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeIntellijCoreJarDependencies(project) } - api(commonDependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { - isTransitive = false - } + compileOnly(intellijCore()) + api(commonDependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false } api(commonDependency("io.ktor", "ktor-network")) { ktorExcludesForDaemon.forEach { (group, module) -> exclude(group = group, module = module) diff --git a/compiler/daemon/daemon-common/build.gradle.kts b/compiler/daemon/daemon-common/build.gradle.kts index 29d412f02d1..e45efbab0e2 100644 --- a/compiler/daemon/daemon-common/build.gradle.kts +++ b/compiler/daemon/daemon-common/build.gradle.kts @@ -8,11 +8,8 @@ dependencies { api(project(":kotlin-build-common")) api(kotlinStdlib()) compileOnly(project(":js:js.config")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeIntellijCoreJarDependencies(project) } - api(commonDependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { - isTransitive = false - } + compileOnly(intellijCore()) + api(commonDependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false } } sourceSets { diff --git a/compiler/daemon/daemon-tests/build.gradle.kts b/compiler/daemon/daemon-tests/build.gradle.kts index ffb8635e9c8..d057c45df1e 100644 --- a/compiler/daemon/daemon-tests/build.gradle.kts +++ b/compiler/daemon/daemon-tests/build.gradle.kts @@ -25,7 +25,7 @@ dependencies { } } testImplementation(project(":kotlin-daemon")) - testImplementation(intellijCoreDep()) { includeJars("intellij-core") } + testImplementation(intellijCore()) } sourceSets { diff --git a/compiler/fir/analysis-tests/build.gradle.kts b/compiler/fir/analysis-tests/build.gradle.kts index 37fdb3c2f8d..e5c909b3a9a 100644 --- a/compiler/fir/analysis-tests/build.gradle.kts +++ b/compiler/fir/analysis-tests/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } dependencies { - compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } + compileOnly(intellijCore()) testApi(projectTests(":compiler:test-infrastructure")) testApi(projectTests(":compiler:test-infrastructure-utils")) @@ -31,11 +31,11 @@ dependencies { testRuntimeOnly(project(":core:descriptors.runtime")) testRuntimeOnly(project(":compiler:fir:fir2ir:jvm-backend")) - testImplementation(intellijCoreDep()) { includeJars("intellij-core") } - testRuntimeOnly(intellijDep()) { - includeJars("intellij-deps-fastutil-8.4.1-4", "jps-model", "streamex", "jna", rootProject = rootProject) - } + testImplementation(intellijCore()) + testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps.fastutil:intellij-deps-fastutil")) + testRuntimeOnly(commonDependency("one.util:streamex")) + testRuntimeOnly(commonDependency("net.java.dev.jna:jna")) testRuntimeOnly(toolsJar()) } diff --git a/compiler/fir/analysis-tests/legacy-fir-tests/build.gradle.kts b/compiler/fir/analysis-tests/legacy-fir-tests/build.gradle.kts index 58aeb43cc44..77640941a98 100644 --- a/compiler/fir/analysis-tests/legacy-fir-tests/build.gradle.kts +++ b/compiler/fir/analysis-tests/legacy-fir-tests/build.gradle.kts @@ -11,7 +11,7 @@ plugins { } dependencies { - compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } + compileOnly(intellijCore()) testApi(commonDependency("junit:junit")) testCompileOnly(project(":kotlin-test:kotlin-test-jvm")) @@ -26,9 +26,8 @@ dependencies { testRuntimeOnly(project(":kotlin-reflect")) testRuntimeOnly(project(":core:descriptors.runtime")) - testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } - testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") } - testRuntimeOnly(intellijDep()) { includeJars("idea_rt", "streamex", "jps-model", rootProject = rootProject) } + testCompileOnly(intellijCore()) + testRuntimeOnly(intellijCore()) } val generationRoot = projectDir.resolve("tests-gen") diff --git a/compiler/fir/checkers/build.gradle.kts b/compiler/fir/checkers/build.gradle.kts index 5a1e0ffcdcd..aa4927f0f9a 100644 --- a/compiler/fir/checkers/build.gradle.kts +++ b/compiler/fir/checkers/build.gradle.kts @@ -13,7 +13,7 @@ dependencies { implementation(project(":compiler:psi")) compileOnly(project(":kotlin-reflect-api")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/fir/checkers/checkers-component-generator/build.gradle.kts b/compiler/fir/checkers/checkers-component-generator/build.gradle.kts index 23fe4b15f1c..06a01c5d001 100644 --- a/compiler/fir/checkers/checkers-component-generator/build.gradle.kts +++ b/compiler/fir/checkers/checkers-component-generator/build.gradle.kts @@ -13,10 +13,11 @@ dependencies { implementation(project(":kotlin-reflect-api")) /* - We do not need guava in the generator, but because of a bug in the IJ project importing, we need to have a dependency on intellijCoreDep + We do not need guava in the generator, but because of a bug in the IJ project importing, we need to have a dependency on intellijCore the same as it is in `:fir:tree:tree-generator` module to the project be imported correctly */ - compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("com.google.guava:guava")) implementation(project(":compiler:psi")) } diff --git a/compiler/fir/checkers/checkers.jvm/build.gradle.kts b/compiler/fir/checkers/checkers.jvm/build.gradle.kts index dac39603fe1..906bbeac80d 100644 --- a/compiler/fir/checkers/checkers.jvm/build.gradle.kts +++ b/compiler/fir/checkers/checkers.jvm/build.gradle.kts @@ -17,7 +17,7 @@ dependencies { implementation(project(":compiler:psi")) compileOnly(project(":kotlin-reflect-api")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/fir/cones/build.gradle.kts b/compiler/fir/cones/build.gradle.kts index a59f1a83d40..f4f740de77d 100644 --- a/compiler/fir/cones/build.gradle.kts +++ b/compiler/fir/cones/build.gradle.kts @@ -12,7 +12,7 @@ dependencies { api(project(":core:compiler.common")) api(kotlinxCollectionsImmutable()) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/fir/dump/build.gradle.kts b/compiler/fir/dump/build.gradle.kts index 1f19bfa513a..aaf7e897b44 100644 --- a/compiler/fir/dump/build.gradle.kts +++ b/compiler/fir/dump/build.gradle.kts @@ -21,9 +21,8 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:0.6.12") - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("commons-lang-2.4") } - + compileOnly(intellijCore()) + compileOnly(commonDependency("commons-lang:commons-lang")) } sourceSets { diff --git a/compiler/fir/entrypoint/build.gradle.kts b/compiler/fir/entrypoint/build.gradle.kts index 6718b0fb8ab..4e51a08326a 100644 --- a/compiler/fir/entrypoint/build.gradle.kts +++ b/compiler/fir/entrypoint/build.gradle.kts @@ -24,7 +24,7 @@ dependencies { implementation(project(":compiler:ir.tree.impl")) compileOnly(project(":kotlin-reflect-api")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/fir/fir-deserialization/build.gradle.kts b/compiler/fir/fir-deserialization/build.gradle.kts index 35d33eed252..3806f5ffe66 100644 --- a/compiler/fir/fir-deserialization/build.gradle.kts +++ b/compiler/fir/fir-deserialization/build.gradle.kts @@ -16,7 +16,7 @@ dependencies { api(project(":compiler:fir:providers")) api(project(":compiler:fir:semantics")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/fir/fir-serialization/build.gradle.kts b/compiler/fir/fir-serialization/build.gradle.kts index 0de18093749..3e28e17619e 100644 --- a/compiler/fir/fir-serialization/build.gradle.kts +++ b/compiler/fir/fir-serialization/build.gradle.kts @@ -14,7 +14,7 @@ dependencies { api(project(":compiler:fir:providers")) api(project(":compiler:fir:semantics")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/fir/fir2ir/build.gradle.kts b/compiler/fir/fir2ir/build.gradle.kts index 23ff3446447..d30dcfd8174 100644 --- a/compiler/fir/fir2ir/build.gradle.kts +++ b/compiler/fir/fir2ir/build.gradle.kts @@ -17,7 +17,7 @@ dependencies { compileOnly(project(":compiler:ir.psi2ir")) compileOnly(project(":compiler:ir.backend.common")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) testCompileOnly(project(":kotlin-test:kotlin-test-jvm")) testCompileOnly(project(":kotlin-test:kotlin-test-junit")) @@ -38,14 +38,15 @@ dependencies { testRuntimeOnly(project(":compiler:fir:fir2ir:jvm-backend")) testRuntimeOnly(project(":generators")) - testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } - testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") } + testCompileOnly(intellijCore()) + testRuntimeOnly(intellijCore()) - testRuntimeOnly(intellijDep()) { - includeJars("jna", rootProject = rootProject) - } + testRuntimeOnly(commonDependency("net.java.dev.jna:jna")) + testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps.fastutil:intellij-deps-fastutil")) + testRuntimeOnly(commonDependency("one.util:streamex")) - testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4", "jps-model", "streamex", rootProject = rootProject) } + testRuntimeOnly(jpsModel()) + testRuntimeOnly(jpsModelImpl()) } val generationRoot = projectDir.resolve("tests-gen") diff --git a/compiler/fir/fir2ir/jvm-backend/build.gradle.kts b/compiler/fir/fir2ir/jvm-backend/build.gradle.kts index 94fea1ddedb..f2f3889524e 100644 --- a/compiler/fir/fir2ir/jvm-backend/build.gradle.kts +++ b/compiler/fir/fir2ir/jvm-backend/build.gradle.kts @@ -19,7 +19,8 @@ dependencies { compileOnly(project(":compiler:backend.jvm")) api(project(":compiler:ir.serialization.common")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core", "asm-all", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) } sourceSets { diff --git a/compiler/fir/java/build.gradle.kts b/compiler/fir/java/build.gradle.kts index a58d2550fc9..5dd0b31d7f2 100644 --- a/compiler/fir/java/build.gradle.kts +++ b/compiler/fir/java/build.gradle.kts @@ -17,7 +17,7 @@ dependencies { implementation(project(":core:deserialization.common.jvm")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } diff --git a/compiler/fir/modularized-tests/build.gradle.kts b/compiler/fir/modularized-tests/build.gradle.kts index 79cff26b2ba..c57727ecb3d 100644 --- a/compiler/fir/modularized-tests/build.gradle.kts +++ b/compiler/fir/modularized-tests/build.gradle.kts @@ -1,5 +1,3 @@ -import org.jetbrains.kotlin.cli.common.toBooleanLenient - /* * Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license * that can be found in the license/LICENSE.txt file. @@ -15,16 +13,10 @@ repositories { } dependencies { - testApi(intellijCoreDep()) { includeJars("intellij-core")} - testApi(intellijDep()) { - includeJars("extensions", "idea_rt", "util", "asm-all", "jna", rootProject = rootProject) - } - - testCompileOnly(intellijPluginDep("java")) { includeJars("java-api") } + testApi(intellijCore()) testRuntimeOnly("xerces:xercesImpl:2.12.0") - testRuntimeOnly(intellijPluginDep("java")) - testRuntimeOnly(intellijDep()) { includeJars("commons-lang-2.4") } + testRuntimeOnly(commonDependency("commons-lang:commons-lang")) testApi(commonDependency("junit:junit")) testCompileOnly(project(":kotlin-test:kotlin-test-jvm")) diff --git a/compiler/fir/providers/build.gradle.kts b/compiler/fir/providers/build.gradle.kts index 177eb28ba81..1a8ae2722da 100644 --- a/compiler/fir/providers/build.gradle.kts +++ b/compiler/fir/providers/build.gradle.kts @@ -11,7 +11,7 @@ dependencies { implementation(project(":core:util.runtime")) compileOnly(project(":kotlin-reflect-api")) - compileOnly(intellijCoreDep()) { includeJars("guava", rootProject = rootProject) } + compileOnly(commonDependency("com.google.guava:guava")) } sourceSets { diff --git a/compiler/fir/raw-fir/light-tree2fir/build.gradle.kts b/compiler/fir/raw-fir/light-tree2fir/build.gradle.kts index 1a437821064..15b5d4f7591 100644 --- a/compiler/fir/raw-fir/light-tree2fir/build.gradle.kts +++ b/compiler/fir/raw-fir/light-tree2fir/build.gradle.kts @@ -21,7 +21,8 @@ dependencies { implementation(project(":compiler:psi")) implementation(kotlinxCollectionsImmutable()) - compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("com.google.guava:guava")) testImplementation(commonDependency("junit:junit")) testImplementation(projectTests(":compiler:tests-common")) @@ -38,8 +39,8 @@ dependencies { implementation("org.openjdk.jmh", "jmh-generator-bytecode", jmhVersion) implementation("org.openjdk.jmh", "jmh-generator-annprocess", jmhVersion) - testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } - testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") } + testCompileOnly(intellijCore()) + testRuntimeOnly(intellijCore()) } val generationRoot = projectDir.resolve("tests-gen") diff --git a/compiler/fir/raw-fir/psi2fir/build.gradle.kts b/compiler/fir/raw-fir/psi2fir/build.gradle.kts index 7be791606d6..c428235a24e 100644 --- a/compiler/fir/raw-fir/psi2fir/build.gradle.kts +++ b/compiler/fir/raw-fir/psi2fir/build.gradle.kts @@ -15,9 +15,8 @@ dependencies { implementation(project(":compiler:psi")) implementation(kotlinxCollectionsImmutable()) - compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } - - testImplementation(intellijDep()) { includeJars("platform-api", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("com.google.guava:guava")) testImplementation(commonDependency("junit:junit")) testImplementation(projectTests(":compiler:tests-common")) @@ -29,8 +28,8 @@ dependencies { testRuntimeOnly(project(":kotlin-reflect")) testRuntimeOnly(project(":core:descriptors.runtime")) - testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } - testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") } + testCompileOnly(intellijCore()) + testRuntimeOnly(intellijCore()) } val generationRoot = projectDir.resolve("tests-gen") diff --git a/compiler/fir/raw-fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/AbstractRawFirBuilderTestCase.kt b/compiler/fir/raw-fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/AbstractRawFirBuilderTestCase.kt index 520b49a8426..e45a47b7453 100644 --- a/compiler/fir/raw-fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/AbstractRawFirBuilderTestCase.kt +++ b/compiler/fir/raw-fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/AbstractRawFirBuilderTestCase.kt @@ -5,9 +5,6 @@ package org.jetbrains.kotlin.fir.builder -import com.intellij.openapi.fileTypes.FileTypeManager -import com.intellij.openapi.fileTypes.FileTypeRegistry -import com.intellij.openapi.util.Getter import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.util.io.FileUtilRt import com.intellij.psi.PsiFile @@ -177,12 +174,6 @@ abstract class AbstractRawFirBuilderTestCase : KtParsingTestCase( return element } } - - override fun tearDown() { - super.tearDown() - FileTypeRegistry.ourInstanceGetter = Getter { FileTypeManager.getInstance() } - } - } private fun throwTwiceVisitingError(element: FirElement) { diff --git a/compiler/fir/raw-fir/raw-fir.common/build.gradle.kts b/compiler/fir/raw-fir/raw-fir.common/build.gradle.kts index d06dd37610a..03583a5ecaf 100644 --- a/compiler/fir/raw-fir/raw-fir.common/build.gradle.kts +++ b/compiler/fir/raw-fir/raw-fir.common/build.gradle.kts @@ -14,10 +14,11 @@ dependencies { implementation(kotlinxCollectionsImmutable()) implementation(project(":compiler:psi")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("com.google.guava:guava")) - testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } - testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") } + testCompileOnly(intellijCore()) + testRuntimeOnly(intellijCore()) } sourceSets { diff --git a/compiler/fir/resolve/build.gradle.kts b/compiler/fir/resolve/build.gradle.kts index 7ec8b7922e2..2deaff83a50 100644 --- a/compiler/fir/resolve/build.gradle.kts +++ b/compiler/fir/resolve/build.gradle.kts @@ -9,7 +9,7 @@ dependencies { implementation(project(":core:util.runtime")) compileOnly(project(":kotlin-reflect-api")) - compileOnly(intellijCoreDep()) { includeJars("guava", rootProject = rootProject) } + compileOnly(commonDependency("com.google.guava:guava")) } sourceSets { diff --git a/compiler/fir/semantics/build.gradle.kts b/compiler/fir/semantics/build.gradle.kts index 210a7e1b64f..a58ef43ab69 100644 --- a/compiler/fir/semantics/build.gradle.kts +++ b/compiler/fir/semantics/build.gradle.kts @@ -8,7 +8,7 @@ dependencies { implementation(project(":core:util.runtime")) compileOnly(project(":kotlin-reflect-api")) - compileOnly(intellijCoreDep()) { includeJars("guava", rootProject = rootProject) } + compileOnly(commonDependency("com.google.guava:guava")) } sourceSets { diff --git a/compiler/fir/tree/build.gradle.kts b/compiler/fir/tree/build.gradle.kts index 8a6b4d3d1e1..b8a5428e37d 100644 --- a/compiler/fir/tree/build.gradle.kts +++ b/compiler/fir/tree/build.gradle.kts @@ -10,7 +10,7 @@ dependencies { api(project(":compiler:fir:cones")) // Necessary only to store bound PsiElement inside FirElement - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/fir/tree/tree-generator/build.gradle.kts b/compiler/fir/tree/tree-generator/build.gradle.kts index 6347d26edd2..178e7568749 100644 --- a/compiler/fir/tree/tree-generator/build.gradle.kts +++ b/compiler/fir/tree/tree-generator/build.gradle.kts @@ -16,12 +16,10 @@ dependencies { implementation(project(":compiler:frontend.common")) implementation(project(":compiler:fir:cones")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } - compileOnly(intellijDep()) { - includeJars("trove4j", rootProject = rootProject) - } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) - runtimeOnly(intellijCoreDep()) { includeJars("jdom") } + runtimeOnly(commonDependency("org.jetbrains.intellij.deps:jdom")) } val writeCopyright by task { diff --git a/compiler/frontend.common-psi/build.gradle.kts b/compiler/frontend.common-psi/build.gradle.kts index 9f36da5d22a..7a137fffccf 100644 --- a/compiler/frontend.common-psi/build.gradle.kts +++ b/compiler/frontend.common-psi/build.gradle.kts @@ -6,7 +6,7 @@ plugins { dependencies { api(project(":compiler:frontend.common")) api(project(":compiler:psi")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/frontend.common/build.gradle.kts b/compiler/frontend.common/build.gradle.kts index 9c98340769e..179df840a88 100644 --- a/compiler/frontend.common/build.gradle.kts +++ b/compiler/frontend.common/build.gradle.kts @@ -6,8 +6,8 @@ plugins { dependencies { api(project(":compiler:config")) api(project(":compiler:container")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("guava", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("com.google.guava:guava")) } sourceSets { diff --git a/compiler/frontend.java/build.gradle.kts b/compiler/frontend.java/build.gradle.kts index 128a0939a08..2580b9efa8f 100644 --- a/compiler/frontend.java/build.gradle.kts +++ b/compiler/frontend.java/build.gradle.kts @@ -11,8 +11,10 @@ dependencies { api("javax.annotation:jsr250-api:1.0") api(project(":compiler:frontend")) api(project(":compiler:resolution.common.jvm")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("asm-all", "trove4j", "guava", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) + compileOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) + compileOnly(commonDependency("com.google.guava:guava")) } sourceSets { diff --git a/compiler/frontend/build.gradle.kts b/compiler/frontend/build.gradle.kts index c479c4b241c..8af03b4438c 100644 --- a/compiler/frontend/build.gradle.kts +++ b/compiler/frontend/build.gradle.kts @@ -16,8 +16,9 @@ dependencies { api(project(":compiler:frontend.common-psi")) api(project(":kotlin-script-runtime")) api(commonDependency("io.javaslang","javaslang")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("trove4j", "guava", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) + compileOnly(commonDependency("com.google.guava:guava")) } sourceSets { diff --git a/compiler/frontend/cfg/build.gradle.kts b/compiler/frontend/cfg/build.gradle.kts index 057948d1db8..da7d0d28730 100644 --- a/compiler/frontend/cfg/build.gradle.kts +++ b/compiler/frontend/cfg/build.gradle.kts @@ -5,8 +5,8 @@ plugins { dependencies { api(project(":compiler:frontend")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("guava", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("com.google.guava:guava")) } sourceSets { diff --git a/compiler/incremental-compilation-impl/build.gradle.kts b/compiler/incremental-compilation-impl/build.gradle.kts index b157ceb7ca3..e82c47cc155 100644 --- a/compiler/incremental-compilation-impl/build.gradle.kts +++ b/compiler/incremental-compilation-impl/build.gradle.kts @@ -15,19 +15,20 @@ dependencies { api(project(":compiler:cli-js")) api(project(":kotlin-build-common")) api(project(":daemon-common")) - implementation("com.google.code.gson:gson:${rootProject.extra["versions.jar.gson"]}") - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + implementation(commonDependency("com.google.code.gson:gson")) + compileOnly(intellijCore()) testApi(commonDependency("junit:junit")) testApi(project(":kotlin-test:kotlin-test-junit")) testApi(kotlinStdlib()) testApi(projectTests(":kotlin-build-common")) testApi(projectTests(":compiler:tests-common")) - testApi(intellijCoreDep()) { includeJars("intellij-core") } - testApi(intellijDep()) { includeJars("log4j", "jdom") } + testApi(intellijCore()) + testApi(commonDependency("org.jetbrains.intellij.deps:log4j")) + testApi(commonDependency("org.jetbrains.intellij.deps:jdom")) + testRuntimeOnly(project(":kotlin-reflect")) testRuntimeOnly(project(":core:descriptors.runtime")) - testRuntimeOnly(intellijDep()) { includeJars("lz4-java", "jna", "idea_rt", rootProject = rootProject) } } sourceSets { diff --git a/compiler/ir/backend.common/build.gradle.kts b/compiler/ir/backend.common/build.gradle.kts index 75193ae6106..64b0a3f01d8 100644 --- a/compiler/ir/backend.common/build.gradle.kts +++ b/compiler/ir/backend.common/build.gradle.kts @@ -9,7 +9,7 @@ dependencies { api(project(":compiler:backend-common")) api(project(":compiler:ir.tree")) api(project(":compiler:ir.interpreter")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/ir/backend.js/build.gradle.kts b/compiler/ir/backend.js/build.gradle.kts index 8c3dc57144c..ff1bb410713 100644 --- a/compiler/ir/backend.js/build.gradle.kts +++ b/compiler/ir/backend.js/build.gradle.kts @@ -16,7 +16,7 @@ dependencies { api(project(":js:js.frontend")) api(project(":js:js.sourcemap")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/ir/backend.jvm/build.gradle.kts b/compiler/ir/backend.jvm/build.gradle.kts index 402ea28bae6..1e25b6da3d8 100644 --- a/compiler/ir/backend.jvm/build.gradle.kts +++ b/compiler/ir/backend.jvm/build.gradle.kts @@ -9,7 +9,8 @@ dependencies { api(project(":compiler:ir.backend.common")) api(project(":compiler:backend.common.jvm")) compileOnly(project(":compiler:ir.tree.impl")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core", "asm-all", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) } sourceSets { diff --git a/compiler/ir/backend.jvm/codegen/build.gradle.kts b/compiler/ir/backend.jvm/codegen/build.gradle.kts index e352f1f7e84..e2b7fb4aa50 100644 --- a/compiler/ir/backend.jvm/codegen/build.gradle.kts +++ b/compiler/ir/backend.jvm/codegen/build.gradle.kts @@ -8,7 +8,7 @@ dependencies { api(project(":compiler:ir.backend.common")) api(project(":compiler:backend.jvm")) implementation(project(":compiler:ir.tree.impl")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/ir/backend.jvm/entrypoint/build.gradle.kts b/compiler/ir/backend.jvm/entrypoint/build.gradle.kts index b86bc7d51f3..12ee9cf535e 100644 --- a/compiler/ir/backend.jvm/entrypoint/build.gradle.kts +++ b/compiler/ir/backend.jvm/entrypoint/build.gradle.kts @@ -10,7 +10,7 @@ dependencies { api(project(":compiler:ir.serialization.jvm")) implementation(project(":compiler:backend.jvm.lower")) implementation(project(":compiler:backend.jvm.codegen")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/ir/backend.jvm/lower/build.gradle.kts b/compiler/ir/backend.jvm/lower/build.gradle.kts index 157456841d7..59330b7bd38 100644 --- a/compiler/ir/backend.jvm/lower/build.gradle.kts +++ b/compiler/ir/backend.jvm/lower/build.gradle.kts @@ -8,8 +8,8 @@ dependencies { api(project(":compiler:ir.backend.common")) api(project(":compiler:backend.jvm")) implementation(project(":compiler:ir.tree.impl")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) } - compileOnly(intellijDep()) { includeJars("trove4j", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) } sourceSets { diff --git a/compiler/ir/backend.wasm/build.gradle.kts b/compiler/ir/backend.wasm/build.gradle.kts index e4ad446c6ca..99d2c0940c4 100644 --- a/compiler/ir/backend.wasm/build.gradle.kts +++ b/compiler/ir/backend.wasm/build.gradle.kts @@ -16,7 +16,7 @@ dependencies { api(project(":compiler:backend.js")) api(project(":wasm:wasm.ir")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/ir/ir.psi2ir/build.gradle.kts b/compiler/ir/ir.psi2ir/build.gradle.kts index 7dbbd4b4616..36e9ee88a3a 100644 --- a/compiler/ir/ir.psi2ir/build.gradle.kts +++ b/compiler/ir/ir.psi2ir/build.gradle.kts @@ -8,7 +8,7 @@ dependencies { api(project(":compiler:frontend")) api(project(":compiler:backend-common")) api(project(":compiler:ir.tree")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/ir/ir.tree.impl/build.gradle.kts b/compiler/ir/ir.tree.impl/build.gradle.kts index eca4a19103d..aa5c9878e3a 100644 --- a/compiler/ir/ir.tree.impl/build.gradle.kts +++ b/compiler/ir/ir.tree.impl/build.gradle.kts @@ -5,7 +5,7 @@ plugins { dependencies { api(project(":compiler:ir.tree")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/ir/ir.tree/build.gradle.kts b/compiler/ir/ir.tree/build.gradle.kts index d4dc177dc4c..92652a4dbd8 100644 --- a/compiler/ir/ir.tree/build.gradle.kts +++ b/compiler/ir/ir.tree/build.gradle.kts @@ -10,7 +10,7 @@ dependencies { implementation(project(":compiler:util")) implementation(project(":compiler:config")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/ir/serialization.common/build.gradle.kts b/compiler/ir/serialization.common/build.gradle.kts index 1ff32ccad90..0fb9942293b 100644 --- a/compiler/ir/serialization.common/build.gradle.kts +++ b/compiler/ir/serialization.common/build.gradle.kts @@ -12,7 +12,7 @@ dependencies { implementation(project(":compiler:psi")) compileOnly(project(":kotlin-reflect-api")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/ir/serialization.js/build.gradle.kts b/compiler/ir/serialization.js/build.gradle.kts index 547ea13e0a8..2bd83759fee 100644 --- a/compiler/ir/serialization.js/build.gradle.kts +++ b/compiler/ir/serialization.js/build.gradle.kts @@ -12,7 +12,7 @@ dependencies { implementation(project(":compiler:ir.backend.common")) compileOnly(project(":kotlin-reflect-api")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/javac-wrapper/build.gradle.kts b/compiler/javac-wrapper/build.gradle.kts index b65734d50bf..ecd8032b734 100644 --- a/compiler/javac-wrapper/build.gradle.kts +++ b/compiler/javac-wrapper/build.gradle.kts @@ -8,8 +8,7 @@ dependencies { api(project(":compiler:frontend.java")) compileOnly(toolsJarApi()) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeIntellijCoreJarDependencies(project) } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/light-classes/build.gradle.kts b/compiler/light-classes/build.gradle.kts index 43c58289967..d3237d61387 100644 --- a/compiler/light-classes/build.gradle.kts +++ b/compiler/light-classes/build.gradle.kts @@ -9,11 +9,10 @@ dependencies { api(project(":compiler:backend")) api(project(":compiler:frontend")) api(project(":compiler:frontend.java")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - - compileOnly(intellijDep()) { includeJars("platform-core-ui", "platform-util-ui") } - - compileOnly(intellijDep()) { includeJars("asm-all", "trove4j", "guava", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) + compileOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) + compileOnly(commonDependency("com.google.guava:guava")) } sourceSets { diff --git a/compiler/plugin-api/build.gradle.kts b/compiler/plugin-api/build.gradle.kts index b9f2a6b273b..3a67dada7e5 100644 --- a/compiler/plugin-api/build.gradle.kts +++ b/compiler/plugin-api/build.gradle.kts @@ -7,7 +7,7 @@ plugins { dependencies { api(project(":compiler:util")) api(project(":compiler:frontend")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/preloader/build.gradle.kts b/compiler/preloader/build.gradle.kts index a4c0c9804b7..e38eb908fc5 100644 --- a/compiler/preloader/build.gradle.kts +++ b/compiler/preloader/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } dependencies { - compileOnly(intellijDep()) { includeJars("asm-all", rootProject = rootProject) } + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) } sourceSets { diff --git a/compiler/psi/build.gradle.kts b/compiler/psi/build.gradle.kts index 10c7f110a7b..6cf865be0f9 100644 --- a/compiler/psi/build.gradle.kts +++ b/compiler/psi/build.gradle.kts @@ -15,8 +15,9 @@ dependencies { api(project(":compiler:frontend.common")) api(project(":kotlin-script-runtime")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("guava", "trove4j", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("com.google.guava:guava")) + compileOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) jflexPath(commonDependency("org.jetbrains.intellij.deps.jflex", "jflex")) } diff --git a/compiler/resolution.common.jvm/build.gradle.kts b/compiler/resolution.common.jvm/build.gradle.kts index 5dd1efaf169..3e6a12897f4 100644 --- a/compiler/resolution.common.jvm/build.gradle.kts +++ b/compiler/resolution.common.jvm/build.gradle.kts @@ -9,8 +9,10 @@ dependencies { api(project(":compiler:psi")) implementation(project(":compiler:util")) implementation(commonDependency("io.javaslang","javaslang")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("asm-all", "trove4j", "guava", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) + compileOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) + compileOnly(commonDependency("com.google.guava:guava")) } sourceSets { diff --git a/compiler/resolution/build.gradle.kts b/compiler/resolution/build.gradle.kts index df184256657..6b4a495d863 100644 --- a/compiler/resolution/build.gradle.kts +++ b/compiler/resolution/build.gradle.kts @@ -7,7 +7,7 @@ dependencies { api(project(":compiler:util")) api(project(":core:descriptors")) api(project(":compiler:resolution.common")) - compileOnly(intellijDep()) { includeJars("trove4j") } + compileOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) } sourceSets { diff --git a/compiler/serialization/build.gradle.kts b/compiler/serialization/build.gradle.kts index 8430a971cd9..5e3ba614293 100644 --- a/compiler/serialization/build.gradle.kts +++ b/compiler/serialization/build.gradle.kts @@ -8,7 +8,7 @@ dependencies { api(project(":core:deserialization")) api(project(":compiler:util")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/test-infrastructure-utils/build.gradle.kts b/compiler/test-infrastructure-utils/build.gradle.kts index f1de835837d..9753671a297 100644 --- a/compiler/test-infrastructure-utils/build.gradle.kts +++ b/compiler/test-infrastructure-utils/build.gradle.kts @@ -6,17 +6,14 @@ plugins { dependencies { testImplementation(project(":compiler:fir:entrypoint")) testImplementation(project(":compiler:cli")) - testImplementation(intellijCoreDep()) { includeJars("intellij-core") } + testImplementation(intellijCore()) testCompileOnly(project(":kotlin-reflect-api")) testRuntimeOnly(project(":kotlin-reflect")) testRuntimeOnly(project(":core:descriptors.runtime")) - testImplementation(intellijDep()) { - // This dependency is needed only for FileComparisonFailure - includeJars("idea_rt", rootProject = rootProject) - isTransitive = false - } + // This dependency is needed only for FileComparisonFailure + testImplementation(intellijJavaRt()) } sourceSets { diff --git a/compiler/test-infrastructure/build.gradle.kts b/compiler/test-infrastructure/build.gradle.kts index 1c4450700da..6160d1cc46e 100644 --- a/compiler/test-infrastructure/build.gradle.kts +++ b/compiler/test-infrastructure/build.gradle.kts @@ -6,7 +6,7 @@ plugins { dependencies { testApi(project(":compiler:fir:entrypoint")) testApi(project(":compiler:cli")) - testApi(intellijCoreDep()) { includeJars("intellij-core") } + testApi(intellijCore()) testCompileOnly(project(":kotlin-reflect-api")) testRuntimeOnly(project(":kotlin-reflect")) @@ -14,9 +14,7 @@ dependencies { testImplementation(projectTests(":compiler:test-infrastructure-utils")) - testRuntimeOnly(intellijDep()) { - includeJars("jna", rootProject = rootProject) - } + testRuntimeOnly(commonDependency("net.java.dev.jna:jna")) } sourceSets { diff --git a/compiler/tests-against-klib/build.gradle.kts b/compiler/tests-against-klib/build.gradle.kts index 2f92bf27781..53653cd42ce 100644 --- a/compiler/tests-against-klib/build.gradle.kts +++ b/compiler/tests-against-klib/build.gradle.kts @@ -11,8 +11,8 @@ dependencies { testApi(projectTests(":generators:test-generator")) testApi(projectTests(":compiler:tests-common")) - testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } - testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") } + testCompileOnly(intellijCore()) + testRuntimeOnly(intellijCore()) } sourceSets { diff --git a/compiler/tests-common-new/build.gradle.kts b/compiler/tests-common-new/build.gradle.kts index 8d182f923c7..5a724dc138b 100644 --- a/compiler/tests-common-new/build.gradle.kts +++ b/compiler/tests-common-new/build.gradle.kts @@ -10,7 +10,7 @@ dependencies { testApi(project(":compiler:cli")) testImplementation(project(":compiler:ir.tree.impl")) testImplementation(project(":compiler:backend.jvm.entrypoint")) - testImplementation(intellijCoreDep()) { includeJars("intellij-core") } + testImplementation(intellijCore()) testCompileOnly(project(":kotlin-reflect-api")) testRuntimeOnly(project(":kotlin-reflect")) @@ -29,17 +29,12 @@ dependencies { * declared as Api dependencies to propagate them to all modules * which depend on current one */ - testApi(intellijDep()) { - includeJars( - "intellij-deps-fastutil-8.4.1-4", - "idea_rt", - "jps-model", - "platform-impl", - "streamex", - "jna", - rootProject = rootProject - ) - } + testApi(commonDependency("org.jetbrains.intellij.deps.fastutil:intellij-deps-fastutil")) + testApi(commonDependency("one.util:streamex")) + testApi(commonDependency("net.java.dev.jna:jna")) + testApi(jpsModel()) { isTransitive = false } + testApi(jpsModelImpl()) { isTransitive = false } + testApi(intellijJavaRt()) testApi(toolsJar()) } diff --git a/compiler/tests-common/build.gradle.kts b/compiler/tests-common/build.gradle.kts index 543c335efac..e44cdc65a91 100644 --- a/compiler/tests-common/build.gradle.kts +++ b/compiler/tests-common/build.gradle.kts @@ -57,34 +57,26 @@ dependencies { testApi(commonDependency("com.android.tools:r8")) testCompileOnly(project(":kotlin-reflect-api")) testCompileOnly(toolsJar()) - testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } + testCompileOnly(intellijCore()) /* * Actually those dependencies are needed only at runtime, but they * declared as Api dependencies to propagate them to all modules * which depend on current one */ - testApi(intellijDep()) { - includeJars( - "intellij-deps-fastutil-8.4.1-4", - "idea_rt", - "jps-model", - "platform-impl", - "streamex", - "jna", - rootProject = rootProject - ) - } - testImplementation(intellijDep()) { - includeJars( - "guava", - "trove4j", - "asm-all", - "log4j", - "jdom", - rootProject = rootProject - ) - } + testApi(commonDependency("org.jetbrains.intellij.deps.fastutil:intellij-deps-fastutil")) + testApi(commonDependency("one.util:streamex")) + testApi(commonDependency("net.java.dev.jna:jna")) + testApi(jpsModel()) { isTransitive = false } + testApi(jpsModelImpl()) { isTransitive = false } + testApi(intellijJavaRt()) + + testImplementation(commonDependency("com.google.guava:guava")) + testImplementation(commonDependency("org.jetbrains.intellij.deps:trove4j")) + testImplementation(commonDependency("org.jetbrains.intellij.deps:asm-all")) + testImplementation(commonDependency("org.jetbrains.intellij.deps:log4j")) + testImplementation(commonDependency("org.jetbrains.intellij.deps:jdom")) + testApiJUnit5() } diff --git a/compiler/tests-compiler-utils/build.gradle.kts b/compiler/tests-compiler-utils/build.gradle.kts index 5ea3a4062cf..ebb4c4ae93c 100644 --- a/compiler/tests-compiler-utils/build.gradle.kts +++ b/compiler/tests-compiler-utils/build.gradle.kts @@ -27,19 +27,13 @@ dependencies { testApi(projectTests(":compiler:test-infrastructure-utils")) testApi(project(":kotlin-preloader")) testApi(commonDependency("com.android.tools:r8")) - testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } + testCompileOnly(intellijCore()) - testApi(intellijDep()) { - includeJars( - "guava", - "trove4j", - "asm-all", - "log4j", - "jdom", - rootProject = rootProject - ) - isTransitive = false - } + testApi(commonDependency("com.google.guava:guava")) + testApi(commonDependency("org.jetbrains.intellij.deps:trove4j")) + testApi(commonDependency("org.jetbrains.intellij.deps:asm-all")) + testApi(commonDependency("org.jetbrains.intellij.deps:log4j")) + testApi(commonDependency("org.jetbrains.intellij.deps:jdom")) } sourceSets { diff --git a/compiler/tests-different-jdk/build.gradle.kts b/compiler/tests-different-jdk/build.gradle.kts index b663ff7a0e8..5008bc475e7 100644 --- a/compiler/tests-different-jdk/build.gradle.kts +++ b/compiler/tests-different-jdk/build.gradle.kts @@ -14,9 +14,8 @@ dependencies { testApiJUnit5(vintageEngine = true, runner = true, suiteApi = true) - testImplementation(intellijCoreDep()) { includeJars("intellij-core") } + testImplementation(intellijCore()) testRuntimeOnly(project(":kotlin-reflect")) - testRuntimeOnly(intellijDep()) testJvm6ServerRuntime(projectTests(":compiler:tests-common-jvm6")) } diff --git a/compiler/tests-java8/build.gradle.kts b/compiler/tests-java8/build.gradle.kts index ed671288e33..7bda00d914c 100644 --- a/compiler/tests-java8/build.gradle.kts +++ b/compiler/tests-java8/build.gradle.kts @@ -1,5 +1,3 @@ -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile - plugins { kotlin("jvm") id("jps-compatible") @@ -8,15 +6,14 @@ plugins { dependencies { testApi(project(":kotlin-scripting-compiler")) testApi(projectTests(":compiler:tests-common")) - testImplementation(intellijCoreDep()) { includeJars("intellij-core") } + testImplementation(intellijCore()) testApi(projectTests(":generators:test-generator")) testRuntimeOnly(project(":kotlin-reflect")) testRuntimeOnly(toolsJar()) - testRuntimeOnly(intellijPluginDep("java")) - - if (kotlinBuildProperties.isInJpsBuildIdeaSync) + if (kotlinBuildProperties.isInJpsBuildIdeaSync) { testRuntimeOnly(files("${rootProject.projectDir}/dist/kotlinc/lib/kotlin-reflect.jar")) + } } sourceSets { diff --git a/compiler/tests-spec/build.gradle.kts b/compiler/tests-spec/build.gradle.kts index 1a56bda8f11..e19e6ba881c 100644 --- a/compiler/tests-spec/build.gradle.kts +++ b/compiler/tests-spec/build.gradle.kts @@ -5,18 +5,14 @@ plugins { dependencies { testApi(projectTests(":compiler")) + testImplementation(projectTests(":compiler:test-infrastructure")) testImplementation(projectTests(":compiler:tests-common-new")) - testApi(intellijDep()) { - includeJars("gson", "groovy", "groovy-xml", rootProject = rootProject) - } - testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } - testRuntimeOnly(intellijDep()) { - includeJars("streamex", rootProject = rootProject) - } + testApi(commonDependency("com.google.code.gson:gson")) + testApi(commonDependency("org.codehaus.groovy:groovy")) + testApi(commonDependency("org.codehaus.groovy:groovy-xml")) - testRuntimeOnly(intellijPluginDep("java")) api("org.jsoup:jsoup:1.14.2") if (kotlinBuildProperties.isInJpsBuildIdeaSync) { diff --git a/compiler/util/build.gradle.kts b/compiler/util/build.gradle.kts index 0795c093dd8..bfe49e70214 100644 --- a/compiler/util/build.gradle.kts +++ b/compiler/util/build.gradle.kts @@ -7,9 +7,11 @@ dependencies { api(kotlinStdlib()) api(project(":compiler:compiler.version")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeIntellijCoreJarDependencies(project) } - compileOnly(jpsStandalone()) { includeJars("jps-model") } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:log4j")) + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) + compileOnly(jpsModel()) { isTransitive = false } + compileOnly(jpsModelImpl()) { isTransitive = false } } sourceSets { diff --git a/compiler/visualizer/build.gradle.kts b/compiler/visualizer/build.gradle.kts index 096677bd80a..20c9e83491a 100644 --- a/compiler/visualizer/build.gradle.kts +++ b/compiler/visualizer/build.gradle.kts @@ -19,8 +19,8 @@ dependencies { testApi(projectTests(":compiler:fir:analysis-tests:legacy-fir-tests")) testImplementation(projectTests(":generators:test-generator")) - testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") } - testRuntimeOnly(intellijDep()) { includeJars("jna", rootProject = rootProject) } + testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps.fastutil:intellij-deps-fastutil")) + testRuntimeOnly(commonDependency("net.java.dev.jna:jna")) } val generationRoot = projectDir.resolve("tests-gen") diff --git a/compiler/visualizer/common/build.gradle.kts b/compiler/visualizer/common/build.gradle.kts index 8109176ddf7..62157d89d32 100644 --- a/compiler/visualizer/common/build.gradle.kts +++ b/compiler/visualizer/common/build.gradle.kts @@ -5,7 +5,7 @@ plugins { dependencies { api(project(":compiler:frontend")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/visualizer/render-fir/build.gradle.kts b/compiler/visualizer/render-fir/build.gradle.kts index 356176c53b1..91dfb11e2da 100644 --- a/compiler/visualizer/render-fir/build.gradle.kts +++ b/compiler/visualizer/render-fir/build.gradle.kts @@ -7,7 +7,7 @@ dependencies { api(project(":compiler:fir:raw-fir:psi2fir")) api(project(":compiler:fir:resolve")) api(project(":compiler:visualizer:common")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/compiler/visualizer/render-psi/build.gradle.kts b/compiler/visualizer/render-psi/build.gradle.kts index 300f9a39b22..0ffe9e91cfd 100644 --- a/compiler/visualizer/render-psi/build.gradle.kts +++ b/compiler/visualizer/render-psi/build.gradle.kts @@ -5,7 +5,7 @@ plugins { dependencies { api(project(":compiler:visualizer:common")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/core/descriptors.runtime/build.gradle.kts b/core/descriptors.runtime/build.gradle.kts index 4177413dad8..dd2989128c1 100644 --- a/core/descriptors.runtime/build.gradle.kts +++ b/core/descriptors.runtime/build.gradle.kts @@ -25,9 +25,7 @@ dependencies { testApi(projectTests(":compiler:tests-common")) testApi(projectTests(":generators:test-generator")) - testApi(intellijCoreDep()) { includeJars("intellij-core") } - testRuntimeOnly(intellijDep()) { includeJars("platform-concurrency", "idea_rt", rootProject = rootProject) } - testRuntimeOnly(jpsStandalone()) { includeJars("jps-model") } + testApi(intellijCore()) } sourceSets { diff --git a/dependencies/intellij-core/build.gradle.kts b/dependencies/intellij-core/build.gradle.kts new file mode 100644 index 00000000000..b04449088c5 --- /dev/null +++ b/dependencies/intellij-core/build.gradle.kts @@ -0,0 +1,35 @@ +plugins { + `java-library` +} + +val intellijVersion = rootProject.extra["versions.intellijSdk"] + +//https://jetbrains.team/p/ij/repositories/intellij/files/aea53cfc5d27b15246ab7b7a0b5679d0d8cf1875/community/build/groovy/org/jetbrains/intellij/build/IntelliJCoreArtifactsBuilder.groovy?tab=source&line=18 +//CORE_MODULES = [ +// "intellij.platform.util.rt", +// "intellij.platform.util.classLoader", +// "intellij.platform.util.text.matching", +// "intellij.platform.util.base", +// "intellij.platform.util.xmlDom", +// "intellij.platform.util", +// "intellij.platform.core", +// "intellij.platform.core.impl", +// "intellij.platform.extensions", +// "intellij.java.psi", +// "intellij.java.psi.impl", +//] + +dependencies { + api("com.jetbrains.intellij.platform:util-rt:$intellijVersion") { isTransitive = false } + api("com.jetbrains.intellij.platform:util-class-loader:$intellijVersion") { isTransitive = false } + api("com.jetbrains.intellij.platform:util-text-matching:$intellijVersion") { isTransitive = false } + api("com.jetbrains.intellij.platform:util-diagnostic:$intellijVersion") { isTransitive = false } + api("com.jetbrains.intellij.platform:util:$intellijVersion") { isTransitive = false } + api("com.jetbrains.intellij.platform:core:$intellijVersion") { isTransitive = false } + api("com.jetbrains.intellij.platform:core-impl:$intellijVersion") { isTransitive = false } + api("com.jetbrains.intellij.platform:extensions:$intellijVersion") { isTransitive = false } + api("com.jetbrains.intellij.platform:util-strings:$intellijVersion") { isTransitive = false } + api("com.jetbrains.intellij.platform:util-collections:$intellijVersion") { isTransitive = false } + api("com.jetbrains.intellij.java:java-psi:$intellijVersion") { isTransitive = false } + api("com.jetbrains.intellij.java:java-psi-impl:$intellijVersion") { isTransitive = false } +} \ No newline at end of file diff --git a/generators/analysis-api-generator/build.gradle.kts b/generators/analysis-api-generator/build.gradle.kts index 56dea7f6716..c9d2cf68f2a 100644 --- a/generators/analysis-api-generator/build.gradle.kts +++ b/generators/analysis-api-generator/build.gradle.kts @@ -17,7 +17,7 @@ dependencies { testApi(projectTests("::analysis:low-level-api-fir")) testApi(projectTests(":analysis:analysis-api-fir")) testApi(projectTests(":analysis:analysis-api-fe10")) - testApi(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } + testApi(intellijCore()) testApiJUnit5() } diff --git a/generators/build.gradle.kts b/generators/build.gradle.kts index dad38d40fcd..26f2bb8b4b3 100644 --- a/generators/build.gradle.kts +++ b/generators/build.gradle.kts @@ -33,9 +33,10 @@ val (protobufCompareSourceSet, protobufCompareApi) = extraSourceSet("protobufCom val (wasmSourceSet, wasmApi) = extraSourceSet("wasm") dependencies { - // for GeneratorsFileUtil api(kotlinStdlib("jdk8")) - api(intellijDep()) { includeJars("util") } + api(intellijPlatformUtil()) { + exclude(module = "annotations") + } builtinsApi("org.jetbrains.kotlin:kotlin-stdlib:$bootstrapKotlinVersion") { isTransitive = false } evaluateApi(project(":core:deserialization")) @@ -70,7 +71,6 @@ dependencies { testApi(projectTests(":plugins:fir-plugin-prototype:fir-plugin-ic-test")) testApi(projectTests(":generators:test-generator")) testCompileOnly(project(":kotlin-reflect-api")) - testImplementation(intellijDep()) { includeJars("idea_rt") } testImplementation(project(":kotlin-reflect")) testImplementation(projectTests(":compiler:test-infrastructure-utils")) testImplementation(projectTests(":compiler:test-infrastructure")) diff --git a/generators/ide-iml-to-gradle-generator/build.gradle.kts b/generators/ide-iml-to-gradle-generator/build.gradle.kts index 801561f153e..7efd8b8da30 100644 --- a/generators/ide-iml-to-gradle-generator/build.gradle.kts +++ b/generators/ide-iml-to-gradle-generator/build.gradle.kts @@ -5,7 +5,10 @@ plugins { dependencies { implementation(kotlinStdlib("jdk8")) - implementation(intellijDep()) + implementation(jpsModel()) + implementation(jpsModelImpl()) + implementation(jpsModelSerialization()) + implementation(commonDependency("com.google.code.gson:gson")) } sourceSets { diff --git a/generators/test-generator/build.gradle.kts b/generators/test-generator/build.gradle.kts index bf400d09306..b35677d937a 100644 --- a/generators/test-generator/build.gradle.kts +++ b/generators/test-generator/build.gradle.kts @@ -5,7 +5,6 @@ plugins { } dependencies { - testApi(intellijDep()) { includeJars("util") } testApi(project(":core:util.runtime")) testApi(projectTests(":compiler:test-infrastructure-utils")) testApi(kotlinStdlib()) diff --git a/gradle/javaInstrumentation.gradle.kts b/gradle/javaInstrumentation.gradle.kts index a651dcba389..a3e872d964c 100644 --- a/gradle/javaInstrumentation.gradle.kts +++ b/gradle/javaInstrumentation.gradle.kts @@ -20,12 +20,7 @@ fun Project.configureJavaInstrumentation() { if (plugins.hasPlugin("org.gradle.java")) { val javaInstrumentator by configurations.creating dependencies { - javaInstrumentator(intellijDep()) { - includeJars("jdom", "asm-all", rootProject = rootProject) - } - javaInstrumentator(intellijPluginDep("java")) { - includeJars("javac2", rootProject = rootProject) - } + javaInstrumentator("com.jetbrains.intellij.java:java-compiler-ant-tasks:${rootProject.extra["versions.intellijSdk"]}") } for (sourceSet in listOf(mainSourceSet, testSourceSet)) { tasks.named(sourceSet.compileJavaTaskName, InstrumentJava(javaInstrumentator, sourceSet)) diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 947eb6804df..31b32a7fea1 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -987,6 +987,12 @@ + + + + + + @@ -2087,6 +2093,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2267,6 +2417,7 @@ + @@ -2639,6 +2790,10 @@ + + + + @@ -2685,6 +2840,10 @@ + + + + @@ -2747,6 +2906,10 @@ + + + + @@ -2777,6 +2940,10 @@ + + + + @@ -2803,6 +2970,10 @@ + + + + @@ -2849,6 +3020,10 @@ + + + + @@ -2885,6 +3060,10 @@ + + + + @@ -2951,6 +3130,10 @@ + + + + @@ -2970,6 +3153,12 @@ + + + + + + @@ -3094,6 +3283,12 @@ + + + + + + @@ -4357,6 +4552,12 @@ + + + + + + @@ -4633,6 +4834,12 @@ + + + + + + @@ -4897,6 +5104,12 @@ + + + + + + @@ -6037,6 +6250,12 @@ + + + + + + @@ -6057,6 +6276,12 @@ + + + + + + @@ -6829,6 +7054,18 @@ + + + + + + + + + + + + @@ -6882,12 +7119,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6898,6 +7165,12 @@ + + + + + + @@ -7238,6 +7511,12 @@ + + + + + + @@ -7258,8 +7537,15 @@ + + + + + + + @@ -7282,6 +7568,10 @@ + + + + @@ -7351,6 +7641,10 @@ + + + + @@ -7379,6 +7673,10 @@ + + + + @@ -7544,6 +7842,7 @@ + @@ -7584,6 +7883,10 @@ + + + + @@ -7626,6 +7929,10 @@ + + + + @@ -7636,6 +7943,10 @@ + + + + @@ -7670,6 +7981,10 @@ + + + + @@ -7698,6 +8013,10 @@ + + + + @@ -7751,6 +8070,18 @@ + + + + + + + + + + + + @@ -7921,6 +8252,12 @@ + + + + + + @@ -7939,6 +8276,12 @@ + + + + + + @@ -7969,6 +8312,12 @@ + + + + + + @@ -8067,6 +8416,12 @@ + + + + + + @@ -8131,6 +8486,7 @@ + diff --git a/gradle/versions.properties b/gradle/versions.properties index 30d23709b3a..881849a88f3 100644 --- a/gradle/versions.properties +++ b/gradle/versions.properties @@ -3,24 +3,27 @@ versions.intellijSdk.forIde.202=202.7660.26 versions.intellijSdk.forIde.203=203.6682.168 versions.intellijSdk.forIde.211=211.7442.40 versions.intellijSdk.forIde.212=212.4746.92 -versions.jar.asm-all=9.0 -versions.jar.guava=29.0-jre -versions.jar.groovy=2.5.11 -versions.jar.groovy-xml=2.5.11 -versions.jar.lombok-ast=0.2.3 -versions.jar.swingx-core=1.6.2-2 -versions.jar.kxml2=2.3.0 -versions.jar.streamex=0.7.2 -versions.jar.gson=2.8.6 -versions.jar.oro=2.0.8 -versions.jar.picocontainer=1.2 -versions.jar.serviceMessages=2019.1.4 -versions.jar.lz4-java=1.7.1 -ignore.jar.snappy-in-java=true + +# versions.* should match library versions used in IDEA from versions.intellijSdk + versions.gradle-api=4.5.1 versions.jna=5.6.0 versions.shadow=6.1.0 versions.junit-bom=5.8.1 versions.org.junit.platform=1.7.0 - -versions.annotations=21.0 \ No newline at end of file +versions.annotations=21.0 +versions.asm-all=9.0 +versions.guava=29.0-jre +versions.log4j=1.2.17.2 +versions.trove4j=1.0.20181211 +versions.jdom=2.0.6 +versions.streamex=0.7.2 +versions.oro=2.0.8 +versions.jna-platform=5.6.0 +versions.intellij-deps-fastutil=8.4.1-4 +versions.lz4-java=1.7.1 +versions.commons-lang=2.4 +versions.gson=2.8.6 +versions.groovy=2.5.11 +versions.groovy-xml=2.5.11 +versions.serviceMessages=2019.1.4 diff --git a/js/js.ast/build.gradle.kts b/js/js.ast/build.gradle.kts index 10db33c49eb..b3b62f629cf 100644 --- a/js/js.ast/build.gradle.kts +++ b/js/js.ast/build.gradle.kts @@ -5,8 +5,8 @@ plugins { dependencies { api(project(":core:descriptors")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("trove4j") } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) } sourceSets { diff --git a/js/js.config/build.gradle.kts b/js/js.config/build.gradle.kts index 30942d13702..21eecbe2697 100644 --- a/js/js.config/build.gradle.kts +++ b/js/js.config/build.gradle.kts @@ -6,7 +6,7 @@ plugins { dependencies { api(project(":core:deserialization")) api(project(":compiler:config")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/js/js.dce/build.gradle.kts b/js/js.dce/build.gradle.kts index 62612b1ad9f..7b9804beb26 100644 --- a/js/js.dce/build.gradle.kts +++ b/js/js.dce/build.gradle.kts @@ -9,8 +9,8 @@ dependencies { api(project(":js:js.ast")) api(project(":js:js.translator")) compileOnly(project(":js:js.sourcemap")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("guava", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("com.google.guava:guava")) } sourceSets { diff --git a/js/js.engines/build.gradle.kts b/js/js.engines/build.gradle.kts index f2e23e832e4..555a7d7f740 100644 --- a/js/js.engines/build.gradle.kts +++ b/js/js.engines/build.gradle.kts @@ -8,7 +8,7 @@ dependencies { api(project(":compiler:util")) api(project(":js:js.ast")) api(project(":js:js.translator")) - api(intellijCoreDep()) { includeJars("intellij-core") } + api(intellijCore()) } sourceSets { diff --git a/js/js.frontend/build.gradle.kts b/js/js.frontend/build.gradle.kts index 26c18b8a0d7..7dbb9fee75d 100644 --- a/js/js.frontend/build.gradle.kts +++ b/js/js.frontend/build.gradle.kts @@ -10,8 +10,8 @@ dependencies { api(project(":js:js.parser")) api(project(":js:js.serializer")) api(project(":js:js.config")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("guava", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("com.google.guava:guava")) } sourceSets { diff --git a/js/js.parser/build.gradle.kts b/js/js.parser/build.gradle.kts index 80a5a9807e5..2cd8a8abedd 100644 --- a/js/js.parser/build.gradle.kts +++ b/js/js.parser/build.gradle.kts @@ -6,7 +6,7 @@ plugins { dependencies { api(kotlinStdlib()) api(project(":js:js.ast")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/js/js.serializer/build.gradle.kts b/js/js.serializer/build.gradle.kts index 8565882dcaf..b720cea07c4 100644 --- a/js/js.serializer/build.gradle.kts +++ b/js/js.serializer/build.gradle.kts @@ -9,7 +9,7 @@ dependencies { api(project(":compiler:serialization")) api(project(":js:js.ast")) api(project(":js:js.config")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/js/js.sourcemap/build.gradle.kts b/js/js.sourcemap/build.gradle.kts index 4b64d759441..bb6b52645e1 100644 --- a/js/js.sourcemap/build.gradle.kts +++ b/js/js.sourcemap/build.gradle.kts @@ -7,8 +7,8 @@ dependencies { compileOnly(project(":js:js.ast")) compileOnly(project(":js:js.parser")) // TODO remove, required for JSON AST compileOnly(project(":js:js.frontend")) // TODO remove - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("trove4j") } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) } sourceSets { diff --git a/js/js.tests/build.gradle.kts b/js/js.tests/build.gradle.kts index 8ade4a695d7..8ed125baa15 100644 --- a/js/js.tests/build.gradle.kts +++ b/js/js.tests/build.gradle.kts @@ -28,7 +28,6 @@ val testJsRuntime by configurations.creating { dependencies { testApiJUnit5(vintageEngine = true) - testRuntimeOnly(intellijDep()) testApi(protobufFull()) testApi(projectTests(":compiler:tests-common")) @@ -41,8 +40,7 @@ dependencies { testCompileOnly(project(":compiler:cli")) testCompileOnly(project(":compiler:cli-js")) testCompileOnly(project(":compiler:util")) - testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } - testCompileOnly(intellijDep()) { includeJars("idea", "idea_rt", "util") } + testCompileOnly(intellijCore()) testApi(project(":compiler:backend.js")) testApi(project(":compiler:backend.wasm")) testApi(project(":js:js.translator")) @@ -54,14 +52,16 @@ dependencies { testApi(projectTests(":kotlin-build-common")) testApi(projectTests(":generators:test-generator")) - testApi(intellijCoreDep()) { includeJars("intellij-core") } + testApi(intellijCore()) testApi(project(":compiler:frontend")) testApi(project(":compiler:cli")) testApi(project(":compiler:util")) testRuntimeOnly(project(":kotlin-reflect")) - testRuntimeOnly(intellijDep()) { includeJars("trove4j", "guava", "jdom", rootProject = rootProject) } + testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) + testRuntimeOnly(commonDependency("com.google.guava:guava")) + testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps:jdom")) testRuntimeOnly(kotlinStdlib()) testJsRuntime(kotlinStdlib("js")) diff --git a/js/js.translator/build.gradle.kts b/js/js.translator/build.gradle.kts index 19902e5c5b3..d6440f4c646 100644 --- a/js/js.translator/build.gradle.kts +++ b/js/js.translator/build.gradle.kts @@ -15,8 +15,9 @@ dependencies { api(project(":js:js.frontend")) api(project(":js:js.parser")) compileOnly(project(":js:js.sourcemap")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("trove4j", "guava", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) + compileOnly(commonDependency("com.google.guava:guava")) } sourceSets { diff --git a/kotlin-native/backend.native/build.gradle b/kotlin-native/backend.native/build.gradle index 1a1ebba76a2..1319120e2de 100644 --- a/kotlin-native/backend.native/build.gradle +++ b/kotlin-native/backend.native/build.gradle @@ -104,21 +104,9 @@ dependencies { compilerApi project(":kotlin-util-klib-metadata") compilerApi project(":compiler:ir.serialization.common") compilerApi project(":compiler:ir.psi2ir") - use(LocalDependenciesKt) { - compilerApi(intellijCoreDep()){ - artifact { - name = "intellij-core" - type = "jar" - } - } - compilerApi(intellijDep()){ - artifact { - name = "util" - type = "jar" - //extention = "jar" - } - } - compileOnly(jpsStandalone()) + use(IntellijDependenciesKt) { + compilerApi(intellijCore()) + compileOnly(jpsModel()) } compilerApi kotlinNativeInterop['llvm'].configuration diff --git a/libraries/examples/kotlin-gradle-subplugin-example/build.gradle b/libraries/examples/kotlin-gradle-subplugin-example/build.gradle index a63d71624d6..ecce32e2506 100644 --- a/libraries/examples/kotlin-gradle-subplugin-example/build.gradle +++ b/libraries/examples/kotlin-gradle-subplugin-example/build.gradle @@ -26,13 +26,7 @@ dependencies { compileOnly gradleApi() - compileOnly("kotlin.build:intellij-core:${rootProject.ext["versions.intellijSdk"]}") { - artifact { - name = 'intellij-core' - type = 'jar' - extension = 'jar' - } - } + compileOnly project(':dependencies:intellij-core') } // Relocate `com.intellij.*` and some other classes to match those in the `kotlin-compiler-embeddable` diff --git a/libraries/examples/scripting/jvm-embeddable-host/build.gradle.kts b/libraries/examples/scripting/jvm-embeddable-host/build.gradle.kts index a2337409ff8..7474f76171d 100644 --- a/libraries/examples/scripting/jvm-embeddable-host/build.gradle.kts +++ b/libraries/examples/scripting/jvm-embeddable-host/build.gradle.kts @@ -10,7 +10,7 @@ dependencies { testRuntimeOnly(project(":kotlin-scripting-compiler-embeddable")) testRuntimeOnly(project(":kotlin-scripting-jvm-host")) testRuntimeOnly(project(":kotlin-reflect")) - testRuntimeOnly(intellijDep()) { includeJars("guava", rootProject = rootProject) } + testRuntimeOnly(commonDependency("com.google.guava:guava")) testApi(commonDependency("junit")) } diff --git a/libraries/kotlinx-metadata/jvm/build.gradle.kts b/libraries/kotlinx-metadata/jvm/build.gradle.kts index ba660f6a86f..17353f43bc8 100644 --- a/libraries/kotlinx-metadata/jvm/build.gradle.kts +++ b/libraries/kotlinx-metadata/jvm/build.gradle.kts @@ -42,7 +42,7 @@ dependencies { shadows(protobufLite()) testImplementation(project(":kotlin-test:kotlin-test-junit")) testImplementation(commonDependency("junit:junit")) - testImplementation(intellijDep()) { includeJars("asm-all", rootProject = rootProject) } + testImplementation(commonDependency("org.jetbrains.intellij.deps:asm-all")) testCompileOnly(project(":kotlin-reflect-api")) testRuntimeOnly(project(":kotlin-reflect")) } diff --git a/libraries/scripting/intellij/build.gradle.kts b/libraries/scripting/intellij/build.gradle.kts index d43b390a1cd..130bdb792dd 100644 --- a/libraries/scripting/intellij/build.gradle.kts +++ b/libraries/scripting/intellij/build.gradle.kts @@ -8,7 +8,7 @@ dependencies { api(project(":kotlin-script-runtime")) api(kotlinStdlib()) api(project(":kotlin-scripting-common")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) } sourceSets { diff --git a/libraries/scripting/js-test/build.gradle.kts b/libraries/scripting/js-test/build.gradle.kts index 0d96ebb44a5..7fb29565f07 100644 --- a/libraries/scripting/js-test/build.gradle.kts +++ b/libraries/scripting/js-test/build.gradle.kts @@ -14,13 +14,11 @@ dependencies { testApi(project(":compiler:backend.js")) testApi(project(":compiler:ir.tree.impl")) testApi(project(":js:js.engines")) - testApi(intellijCoreDep()) { includeJars("intellij-core") } - testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") } - testRuntimeOnly(intellijDep()) { - includeJars("idea", "idea_rt", "log4j", "guava", "jdom", rootProject = rootProject) - } - testRuntimeOnly(commonDep("org.jetbrains.intellij.deps", "trove4j")) - testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") } + testApi(intellijCore()) + + testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps.fastutil:intellij-deps-fastutil")) + testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps:jdom")) + testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) } sourceSets { diff --git a/libraries/scripting/jsr223/build.gradle.kts b/libraries/scripting/jsr223/build.gradle.kts index a568b01de22..67b6d1b3e2d 100644 --- a/libraries/scripting/jsr223/build.gradle.kts +++ b/libraries/scripting/jsr223/build.gradle.kts @@ -14,7 +14,7 @@ dependencies { api(project(":kotlin-scripting-compiler")) compileOnly(project(":compiler:cli-common")) compileOnly(project(":kotlin-reflect-api")) - compileOnly(intellijCoreDep()) + compileOnly(intellijCore()) publishedRuntime(project(":kotlin-compiler")) publishedRuntime(project(":kotlin-reflect")) } diff --git a/libraries/scripting/jvm-host-test/build.gradle.kts b/libraries/scripting/jvm-host-test/build.gradle.kts index 8f6ff1cceae..4c4c3795092 100644 --- a/libraries/scripting/jvm-host-test/build.gradle.kts +++ b/libraries/scripting/jvm-host-test/build.gradle.kts @@ -12,12 +12,12 @@ val embeddableTestRuntime by configurations.creating { dependencies { allTestsRuntime(commonDependency("junit")) - allTestsRuntime(intellijCoreDep()) { includeJars("intellij-core") } - allTestsRuntime(intellijDep()) { includeJars("idea", "idea_rt", "log4j", "jna") } + allTestsRuntime(intellijCore()) testApi(project(":kotlin-scripting-jvm-host-unshaded")) testApi(projectTests(":compiler:tests-common")) testApi(project(":kotlin-scripting-compiler")) testApi(project(":daemon-common")) // TODO: fix import (workaround for jps build) + testImplementation(commonDependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) testRuntimeOnly(project(":kotlin-compiler")) diff --git a/libraries/scripting/jvm-host/build.gradle.kts b/libraries/scripting/jvm-host/build.gradle.kts index d76a1ac29e5..8d267c41c41 100644 --- a/libraries/scripting/jvm-host/build.gradle.kts +++ b/libraries/scripting/jvm-host/build.gradle.kts @@ -14,7 +14,7 @@ dependencies { compileOnly(project(":kotlin-scripting-compiler")) compileOnly(project(":compiler:cli")) compileOnly(project(":kotlin-reflect-api")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) publishedRuntime(project(":kotlin-compiler")) publishedRuntime(project(":kotlin-scripting-compiler")) publishedRuntime(project(":kotlin-reflect")) diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/build.gradle.kts b/libraries/tools/kotlin-gradle-plugin-integration-tests/build.gradle.kts index 34a185702e1..6c622d7070d 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/build.gradle.kts +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/build.gradle.kts @@ -28,7 +28,7 @@ dependencies { testImplementation(project(":native:kotlin-klib-commonizer-api")) testImplementation(project(":kotlin-compiler-embeddable")) - testImplementation(intellijCoreDep()) { includeJars("jdom") } + testImplementation(commonDependency("org.jetbrains.intellij.deps:jdom")) // testCompileOnly dependency on non-shaded artifacts is needed for IDE support // testRuntimeOnly on shaded artifact is needed for running tests with shaded compiler testCompileOnly(project(":kotlin-gradle-plugin-test-utils-embeddable")) @@ -43,7 +43,7 @@ dependencies { testImplementation(gradleApi()) testImplementation(gradleTestKit()) - testImplementation("com.google.code.gson:gson:${rootProject.extra["versions.jar.gson"]}") + testImplementation(commonDependency("com.google.code.gson:gson")) testApiJUnit5(vintageEngine = true, jupiterParams = true) testRuntimeOnly(project(":kotlin-android-extensions")) @@ -52,7 +52,7 @@ dependencies { // Workaround for missing transitive import of the common(project `kotlin-test-common` // for `kotlin-test-jvm` into the IDE: testCompileOnly(project(":kotlin-test:kotlin-test-common")) { isTransitive = false } - testCompileOnly(intellijDep()) { includeJars("asm-all", rootProject = rootProject) } + testCompileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) } // Aapt2 from Android Gradle Plugin 3.2 and below does not handle long paths on Windows. diff --git a/libraries/tools/kotlin-gradle-plugin-npm-versions-codegen/build.gradle.kts b/libraries/tools/kotlin-gradle-plugin-npm-versions-codegen/build.gradle.kts index 23665d192e5..c3384cabd69 100644 --- a/libraries/tools/kotlin-gradle-plugin-npm-versions-codegen/build.gradle.kts +++ b/libraries/tools/kotlin-gradle-plugin-npm-versions-codegen/build.gradle.kts @@ -4,7 +4,7 @@ plugins { dependencies { implementation("io.ktor:ktor-client-cio:1.4.0") - implementation("com.google.code.gson:gson:${rootProject.extra["versions.jar.gson"]}") + implementation(commonDependency("com.google.code.gson:gson")) implementation("org.apache.velocity:velocity:1.7") implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.0-RC") } diff --git a/libraries/tools/kotlin-gradle-plugin-test-utils-embeddable/build.gradle.kts b/libraries/tools/kotlin-gradle-plugin-test-utils-embeddable/build.gradle.kts index 0962452a0e3..4d41ba81cf2 100644 --- a/libraries/tools/kotlin-gradle-plugin-test-utils-embeddable/build.gradle.kts +++ b/libraries/tools/kotlin-gradle-plugin-test-utils-embeddable/build.gradle.kts @@ -21,8 +21,6 @@ dependencies { api(projectTests(projectName)) { isTransitive = false } embedded(projectTests(projectName)) { isTransitive = false } } - - embedded(intellijDep()) { includeJars("idea_rt") } } runtimeJar(rewriteDefaultJarDepsToShadedCompiler()) diff --git a/libraries/tools/kotlin-gradle-plugin/build.gradle.kts b/libraries/tools/kotlin-gradle-plugin/build.gradle.kts index d3a0495d411..d1cf4675582 100644 --- a/libraries/tools/kotlin-gradle-plugin/build.gradle.kts +++ b/libraries/tools/kotlin-gradle-plugin/build.gradle.kts @@ -55,8 +55,9 @@ dependencies { compileOnly(project(":kotlin-gradle-build-metrics")) embedded(project(":kotlin-gradle-build-metrics")) - implementation("com.google.code.gson:gson:${rootProject.extra["versions.jar.gson"]}") - implementation("com.google.guava:guava:${rootProject.extra["versions.jar.guava"]}") + implementation(commonDependency("com.google.code.gson:gson")) + implementation(commonDependency("com.google.guava:guava")) + implementation("de.undercouch:gradle-download-task:4.1.1") implementation("com.github.gundy:semver4j:0.16.4:nodeps") { exclude(group = "*") @@ -68,7 +69,7 @@ dependencies { compileOnly("com.android.tools.build:builder-model:3.4.0") compileOnly("org.codehaus.groovy:groovy-all:2.4.12") compileOnly(project(":kotlin-reflect")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) runtimeOnly(project(":kotlin-compiler-embeddable")) runtimeOnly(project(":kotlin-annotation-processing-gradle")) @@ -77,9 +78,12 @@ dependencies { runtimeOnly(project(":kotlin-scripting-compiler-embeddable")) runtimeOnly(project(":kotlin-scripting-compiler-impl-embeddable")) - embedded(compileOnly(intellijDep()) { - includeJars("asm-all", "gson", "guava", "serviceMessages", rootProject = rootProject) - }) + compileOnly(commonDependency("org.jetbrains.teamcity:serviceMessages")) + + embedded(commonDependency("org.jetbrains.intellij.deps:asm-all")) { isTransitive = false } + embedded(commonDependency("com.google.code.gson:gson")) { isTransitive = false } + embedded(commonDependency("com.google.guava:guava")) { isTransitive = false } + embedded(commonDependency("org.jetbrains.teamcity:serviceMessages")) { isTransitive = false } // com.android.tools.build:gradle has ~50 unneeded transitive dependencies compileOnly("com.android.tools.build:gradle:3.0.0") { isTransitive = false } @@ -93,7 +97,7 @@ dependencies { "functionalTestImplementation"(gradleKotlinDsl()) } - testImplementation(intellijDep()) { includeJars("junit", "serviceMessages", rootProject = rootProject) } + testImplementation(commonDependency("org.jetbrains.teamcity:serviceMessages")) testCompileOnly(project(":compiler")) testImplementation(projectTests(":kotlin-build-common")) diff --git a/libraries/tools/kotlin-script-util/build.gradle.kts b/libraries/tools/kotlin-script-util/build.gradle.kts index de425003dd1..9f4e349135f 100644 --- a/libraries/tools/kotlin-script-util/build.gradle.kts +++ b/libraries/tools/kotlin-script-util/build.gradle.kts @@ -27,9 +27,7 @@ dependencies { testImplementation("org.jetbrains.kotlin:jcabi-aether:1.0-dev-3") testImplementation("org.sonatype.aether:aether-api:1.13.1") testImplementation("org.apache.maven:maven-core:3.0.3") - compileOnly(intellijDep()) { includeJars("util") } - testApi(intellijDep()) { includeJars("platform-api", "util") } - testApi(intellijCoreDep()) { includeJars("intellij-core") } + testApi(intellijCore()) } configurations.all { diff --git a/libraries/tools/kotlin-tooling-metadata/build.gradle.kts b/libraries/tools/kotlin-tooling-metadata/build.gradle.kts index f4e9a0df2d9..ebd49a5439e 100644 --- a/libraries/tools/kotlin-tooling-metadata/build.gradle.kts +++ b/libraries/tools/kotlin-tooling-metadata/build.gradle.kts @@ -10,6 +10,6 @@ javadocJar() dependencies { implementation(kotlinStdlib()) - implementation("com.google.code.gson:gson:${rootProject.extra["versions.jar.gson"]}") + implementation(commonDependency("com.google.code.gson:gson")) testImplementation(project(":kotlin-test:kotlin-test-junit")) } diff --git a/libraries/tools/kotlinp/build.gradle.kts b/libraries/tools/kotlinp/build.gradle.kts index ce3deb7e463..acd148733c8 100644 --- a/libraries/tools/kotlinp/build.gradle.kts +++ b/libraries/tools/kotlinp/build.gradle.kts @@ -8,30 +8,25 @@ plugins { } val kotlinpAsmVersion = "9.0" - val shadows by configurations.creating -repositories { - maven("https://packages.jetbrains.team/maven/p/ij/intellij-dependencies/") -} - dependencies { compileOnly(project(":kotlinx-metadata")) compileOnly(project(":kotlinx-metadata-jvm")) + implementation("org.jetbrains.intellij.deps:asm-all:$kotlinpAsmVersion") + testApi(intellijCore()) + testCompileOnly(project(":kotlinx-metadata")) testCompileOnly(project(":kotlinx-metadata-jvm")) + testImplementation(commonDependency("junit:junit")) testImplementation(projectTests(":compiler:tests-common")) testImplementation(projectTests(":generators:test-generator")) testRuntimeOnly(project(":kotlinx-metadata-jvm")) - testApi(intellijCoreDep()) { includeJars("intellij-core") } - - testRuntimeOnly(intellijDep()) { includeJars("platform-concurrency", "platform-objectSerializer", "idea_rt") } - shadows(project(":kotlinx-metadata-jvm")) shadows("org.jetbrains.intellij.deps:asm-all:$kotlinpAsmVersion") } diff --git a/native/commonizer/build.gradle.kts b/native/commonizer/build.gradle.kts index 0eff97bb126..9a9cce01c2f 100644 --- a/native/commonizer/build.gradle.kts +++ b/native/commonizer/build.gradle.kts @@ -27,8 +27,8 @@ dependencies { compileOnly(project(":compiler:frontend")) compileOnly(project(":native:frontend.native")) compileOnly(project(":kotlin-util-klib-metadata")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("trove4j") } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) // This dependency is necessary to keep the right dependency record inside of POM file: publishedCompile(project(":kotlin-compiler")) @@ -40,7 +40,7 @@ dependencies { testImplementation(project(":kotlinx-metadata-klib")) { isTransitive = false } testImplementation(project(":kotlinx-metadata")) { isTransitive = false } testImplementation(project(":native:kotlin-klib-commonizer-api")) - testApi(intellijCoreDep()) { includeJars("intellij-core")} + testApi(intellijCore()) } val runCommonizer by tasks.registering(JavaExec::class) { diff --git a/native/frontend/build.gradle.kts b/native/frontend/build.gradle.kts index c41110cbc5f..6b9b86e6b17 100644 --- a/native/frontend/build.gradle.kts +++ b/native/frontend/build.gradle.kts @@ -6,7 +6,7 @@ plugins { dependencies { compileOnly(project(":compiler:frontend")) compileOnly(project(":compiler:frontend.java")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) api(project(":native:kotlin-native-utils")) } diff --git a/native/native.tests/build.gradle.kts b/native/native.tests/build.gradle.kts index 968c550916a..5f4fb28ed61 100644 --- a/native/native.tests/build.gradle.kts +++ b/native/native.tests/build.gradle.kts @@ -10,9 +10,8 @@ project.configureJvmToolchain(JdkMajorVersion.JDK_11) dependencies { testImplementation(kotlinStdlib()) testImplementation(project(":kotlin-reflect")) - testImplementation(intellijCoreDep()) { includeJars("intellij-core") } - testImplementation(intellijPluginDep("java")) - testImplementation(intellijDep()) { includeJars("commons-lang-2.4") } + testImplementation(intellijCore()) + testImplementation(commonDependency("commons-lang:commons-lang")) testImplementation(project(":kotlin-compiler-runner-unshaded")) testImplementation(projectTests(":compiler:tests-common")) testImplementation(projectTests(":compiler:tests-common-new")) @@ -20,7 +19,8 @@ dependencies { testImplementation(projectTests(":generators:test-generator")) testApiJUnit5() - testRuntimeOnly(intellijDep()) { includeJars("trove4j", "intellij-deps-fastutil-8.4.1-4") } + testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) + testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps.fastutil:intellij-deps-fastutil")) } val generationRoot = projectDir.resolve("tests-gen") diff --git a/plugins/allopen/allopen-cli/build.gradle.kts b/plugins/allopen/allopen-cli/build.gradle.kts index 537eda8a3aa..8654d11a5a3 100644 --- a/plugins/allopen/allopen-cli/build.gradle.kts +++ b/plugins/allopen/allopen-cli/build.gradle.kts @@ -9,7 +9,7 @@ plugins { dependencies { compileOnly(project(":compiler:plugin-api")) compileOnly(project(":compiler:frontend")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) runtimeOnly(kotlinStdlib()) @@ -18,7 +18,7 @@ dependencies { testApi(projectTests(":compiler:tests-common")) testApi(commonDependency("junit:junit")) - testApi(intellijCoreDep()) { includeJars("intellij-core") } + testApi(intellijCore()) } sourceSets { diff --git a/plugins/android-extensions/android-extensions-compiler/build.gradle.kts b/plugins/android-extensions/android-extensions-compiler/build.gradle.kts index 84e79f3e6c7..dbc4edf75df 100644 --- a/plugins/android-extensions/android-extensions-compiler/build.gradle.kts +++ b/plugins/android-extensions/android-extensions-compiler/build.gradle.kts @@ -10,7 +10,7 @@ val robolectricClasspath by configurations.creating val androidExtensionsRuntimeForTests by configurations.creating dependencies { - testApi(intellijCoreDep()) { includeJars("intellij-core") } + testApi(intellijCore()) compileOnly(project(":compiler:util")) compileOnly(project(":compiler:plugin-api")) @@ -21,8 +21,8 @@ dependencies { compileOnly(project(":compiler:backend.jvm")) compileOnly(project(":compiler:ir.tree.impl")) compileOnly(project(":kotlin-android-extensions-runtime")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("asm-all", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) testApi(project(":compiler:util")) testApi(project(":compiler:backend")) @@ -34,9 +34,6 @@ dependencies { testApi(project(":kotlin-test:kotlin-test-jvm")) testApi(commonDependency("junit:junit")) - testRuntimeOnly(intellijPluginDep("junit")) - testRuntimeOnly(intellijDep()) - robolectricClasspath(commonDependency("org.robolectric", "robolectric")) robolectricClasspath("org.robolectric:android-all:4.4_r1-robolectric-1") robolectricClasspath(project(":kotlin-android-extensions-runtime")) { isTransitive = false } diff --git a/plugins/atomicfu/atomicfu-compiler/build.gradle.kts b/plugins/atomicfu/atomicfu-compiler/build.gradle.kts index c283b0da0c4..d3c8ee20ac6 100644 --- a/plugins/atomicfu/atomicfu-compiler/build.gradle.kts +++ b/plugins/atomicfu/atomicfu-compiler/build.gradle.kts @@ -44,7 +44,8 @@ repositories { } dependencies { - compileOnly(intellijCoreDep()) { includeJars("intellij-core", "asm-all", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) compileOnly(project(":compiler:plugin-api")) compileOnly(project(":compiler:cli-common")) diff --git a/plugins/fir-plugin-prototype/build.gradle.kts b/plugins/fir-plugin-prototype/build.gradle.kts index 5001d94350d..a8c9dac6cac 100644 --- a/plugins/fir-plugin-prototype/build.gradle.kts +++ b/plugins/fir-plugin-prototype/build.gradle.kts @@ -15,7 +15,7 @@ dependencies { compileOnly(project(":compiler:ir.tree.impl")) compileOnly(project(":compiler:fir:entrypoint")) compileOnly(project(":compiler:plugin-api")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) compileOnly(project(":kotlin-reflect-api")) testApiJUnit5() @@ -30,14 +30,10 @@ dependencies { testRuntimeOnly(project(":core:descriptors.runtime")) testRuntimeOnly(project(":compiler:fir:fir-serialization")) - testRuntimeOnly(intellijDep()) { - includeJars( - "jna", - "jdom", - "trove4j", - "intellij-deps-fastutil-8.4.1-4", - rootProject = rootProject) - } + testRuntimeOnly(commonDependency("net.java.dev.jna:jna")) + testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps:jdom")) + testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) + testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps.fastutil:intellij-deps-fastutil")) testRuntimeOnly(toolsJar()) } diff --git a/plugins/fir-plugin-prototype/fir-plugin-ic-test/build.gradle.kts b/plugins/fir-plugin-prototype/fir-plugin-ic-test/build.gradle.kts index 35d0694207a..da2b34209ae 100644 --- a/plugins/fir-plugin-prototype/fir-plugin-ic-test/build.gradle.kts +++ b/plugins/fir-plugin-prototype/fir-plugin-ic-test/build.gradle.kts @@ -10,22 +10,18 @@ dependencies { testApi(project(":compiler:incremental-compilation-impl")) testApi(projectTests(":compiler:incremental-compilation-impl")) - testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } + testCompileOnly(intellijCore()) testCompileOnly(project(":kotlin-reflect-api")) testRuntimeOnly(project(":kotlin-reflect")) testRuntimeOnly(project(":core:descriptors.runtime")) testRuntimeOnly(project(":compiler:fir:fir-serialization")) - testRuntimeOnly(intellijDep()) { - includeJars( - "lz4-java", - "jna", - "jdom", - "trove4j", - "intellij-deps-fastutil-8.4.1-4", - rootProject = rootProject) - } + testRuntimeOnly(commonDependency("org.lz4:lz4-java")) + testRuntimeOnly(commonDependency("net.java.dev.jna:jna")) + testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps:jdom")) + testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps:trove4j")) + testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps.fastutil:intellij-deps-fastutil")) testRuntimeOnly(toolsJar()) } diff --git a/plugins/imports-dumper/build.gradle.kts b/plugins/imports-dumper/build.gradle.kts index a47ae224644..d65a11b5c8c 100644 --- a/plugins/imports-dumper/build.gradle.kts +++ b/plugins/imports-dumper/build.gradle.kts @@ -13,7 +13,7 @@ dependencies { api(project(":compiler:plugin-api")) compileOnly("org.jetbrains.kotlinx", "kotlinx-serialization-runtime", kotlinxSerializationVersion) { isTransitive = false } - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) testApi(projectTests(":compiler:tests-common")) diff --git a/plugins/jvm-abi-gen/build.gradle.kts b/plugins/jvm-abi-gen/build.gradle.kts index 307ee646d34..c78ea3eae04 100644 --- a/plugins/jvm-abi-gen/build.gradle.kts +++ b/plugins/jvm-abi-gen/build.gradle.kts @@ -19,8 +19,10 @@ configurations.getByName("compileOnly").extendsFrom(shadows) configurations.getByName("testApi").extendsFrom(shadows) dependencies { - // Should come before compiler dependencies, see comment in "compiler/build.gradle.kts" - testRuntimeOnly(intellijDep()) + // Should come before dependency on proguarded compiler because StringUtil methods are deleted from it + testRuntimeOnly(intellijPlatformUtil()) { isTransitive = false } + + testRuntimeOnly(project(":kotlin-compiler")) compileOnly(project(":compiler:util")) compileOnly(project(":compiler:cli")) @@ -36,11 +38,8 @@ dependencies { compileOnly(project(":kotlinx-metadata")) shadows(commonDependency("org.jetbrains.kotlinx:kotlinx-metadata-jvm")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core", "asm-all", rootProject = rootProject) } - - testApi(intellijDep()) { includeJars("platform-impl", rootProject = rootProject) } - testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") } - testRuntimeOnly(project(":kotlin-compiler")) + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) testImplementation(commonDependency("junit:junit")) testImplementation(projectTests(":compiler:tests-common")) diff --git a/plugins/kapt3/kapt3-cli/build.gradle.kts b/plugins/kapt3/kapt3-cli/build.gradle.kts index 921041de3fc..adb81695610 100644 --- a/plugins/kapt3/kapt3-cli/build.gradle.kts +++ b/plugins/kapt3/kapt3-cli/build.gradle.kts @@ -6,7 +6,7 @@ plugins { dependencies { api(project(":compiler:cli")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) } + compileOnly(intellijCore()) testApi(projectTests(":compiler:tests-common")) testApi(projectTests(":compiler")) diff --git a/plugins/kapt3/kapt3-compiler/build.gradle.kts b/plugins/kapt3/kapt3-compiler/build.gradle.kts index 10bfd10b340..5b601f69f30 100644 --- a/plugins/kapt3/kapt3-compiler/build.gradle.kts +++ b/plugins/kapt3/kapt3-compiler/build.gradle.kts @@ -7,13 +7,6 @@ plugins { } dependencies { - testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } - testImplementation(intellijDep()) - testCompileOnly(intellijDep()) { includeJars("idea", "idea_rt") } - testCompileOnly(intellijDep()) { includeJars("platform-api", "platform-impl") } - - testImplementation(intellijPluginDep("java")) - api(project(":compiler:util")) api(project(":compiler:cli")) api(project(":compiler:backend")) @@ -25,8 +18,10 @@ dependencies { compileOnly(project(":kotlin-annotation-processing-cli")) compileOnly(project(":kotlin-annotation-processing-base")) compileOnly(project(":kotlin-annotation-processing-runtime")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("asm-all", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) + + testImplementation(intellijCore()) testApi(projectTests(":compiler:tests-common")) testApi(project(":kotlin-annotation-processing-base")) diff --git a/plugins/kotlin-serialization/kotlin-serialization-compiler/build.gradle.kts b/plugins/kotlin-serialization/kotlin-serialization-compiler/build.gradle.kts index afe2ec5d601..67ba652cd20 100644 --- a/plugins/kotlin-serialization/kotlin-serialization-compiler/build.gradle.kts +++ b/plugins/kotlin-serialization/kotlin-serialization-compiler/build.gradle.kts @@ -6,7 +6,8 @@ plugins { } dependencies { - compileOnly(intellijCoreDep()) { includeJars("intellij-core", "asm-all", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) compileOnly(project(":compiler:plugin-api")) compileOnly(project(":compiler:cli-common")) @@ -31,8 +32,7 @@ dependencies { testImplementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.2.2") testImplementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.2.2") - testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") } - testRuntimeOnly(intellijDep()) { includeJars("platform-concurrency") } + testRuntimeOnly(intellijCore()) } sourceSets { diff --git a/plugins/lombok/lombok-compiler-plugin/build.gradle.kts b/plugins/lombok/lombok-compiler-plugin/build.gradle.kts index 569e6a8c74b..96226ab7cae 100644 --- a/plugins/lombok/lombok-compiler-plugin/build.gradle.kts +++ b/plugins/lombok/lombok-compiler-plugin/build.gradle.kts @@ -12,10 +12,10 @@ dependencies { implementation(project(":compiler:frontend")) implementation(project(":compiler:frontend.java")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) - testImplementation(intellijCoreDep()) { includeJars("intellij-core") } + testImplementation(intellijCore()) testImplementation(commonDependency("junit:junit")) testImplementation(projectTests(":compiler:tests-common")) diff --git a/plugins/noarg/noarg-cli/build.gradle.kts b/plugins/noarg/noarg-cli/build.gradle.kts index ad99520b4a9..77e8e29572a 100644 --- a/plugins/noarg/noarg-cli/build.gradle.kts +++ b/plugins/noarg/noarg-cli/build.gradle.kts @@ -13,15 +13,15 @@ dependencies { compileOnly(project(":compiler:util")) compileOnly(project(":compiler:plugin-api")) compileOnly(project(":compiler:ir.backend.common")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("asm-all", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) implementation(kotlinStdlib()) testApi(project(":compiler:backend")) testApi(project(":compiler:cli")) testApi(projectTests(":compiler:tests-common")) testApi(commonDependency("junit:junit")) - testApi(intellijCoreDep()) { includeJars("intellij-core")} + testApi(intellijCore()) } sourceSets { diff --git a/plugins/parcelize/parcelize-compiler/build.gradle.kts b/plugins/parcelize/parcelize-compiler/build.gradle.kts index 42364e96e57..83dc411d5db 100644 --- a/plugins/parcelize/parcelize-compiler/build.gradle.kts +++ b/plugins/parcelize/parcelize-compiler/build.gradle.kts @@ -13,7 +13,7 @@ val layoutLib by configurations.creating val layoutLibApi by configurations.creating dependencies { - testApi(intellijCoreDep()) { includeJars("intellij-core") } + testApi(intellijCore()) compileOnly(project(":compiler:util")) compileOnly(project(":compiler:plugin-api")) @@ -23,8 +23,8 @@ dependencies { compileOnly(project(":compiler:ir.backend.common")) compileOnly(project(":compiler:backend.jvm")) compileOnly(project(":compiler:ir.tree.impl")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("asm-all", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) // FIR dependencies compileOnly(project(":compiler:fir:cones")) @@ -64,8 +64,6 @@ dependencies { testApi(commonDependency("junit:junit")) - testRuntimeOnly(intellijPluginDep("junit")) - robolectricClasspath(commonDependency("org.robolectric", "robolectric")) robolectricClasspath("org.robolectric:android-all:4.4_r1-robolectric-1") robolectricClasspath(project(":plugins:parcelize:parcelize-runtime")) { isTransitive = false } diff --git a/plugins/sam-with-receiver/sam-with-receiver-cli/build.gradle.kts b/plugins/sam-with-receiver/sam-with-receiver-cli/build.gradle.kts index 2edfe1b590e..140690de56a 100644 --- a/plugins/sam-with-receiver/sam-with-receiver-cli/build.gradle.kts +++ b/plugins/sam-with-receiver/sam-with-receiver-cli/build.gradle.kts @@ -10,17 +10,16 @@ dependencies { compileOnly(project(":compiler:frontend")) compileOnly(project(":compiler:frontend.java")) compileOnly(project(":compiler:plugin-api")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) testApi(project(":compiler:backend")) testApi(project(":compiler:cli")) testApi(projectTests(":compiler:tests-common")) testApi(commonDependency("junit:junit")) testCompileOnly(project(":kotlin-compiler")) - testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } + testCompileOnly(intellijCore()) testApi(project(":kotlin-scripting-jvm-host-unshaded")) - testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") } - testRuntimeOnly(intellijDep()) { includeJars("platform-concurrency") } + testRuntimeOnly(intellijCore()) } sourceSets { diff --git a/plugins/scripting/scripting-compiler-impl/build.gradle.kts b/plugins/scripting/scripting-compiler-impl/build.gradle.kts index 3c846d5ba9f..26f6d7a5d45 100644 --- a/plugins/scripting/scripting-compiler-impl/build.gradle.kts +++ b/plugins/scripting/scripting-compiler-impl/build.gradle.kts @@ -17,11 +17,11 @@ dependencies { api(project(":kotlin-scripting-jvm")) api(kotlinStdlib()) compileOnly(project(":kotlin-reflect-api")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("asm-all", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) // FIXME: drop after removing references to LocalFileSystem they don't exist in intellij-core - compileOnly(intellijDep()) { includeJars("platform-api") } + compileOnly(intellijAnalysis()) runtimeOnly(project(":kotlin-reflect")) diff --git a/plugins/scripting/scripting-compiler/build.gradle.kts b/plugins/scripting/scripting-compiler/build.gradle.kts index 7940d3a67b7..d9ad5d5596a 100644 --- a/plugins/scripting/scripting-compiler/build.gradle.kts +++ b/plugins/scripting/scripting-compiler/build.gradle.kts @@ -22,7 +22,7 @@ dependencies { api(project(":kotlin-scripting-jvm")) api(project(":kotlin-scripting-compiler-impl")) api(kotlinStdlib()) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) testApi(project(":compiler:frontend")) testApi(project(":compiler:plugin-api")) @@ -34,9 +34,8 @@ dependencies { testApi(projectTests(":compiler:tests-common")) testApi(commonDependency("junit:junit")) - testImplementation(intellijCoreDep()) { includeJars("intellij-core") } + testImplementation(intellijCore()) testImplementation(commonDependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) - testRuntimeOnly(intellijDep()) { includeJars("jps-model", "jna") } testImplementation(project(":kotlin-reflect")) } diff --git a/plugins/scripting/scripting-ide-common/build.gradle.kts b/plugins/scripting/scripting-ide-common/build.gradle.kts index 1934743be32..728bbde0136 100644 --- a/plugins/scripting/scripting-ide-common/build.gradle.kts +++ b/plugins/scripting/scripting-ide-common/build.gradle.kts @@ -11,7 +11,7 @@ dependencies { compileOnly(project(":compiler:frontend.java")) compileOnly(project(":js:js.frontend")) compileOnly(project(":js:js.serializer")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } + compileOnly(intellijCore()) } diff --git a/plugins/scripting/scripting-ide-services/build.gradle.kts b/plugins/scripting/scripting-ide-services/build.gradle.kts index 22e78fa3aa9..c9671dd7146 100644 --- a/plugins/scripting/scripting-ide-services/build.gradle.kts +++ b/plugins/scripting/scripting-ide-services/build.gradle.kts @@ -19,7 +19,7 @@ dependencies { compileOnly(project(":kotlin-scripting-compiler")) compileOnly(project(":compiler:cli")) compileOnly(project(":kotlin-reflect-api")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) publishedRuntime(project(":kotlin-compiler")) publishedRuntime(project(":kotlin-scripting-compiler")) publishedRuntime(project(":kotlin-reflect")) diff --git a/prepare/android-extensions-compiler-gradle/build.gradle.kts b/prepare/android-extensions-compiler-gradle/build.gradle.kts index 8be42ceae32..36d02c16fa6 100644 --- a/prepare/android-extensions-compiler-gradle/build.gradle.kts +++ b/prepare/android-extensions-compiler-gradle/build.gradle.kts @@ -13,7 +13,7 @@ dependencies { compileOnly(project(":kotlin-android-extensions-runtime")) runtimeOnly(project(":kotlin-compiler-embeddable")) compileOnly(commonDependency("com.google.android", "android")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) embedded(project(":plugins:android-extensions-compiler")) { isTransitive = false } embedded(project(":kotlin-android-extensions-runtime")) { isTransitive = false } diff --git a/prepare/compiler/build.gradle.kts b/prepare/compiler/build.gradle.kts index d15ad65e82d..0c6094cd917 100644 --- a/prepare/compiler/build.gradle.kts +++ b/prepare/compiler/build.gradle.kts @@ -150,7 +150,6 @@ dependencies { fatJarContents(project(it)) { isTransitive = false } } - libraries(intellijDep()) { includeIntellijCoreJarDependencies(project) { it.startsWith("trove4j") } } libraries(kotlinStdlib("jdk8")) if (!kotlinBuildProperties.isInJpsBuildIdeaSync) { libraries(kotlinStdlib("js", "distLibrary")) @@ -158,6 +157,7 @@ dependencies { } librariesStripVersion(commonDependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false } + librariesStripVersion(commonDependency("org.jetbrains.intellij.deps:trove4j")) { isTransitive = false } distLibraryProjects.forEach { libraries(project(it)) { isTransitive = false } @@ -204,24 +204,20 @@ dependencies { fatJarContents(commonDependency("io.javaslang", "javaslang")) fatJarContents(commonDependency("org.jetbrains.kotlinx:kotlinx-collections-immutable-jvm")) { isTransitive = false } - fatJarContents(intellijCoreDep()) { includeJars("intellij-core") } - fatJarContents(intellijDep()) { includeJars("jna-platform") } + fatJarContents(intellijCore()) + fatJarContents(commonDependency("net.java.dev.jna:jna-platform")) { isTransitive = false } + fatJarContents(commonDependency("org.jetbrains.intellij.deps.fastutil:intellij-deps-fastutil")) { isTransitive = false } + fatJarContents(commonDependency("org.lz4:lz4-java")) { isTransitive = false } + fatJarContents(commonDependency("org.jetbrains.intellij.deps:asm-all")) { isTransitive = false } + fatJarContents(commonDependency("com.google.guava:guava")) { isTransitive = false } + fatJarContents(commonDependency("net.java.dev.jna:jna")) { isTransitive = false } - fatJarContents(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") } - - fatJarContents(intellijDep()) { includeJars("lz4-java", rootProject = rootProject) } - - fatJarContents(intellijDep()) { - includeIntellijCoreJarDependencies(project) { - !(it.startsWith("jdom") || it.startsWith("log4j") || it.startsWith("trove4j") || it.startsWith("streamex")) - } - } - - fatJarContentsStripServices(jpsStandalone()) { includeJars("jps-model") } - - fatJarContentsStripMetadata(intellijDep()) { includeJars("oro-2.0.8", "jdom", "log4j" ) } - - fatJarContentsStripVersions(intellijCoreDep()) { includeJars("streamex", rootProject = rootProject) } + fatJarContentsStripServices(jpsModel()) { isTransitive = false } + fatJarContentsStripServices(jpsModelImpl()) { isTransitive = false } + fatJarContentsStripMetadata(commonDependency("oro:oro")) { isTransitive = false } + fatJarContentsStripMetadata(commonDependency("org.jetbrains.intellij.deps:jdom")) { isTransitive = false } + fatJarContentsStripMetadata(commonDependency("org.jetbrains.intellij.deps:log4j")) { isTransitive = false } + fatJarContentsStripVersions(commonDependency("one.util:streamex")) { isTransitive = false } } publish() diff --git a/prepare/parcelize-compiler-gradle/build.gradle.kts b/prepare/parcelize-compiler-gradle/build.gradle.kts index a4c9e4a9f12..7eb03202b4f 100644 --- a/prepare/parcelize-compiler-gradle/build.gradle.kts +++ b/prepare/parcelize-compiler-gradle/build.gradle.kts @@ -13,7 +13,7 @@ dependencies { compileOnly(project(":plugins:parcelize:parcelize-runtime")) runtimeOnly(project(":kotlin-compiler-embeddable")) compileOnly(commonDependency("com.google.android", "android")) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijCore()) embedded(project(":plugins:parcelize:parcelize-compiler")) { isTransitive = false } embedded(project(":plugins:parcelize:parcelize-runtime")) { isTransitive = false } diff --git a/settings.gradle b/settings.gradle index 419596b9a63..2db91e86c0a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -188,6 +188,7 @@ include ":benchmarks", ":compiler:compiler.version", ":dependencies:android-sdk", ":dependencies:tools-jar-api", + ":dependencies:intellij-core", ":plugins:android-extensions-compiler", ":kotlin-android-extensions", ":kotlin-android-extensions-runtime", diff --git a/test-instrumenter/build.gradle.kts b/test-instrumenter/build.gradle.kts index aea94c978e0..48eadf7f6c0 100644 --- a/test-instrumenter/build.gradle.kts +++ b/test-instrumenter/build.gradle.kts @@ -13,8 +13,8 @@ pill { dependencies { api(kotlinStdlib()) - compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - compileOnly(intellijDep()) { includeJars("asm-all", rootProject = rootProject) } + compileOnly(intellijCore()) + compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) } sourceSets {