GenerateTests: extract IDE part into separate module

It's refactoring-preparation commit. In later commits I will add possibility
to disable IDE modules with flags in gradle build (first step towards
removing IDE modules from kotlin repo). Thus, we need to extract IDE tests
generator in separate module for being possible to disable it with flags
This commit is contained in:
Nikita Bobko
2021-05-20 16:00:56 +02:00
parent ac6c810d25
commit 897dafc7f3
5 changed files with 1731 additions and 1697 deletions
+5 -24
View File
@@ -50,27 +50,9 @@ dependencies {
testCompile(protobufCompareSourceSet.output)
testCompile(projectTests(":compiler:cli"))
testCompile(projectTests(":idea:idea-maven"))
testCompile(projectTests(":idea:idea-fir"))
testCompile(projectTests(":idea:idea-fir-performance-tests"))
testCompile(projectTests(":idea:idea-frontend-fir"))
testCompile(projectTests(":idea:idea-frontend-fir:idea-fir-low-level-api"))
testCompile(projectTests(":idea:idea-fir-fe10-binding"))
testCompile(projectTests(":j2k"))
testCompile(projectTests(":nj2k"))
if (Ide.IJ()) {
testCompile(projectTests(":libraries:tools:new-project-wizard:new-project-wizard-cli"))
testCompile(projectTests(":idea:idea-new-project-wizard"))
}
testCompile(projectTests(":idea:idea-android"))
testCompile(projectTests(":idea:performanceTests"))
testCompile(projectTests(":idea:scripting-support"))
testCompile(projectTests(":jps-plugin"))
testCompile(projectTests(":plugins:jvm-abi-gen"))
testCompile(projectTests(":plugins:android-extensions-compiler"))
testCompile(projectTests(":plugins:android-extensions-ide"))
testCompile(projectTests(":plugins:parcelize:parcelize-compiler"))
testCompile(projectTests(":plugins:parcelize:parcelize-ide"))
testCompile(projectTests(":kotlin-annotation-processing"))
testCompile(projectTests(":kotlin-annotation-processing-cli"))
testCompile(projectTests(":kotlin-allopen-compiler-plugin"))
@@ -78,13 +60,8 @@ dependencies {
testCompile(projectTests(":plugins:lombok:lombok-compiler-plugin"))
testCompile(projectTests(":kotlin-sam-with-receiver-compiler-plugin"))
testCompile(projectTests(":kotlinx-serialization-compiler-plugin"))
testCompile(projectTests(":kotlinx-serialization-ide-plugin"))
testCompile(projectTests(":plugins:fir:fir-plugin-prototype"))
testCompile(projectTests(":plugins:uast-kotlin"))
testCompile(projectTests(":plugins:uast-kotlin-fir"))
testCompile(projectTests(":idea:jvm-debugger:jvm-debugger-test"))
testCompile(projectTests(":generators:test-generator"))
testCompile(projectTests(":idea"))
testCompileOnly(project(":kotlin-reflect-api"))
testRuntime(intellijDep()) { includeJars("idea_rt") }
testRuntime(project(":kotlin-reflect"))
@@ -100,7 +77,11 @@ projectTest(parallel = true) {
workingDir = rootDir
}
val generateTests by generator("org.jetbrains.kotlin.generators.tests.GenerateTestsKt")
val generateTests by generator("org.jetbrains.kotlin.generators.tests.GenerateTestsKt") {
if (kotlinBuildProperties.getOrNull("attachedIntellijVersion") == null) {
dependsOn(":generators:idea-generator:generateIdeaTests")
}
}
val generateProtoBuf by generator("org.jetbrains.kotlin.generators.protobuf.GenerateProtoBufKt", protobufSourceSet)
val generateProtoBufCompare by generator("org.jetbrains.kotlin.generators.protobuf.GenerateProtoBufCompare", protobufCompareSourceSet)
@@ -0,0 +1,39 @@
plugins {
kotlin("jvm")
id("jps-compatible")
}
sourceSets {
"main" { java.srcDirs("main") }
"test" { projectDefault() }
}
dependencies {
compile(kotlinStdlib("jdk8"))
testCompile(projectTests(":idea:idea-maven"))
testCompile(projectTests(":idea:idea-fir"))
testCompile(projectTests(":idea:idea-fir-performance-tests"))
testCompile(projectTests(":idea:idea-frontend-fir"))
testCompile(projectTests(":idea:idea-frontend-fir:idea-fir-low-level-api"))
testCompile(projectTests(":idea:idea-fir-fe10-binding"))
testCompile(projectTests(":j2k"))
testCompile(projectTests(":nj2k"))
if (Ide.IJ()) {
testCompile(projectTests(":libraries:tools:new-project-wizard:new-project-wizard-cli"))
testCompile(projectTests(":idea:idea-new-project-wizard"))
}
testCompile(projectTests(":idea:performanceTests"))
testCompile(projectTests(":idea:scripting-support"))
testCompile(projectTests(":jps-plugin"))
testCompile(projectTests(":plugins:uast-kotlin"))
testCompile(projectTests(":plugins:uast-kotlin-fir"))
testCompile(projectTests(":idea:jvm-debugger:jvm-debugger-test"))
testCompile(projectTests(":idea"))
testCompile(projectTests(":idea:idea-android"))
testCompile(projectTests(":generators:test-generator"))
testCompile(projectTests(":plugins:parcelize:parcelize-ide"))
testCompile(projectTests(":kotlinx-serialization-ide-plugin"))
testCompile(projectTests(":compiler:tests-common"))
}
val generateIdeaTests by generator("org.jetbrains.kotlin.generators.tests.idea.GenerateTestsKt")
File diff suppressed because it is too large Load Diff
+1
View File
@@ -249,6 +249,7 @@ include ":benchmarks",
":compiler:tests-different-jdk",
":compiler:tests-spec",
":generators",
":generators:idea-generator",
":generators:test-generator",
":tools:kotlinp",
":kotlin-project-model",