Files
kotlin-fork/jps/jps-plugin/build.gradle.kts
T
Nikita Bobko c1f2d66ed8 Kotlin JPS plugin: drop intellij-core dependency
Drop dependency because
https://youtrack.jetbrains.com/issue/IDEA-292483/UnsupportedClassVersionError-when-trying-to-run-JUnit5-unit-test#focus=Comments-27-6034750.0-0

IDEA plans to drop `PathUtil` from JPS classpath, we should prepare to
that

`KotlinFacetSettingsProvider` isn't used in jps so it was moved into
intellij repo. It was moved to
`community/plugins/kotlin/idea/src/org/jetbrains/kotlin/config/KotlinFacetSettingsProvider.kt`
path (so you can find it git history)

Review: KT-MR-6195
2022-04-29 14:51:03 +02:00

117 lines
4.6 KiB
Kotlin

plugins {
kotlin("jvm")
id("jps-compatible")
}
val compilerModules: Array<String> by rootProject.extra
val generateTests by generator("org.jetbrains.kotlin.jps.GenerateJpsPluginTestsKt") {
javaLauncher.set(
javaToolchains.launcherFor {
languageVersion.set(JavaLanguageVersion.of(11))
}
)
}
dependencies {
api(project(":kotlin-build-common"))
api(project(":core:descriptors"))
api(project(":core:descriptors.jvm"))
api(project(":kotlin-compiler-runner-unshaded"))
api(project(":kotlin-compiler-runner"))
api(project(":daemon-common"))
api(project(":daemon-common-new"))
api(project(":kotlin-daemon-client"))
api(project(":kotlin-daemon"))
compileOnly(project(":jps:jps-platform-api-signatures"))
testImplementation(projectTests(":generators:test-generator"))
api(project(":compiler:frontend.java"))
api(project(":js:js.frontend"))
api(project(":kotlin-preloader"))
api(project(":jps:jps-common"))
compileOnly(commonDependency("org.jetbrains.intellij.deps.fastutil:intellij-deps-fastutil"))
compileOnly(jpsModel())
compileOnly(jpsModelImpl())
compileOnly(jpsBuild())
compileOnly(jpsModelSerialization())
testApi(jpsModel())
// testFramework includes too many unnecessary dependencies. Here we manually list all we need to successfully run JPS tests
testApi(testFramework()) { isTransitive = false }
testApi("com.jetbrains.intellij.platform:test-framework-core:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:analysis-impl:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:boot:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:analysis:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:project-model:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:object-serializer:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:code-style:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:ide-impl:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:ide:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:util-ui:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:concurrency:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:editor:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:core-ui:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:lang:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:lang-impl:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.jetbrains.intellij.platform:util-ex:$intellijVersion") { isTransitive = false }
testCompileOnly(project(":kotlin-reflect-api"))
testApi(project(":compiler:incremental-compilation-impl"))
testApi(projectTests(":compiler:tests-common"))
testApi(projectTests(":compiler:incremental-compilation-impl"))
testApi(commonDependency("junit:junit"))
testApi(project(":kotlin-test:kotlin-test-jvm"))
testApi(projectTests(":kotlin-build-common"))
testApi(projectTests(":compiler:test-infrastructure-utils"))
testCompileOnly(jpsBuild())
testApi(devKitJps())
testApi(jpsBuildTest())
compilerModules.forEach {
testRuntimeOnly(project(it))
}
testRuntimeOnly(toolsJar())
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":kotlin-script-runtime"))
testImplementation("org.projectlombok:lombok:1.18.16")
}
sourceSets {
"main" {
projectDefault()
resources.srcDir("resources-en")
}
"test" {
Ide.IJ {
java.srcDirs("jps-tests/test")
}
}
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
}
tasks.compileJava {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
tasks.compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
projectTest(parallel = true) {
// do not replace with compile/runtime dependency,
// because it forces Intellij reindexing after each compiler change
dependsOn(":kotlin-compiler:dist")
dependsOn(":kotlin-stdlib-js-ir:packFullRuntimeKLib")
workingDir = rootDir
}
testsJar {}