[Build] Remove testApi(intellijDep()) dependencies from all modules
Since IDEA moved most of it's jars to java 11 it's illegal to use them in our dependencies, so all modules which use `intellijDep()` should carefully specify which jars they use
This commit is contained in:
committed by
TeamCityServer
parent
504ccbad88
commit
e933c7b6d9
@@ -35,22 +35,17 @@ dependencies {
|
|||||||
testApi(project(":kotlin-reflect"))
|
testApi(project(":kotlin-reflect"))
|
||||||
testImplementation(project(":analysis:symbol-light-classes"))
|
testImplementation(project(":analysis:symbol-light-classes"))
|
||||||
|
|
||||||
testRuntimeOnly(intellijDep()) {
|
testApi(intellijDep()) {
|
||||||
includeJars(
|
includeJars(
|
||||||
"jps-model",
|
"jps-model",
|
||||||
"extensions",
|
|
||||||
"util",
|
|
||||||
"platform-api",
|
"platform-api",
|
||||||
"platform-impl",
|
"platform-impl",
|
||||||
"idea",
|
|
||||||
"guava",
|
"guava",
|
||||||
"trove4j",
|
"trove4j",
|
||||||
"asm-all",
|
"asm-all",
|
||||||
"log4j",
|
"log4j",
|
||||||
"jdom",
|
"jdom",
|
||||||
"streamex",
|
"streamex",
|
||||||
"bootstrap",
|
|
||||||
"jna",
|
|
||||||
rootProject = rootProject
|
rootProject = rootProject
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ val otherCompilerModules = compilerModules.filter { it != path }
|
|||||||
val antLauncherJar by configurations.creating
|
val antLauncherJar by configurations.creating
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testImplementation(intellijDep()) // Should come before compiler, because of "progarded" stuff needed for tests
|
testImplementation(intellijDep()) { includeJars("platform-impl", rootProject = rootProject) } // Should come before compiler, because of "progarded" stuff needed for tests
|
||||||
|
|
||||||
testApi(project(":kotlin-script-runtime"))
|
testApi(project(":kotlin-script-runtime"))
|
||||||
testApi(project(":kotlin-test:kotlin-test-jvm"))
|
testApi(project(":kotlin-test:kotlin-test-jvm"))
|
||||||
@@ -37,7 +37,15 @@ dependencies {
|
|||||||
testCompileOnly(project(it))
|
testCompileOnly(project(it))
|
||||||
}
|
}
|
||||||
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
testCompileOnly(intellijDep()) { includeJars("idea", "idea_rt", "util", "asm-all", rootProject = rootProject) }
|
|
||||||
|
testRuntimeOnly(intellijDep()) {
|
||||||
|
includeJars(
|
||||||
|
"jps-model",
|
||||||
|
"streamex",
|
||||||
|
"idea_rt",
|
||||||
|
rootProject = rootProject
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
testRuntimeOnly(intellijPluginDep("java"))
|
testRuntimeOnly(intellijPluginDep("java"))
|
||||||
|
|
||||||
|
|||||||
@@ -33,10 +33,9 @@ dependencies {
|
|||||||
|
|
||||||
testImplementation(intellijCoreDep()) { includeJars("intellij-core") }
|
testImplementation(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
testRuntimeOnly(intellijDep()) {
|
testRuntimeOnly(intellijDep()) {
|
||||||
includeJars("jna", rootProject = rootProject)
|
includeJars("intellij-deps-fastutil-8.4.1-4", "jps-model", "streamex", "jna", rootProject = rootProject)
|
||||||
}
|
}
|
||||||
|
|
||||||
testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") }
|
|
||||||
testRuntimeOnly(toolsJar())
|
testRuntimeOnly(toolsJar())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ plugins {
|
|||||||
dependencies {
|
dependencies {
|
||||||
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) }
|
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) }
|
||||||
|
|
||||||
testApi(intellijDep())
|
|
||||||
|
|
||||||
testApi(commonDep("junit:junit"))
|
testApi(commonDep("junit:junit"))
|
||||||
testCompileOnly(project(":kotlin-test:kotlin-test-jvm"))
|
testCompileOnly(project(":kotlin-test:kotlin-test-jvm"))
|
||||||
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
|
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
|
||||||
@@ -30,6 +28,7 @@ dependencies {
|
|||||||
|
|
||||||
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
|
testRuntimeOnly(intellijDep()) { includeJars("idea_rt", "streamex", "jps-model", rootProject = rootProject) }
|
||||||
}
|
}
|
||||||
|
|
||||||
val generationRoot = projectDir.resolve("tests-gen")
|
val generationRoot = projectDir.resolve("tests-gen")
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ dependencies {
|
|||||||
includeJars("jna", rootProject = rootProject)
|
includeJars("jna", rootProject = rootProject)
|
||||||
}
|
}
|
||||||
|
|
||||||
testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") }
|
testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4", "jps-model", "streamex", rootProject = rootProject) }
|
||||||
}
|
}
|
||||||
|
|
||||||
val generationRoot = projectDir.resolve("tests-gen")
|
val generationRoot = projectDir.resolve("tests-gen")
|
||||||
|
|||||||
@@ -15,14 +15,14 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testCompileOnly(intellijDep()) {
|
testApi(intellijCoreDep()) { includeJars("intellij-core")}
|
||||||
|
testApi(intellijDep()) {
|
||||||
includeJars("extensions", "idea_rt", "util", "asm-all", "jna", rootProject = rootProject)
|
includeJars("extensions", "idea_rt", "util", "asm-all", "jna", rootProject = rootProject)
|
||||||
}
|
}
|
||||||
|
|
||||||
testCompileOnly(intellijPluginDep("java")) { includeJars("java-api") }
|
testCompileOnly(intellijPluginDep("java")) { includeJars("java-api") }
|
||||||
|
|
||||||
testRuntimeOnly("xerces:xercesImpl:2.12.0")
|
testRuntimeOnly("xerces:xercesImpl:2.12.0")
|
||||||
testRuntimeOnly(intellijDep())
|
|
||||||
testRuntimeOnly(intellijPluginDep("java"))
|
testRuntimeOnly(intellijPluginDep("java"))
|
||||||
|
|
||||||
testApi(commonDep("junit:junit"))
|
testApi(commonDep("junit:junit"))
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ dependencies {
|
|||||||
|
|
||||||
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) }
|
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) }
|
||||||
|
|
||||||
testImplementation(intellijDep())
|
|
||||||
testImplementation(commonDep("junit:junit"))
|
testImplementation(commonDep("junit:junit"))
|
||||||
testImplementation(projectTests(":compiler:tests-common"))
|
testImplementation(projectTests(":compiler:tests-common"))
|
||||||
testImplementation(projectTests(":compiler:fir:raw-fir:psi2fir"))
|
testImplementation(projectTests(":compiler:fir:raw-fir:psi2fir"))
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ dependencies {
|
|||||||
|
|
||||||
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) }
|
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) }
|
||||||
|
|
||||||
testImplementation(intellijDep())
|
testImplementation(intellijDep()) { includeJars("platform-api", rootProject = rootProject) }
|
||||||
|
|
||||||
testImplementation(commonDep("junit:junit"))
|
testImplementation(commonDep("junit:junit"))
|
||||||
testImplementation(projectTests(":compiler:tests-common"))
|
testImplementation(projectTests(":compiler:tests-common"))
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ dependencies {
|
|||||||
testApi(intellijDep()) { includeJars("log4j", "jdom") }
|
testApi(intellijDep()) { includeJars("log4j", "jdom") }
|
||||||
testRuntimeOnly(project(":kotlin-reflect"))
|
testRuntimeOnly(project(":kotlin-reflect"))
|
||||||
testRuntimeOnly(project(":core:descriptors.runtime"))
|
testRuntimeOnly(project(":core:descriptors.runtime"))
|
||||||
testRuntimeOnly(intellijDep()) { includeJars("lz4-java", "jna", rootProject = rootProject) }
|
testRuntimeOnly(intellijDep()) { includeJars("lz4-java", "jna", "idea_rt", rootProject = rootProject) }
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|||||||
@@ -25,11 +25,22 @@ dependencies {
|
|||||||
testApi(projectTests(":compiler:tests-compiler-utils"))
|
testApi(projectTests(":compiler:tests-compiler-utils"))
|
||||||
testApi(projectTests(":compiler:tests-common-jvm6"))
|
testApi(projectTests(":compiler:tests-common-jvm6"))
|
||||||
|
|
||||||
testRuntimeOnly(intellijDep()) {
|
/*
|
||||||
includeJars("jna", rootProject = rootProject)
|
* 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
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
testRuntimeOnly(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") }
|
|
||||||
testRuntimeOnly(toolsJar())
|
testRuntimeOnly(toolsJar())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,20 +56,33 @@ dependencies {
|
|||||||
testCompileOnly(project(":kotlin-reflect-api"))
|
testCompileOnly(project(":kotlin-reflect-api"))
|
||||||
testCompileOnly(toolsJar())
|
testCompileOnly(toolsJar())
|
||||||
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
testApi(intellijDep()) { includeJars("intellij-deps-fastutil-8.4.1-4") }
|
|
||||||
|
/*
|
||||||
|
* 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()) {
|
testApi(intellijDep()) {
|
||||||
|
includeJars(
|
||||||
|
"intellij-deps-fastutil-8.4.1-4",
|
||||||
|
"idea_rt",
|
||||||
|
"jps-model",
|
||||||
|
"platform-impl",
|
||||||
|
"streamex",
|
||||||
|
"jna",
|
||||||
|
rootProject = rootProject
|
||||||
|
)
|
||||||
|
}
|
||||||
|
testImplementation(intellijDep()) {
|
||||||
includeJars(
|
includeJars(
|
||||||
"guava",
|
"guava",
|
||||||
"trove4j",
|
"trove4j",
|
||||||
"asm-all",
|
"asm-all",
|
||||||
"log4j",
|
"log4j",
|
||||||
"jdom",
|
"jdom",
|
||||||
"jna",
|
|
||||||
rootProject = rootProject
|
rootProject = rootProject
|
||||||
)
|
)
|
||||||
isTransitive = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
testApiJUnit5()
|
testApiJUnit5()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,20 +31,11 @@ dependencies {
|
|||||||
|
|
||||||
testApi(intellijDep()) {
|
testApi(intellijDep()) {
|
||||||
includeJars(
|
includeJars(
|
||||||
"jps-model",
|
|
||||||
"extensions",
|
|
||||||
"util",
|
|
||||||
"platform-api",
|
|
||||||
"platform-impl",
|
|
||||||
"idea",
|
|
||||||
"idea_rt",
|
|
||||||
"guava",
|
"guava",
|
||||||
"trove4j",
|
"trove4j",
|
||||||
"asm-all",
|
"asm-all",
|
||||||
"log4j",
|
"log4j",
|
||||||
"jdom",
|
"jdom",
|
||||||
"streamex",
|
|
||||||
"bootstrap",
|
|
||||||
rootProject = rootProject
|
rootProject = rootProject
|
||||||
)
|
)
|
||||||
isTransitive = false
|
isTransitive = false
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testRuntimeOnly(intellijDep()) // Should come before compiler, because of "progarded" stuff needed for tests
|
|
||||||
testImplementation(kotlinStdlib())
|
testImplementation(kotlinStdlib())
|
||||||
|
|
||||||
testApiJUnit5()
|
testApiJUnit5()
|
||||||
|
|||||||
@@ -8,11 +8,10 @@ plugins {
|
|||||||
dependencies {
|
dependencies {
|
||||||
testApi(project(":kotlin-scripting-compiler"))
|
testApi(project(":kotlin-scripting-compiler"))
|
||||||
testApi(projectTests(":compiler:tests-common"))
|
testApi(projectTests(":compiler:tests-common"))
|
||||||
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
testImplementation(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
testApi(projectTests(":generators:test-generator"))
|
testApi(projectTests(":generators:test-generator"))
|
||||||
testRuntimeOnly(project(":kotlin-reflect"))
|
testRuntimeOnly(project(":kotlin-reflect"))
|
||||||
testRuntimeOnly(toolsJar())
|
testRuntimeOnly(toolsJar())
|
||||||
testRuntimeOnly(intellijDep())
|
|
||||||
testRuntimeOnly(intellijPluginDep("java"))
|
testRuntimeOnly(intellijPluginDep("java"))
|
||||||
if (isIdeaActive) testRuntimeOnly(files("${rootProject.projectDir}/dist/kotlinc/lib/kotlin-reflect.jar"))
|
if (isIdeaActive) testRuntimeOnly(files("${rootProject.projectDir}/dist/kotlinc/lib/kotlin-reflect.jar"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,12 +9,13 @@ dependencies {
|
|||||||
testImplementation(projectTests(":compiler:tests-common-new"))
|
testImplementation(projectTests(":compiler:tests-common-new"))
|
||||||
|
|
||||||
testApi(intellijDep()) {
|
testApi(intellijDep()) {
|
||||||
includeJars("groovy", "groovy-xml", rootProject = rootProject)
|
includeJars("gson", "groovy", "groovy-xml", rootProject = rootProject)
|
||||||
}
|
|
||||||
testApi(intellijDep()) {
|
|
||||||
includeJars("gson", rootProject = rootProject)
|
|
||||||
}
|
}
|
||||||
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
|
testRuntimeOnly(intellijDep()) {
|
||||||
|
includeJars("streamex", rootProject = rootProject)
|
||||||
|
}
|
||||||
|
|
||||||
testRuntimeOnly(intellijPluginDep("java"))
|
testRuntimeOnly(intellijPluginDep("java"))
|
||||||
api("org.jsoup:jsoup:1.14.2")
|
api("org.jsoup:jsoup:1.14.2")
|
||||||
if (isIdeaActive) testRuntimeOnly(files("${rootProject.projectDir}/dist/kotlinc/lib/kotlin-reflect.jar"))
|
if (isIdeaActive) testRuntimeOnly(files("${rootProject.projectDir}/dist/kotlinc/lib/kotlin-reflect.jar"))
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ dependencies {
|
|||||||
testApi(projectTests(":compiler:tests-common"))
|
testApi(projectTests(":compiler:tests-common"))
|
||||||
testApi(projectTests(":generators:test-generator"))
|
testApi(projectTests(":generators:test-generator"))
|
||||||
|
|
||||||
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
testApi(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
testRuntimeOnly(intellijDep()) { includeJars("platform-concurrency") }
|
testRuntimeOnly(intellijDep()) { includeJars("platform-concurrency", "idea_rt", rootProject = rootProject) }
|
||||||
testRuntimeOnly(jpsStandalone()) { includeJars("jps-model") }
|
testRuntimeOnly(jpsStandalone()) { includeJars("jps-model") }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ dependencies {
|
|||||||
|
|
||||||
testRuntimeOnly(project(":kotlinx-metadata-jvm"))
|
testRuntimeOnly(project(":kotlinx-metadata-jvm"))
|
||||||
|
|
||||||
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
testApi(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
|
|
||||||
testRuntimeOnly(intellijDep()) { includeJars("platform-concurrency", "platform-objectSerializer") }
|
testRuntimeOnly(intellijDep()) { includeJars("platform-concurrency", "platform-objectSerializer", "idea_rt") }
|
||||||
|
|
||||||
shadows(project(":kotlinx-metadata-jvm"))
|
shadows(project(":kotlinx-metadata-jvm"))
|
||||||
shadows("org.jetbrains.intellij.deps:asm-all:$kotlinpAsmVersion")
|
shadows("org.jetbrains.intellij.deps:asm-all:$kotlinpAsmVersion")
|
||||||
|
|||||||
@@ -40,6 +40,10 @@ dependencies {
|
|||||||
testImplementation(project(":kotlinx-metadata-klib")) { isTransitive = false }
|
testImplementation(project(":kotlinx-metadata-klib")) { isTransitive = false }
|
||||||
testImplementation(project(":kotlinx-metadata")) { isTransitive = false }
|
testImplementation(project(":kotlinx-metadata")) { isTransitive = false }
|
||||||
testImplementation(project(":native:kotlin-klib-commonizer-api"))
|
testImplementation(project(":native:kotlin-klib-commonizer-api"))
|
||||||
|
testApi(intellijCoreDep()) { includeJars("intellij-core")}
|
||||||
|
// testRuntimeOnly(intellijDep()) {
|
||||||
|
// includeJars("idea_rt", rootProject = rootProject)
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
val runCommonizer by tasks.registering(JavaExec::class) {
|
val runCommonizer by tasks.registering(JavaExec::class) {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ dependencies {
|
|||||||
testApi(projectTests(":compiler:tests-common"))
|
testApi(projectTests(":compiler:tests-common"))
|
||||||
testApi(commonDep("junit:junit"))
|
testApi(commonDep("junit:junit"))
|
||||||
|
|
||||||
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
testApi(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ dependencies {
|
|||||||
|
|
||||||
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "asm-all", rootProject = rootProject) }
|
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "asm-all", rootProject = rootProject) }
|
||||||
|
|
||||||
|
testApi(intellijDep()) { includeJars("platform-impl", rootProject = rootProject) }
|
||||||
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
testRuntimeOnly(project(":kotlin-compiler"))
|
testRuntimeOnly(project(":kotlin-compiler"))
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,7 @@ dependencies {
|
|||||||
testApi(project(":compiler:cli"))
|
testApi(project(":compiler:cli"))
|
||||||
testApi(projectTests(":compiler:tests-common"))
|
testApi(projectTests(":compiler:tests-common"))
|
||||||
testApi(commonDep("junit:junit"))
|
testApi(commonDep("junit:junit"))
|
||||||
|
testApi(intellijCoreDep()) { includeJars("intellij-core")}
|
||||||
testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|||||||
Reference in New Issue
Block a user