PCQA-1107 explicitly declare JVM version

otherwise the system version will be used, e.g., Java 8 on CI,
and it will fail as `com.jetbrains.python.envs` is compiled with
Java 17


(cherry picked from commit cc38a0bf6f3376d7c614a68646ccdab7088e2f8d)

IJ-MR-169407

GitOrigin-RevId: 0594621cdf3bb406423b9f7183d3b6e1daa4336d
This commit is contained in:
Pavel Karateev
2025-07-17 17:01:57 +00:00
committed by intellij-monorepo-bot
parent 17c28b6906
commit 9a80a2d9ef
@@ -6,9 +6,16 @@ import kotlin.io.path.createLinkPointingTo
import kotlin.io.path.exists
plugins {
id("java")
id("com.jetbrains.python.envs") version "0.0.33"
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
enum class PythonType { PYTHON, CONDA }
// If you decided to change a default path, make sure to update in `community/python/testSrc/com/jetbrains/env/PyEnvTestSettings.kt`
val pythonsDirectory = File(System.getenv().getOrDefault("PYCHARM_PYTHONS", File(buildDir, "pythons").path))
@@ -75,7 +82,7 @@ tasks.register<Exec>("kill_python_processes") {
commandLine("powershell", """"Get-Process | where {${'$'}_.Name -ieq \"python\"} | Stop-Process"""")
}
tasks.register<Delete>("clean") {
tasks.named<Delete>("clean") {
dependsOn("kill_python_processes")
delete(project.layout.buildDirectory)
@@ -83,7 +90,7 @@ tasks.register<Delete>("clean") {
delete(venvsDirectory)
}
tasks.register("build") {
tasks.named("build") {
dependsOn(tasks.matching { it.name.startsWith("setup_") || it.name == "updateConda" }, "clean", "copy_buildserver_win_fix")
}