a19bd2ed2e
It's going to be deprecated in Gradle 8.3 There's currently no way to pass a `org.gradle.api.provider.Provider` to the JavaExec.systemProperty or Test.systemProperty. There's a workaround using `org.gradle.process.CommandLineArgumentProvider`, but I intentionally don't rework these calls as Gradle is going to allow passing providers to configure system properties: https://github.com/gradle/gradle/issues/12247#issuecomment-1568427242 ^KTI-1473 In Progress
74 lines
2.4 KiB
Kotlin
74 lines
2.4 KiB
Kotlin
plugins {
|
|
kotlin("jvm")
|
|
id("jps-compatible")
|
|
}
|
|
|
|
val compilerModules: Array<String> by rootProject.extra
|
|
val otherCompilerModules = compilerModules.filter { it != path }
|
|
|
|
val antLauncherJar by configurations.creating
|
|
|
|
dependencies {
|
|
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"))
|
|
|
|
testApi(kotlinStdlib())
|
|
|
|
testImplementation(libs.junit4)
|
|
testCompileOnly(project(":kotlin-test:kotlin-test-jvm"))
|
|
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
|
|
testApi(projectTests(":compiler:tests-common"))
|
|
testApi(projectTests(":compiler:tests-common-new"))
|
|
testApi(projectTests(":compiler:fir:raw-fir:psi2fir"))
|
|
testApi(projectTests(":compiler:fir:raw-fir:light-tree2fir"))
|
|
testApi(projectTests(":compiler:fir:analysis-tests:legacy-fir-tests"))
|
|
testApi(projectTests(":generators:test-generator"))
|
|
testApi(project(":compiler:ir.ir2cfg"))
|
|
testApi(project(":compiler:ir.tree")) // used for deepCopyWithSymbols call that is removed by proguard from the compiler TODO: make it more straightforward
|
|
testApi(project(":kotlin-scripting-compiler"))
|
|
|
|
otherCompilerModules.forEach {
|
|
testCompileOnly(project(it))
|
|
}
|
|
|
|
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
|
|
testImplementation(toolsJar())
|
|
|
|
antLauncherJar(commonDependency("org.apache.ant", "ant"))
|
|
antLauncherJar(toolsJar())
|
|
}
|
|
|
|
optInToExperimentalCompilerApi()
|
|
|
|
sourceSets {
|
|
"main" {}
|
|
"test" {
|
|
projectDefault()
|
|
generatedTestDir()
|
|
}
|
|
}
|
|
|
|
projectTest(
|
|
parallel = true,
|
|
defineJDKEnvVariables = listOf(JdkMajorVersion.JDK_1_8, JdkMajorVersion.JDK_11_0, JdkMajorVersion.JDK_17_0)
|
|
) {
|
|
dependsOn(":dist")
|
|
useJsIrBoxTests(version = version, buildDir = layout.buildDirectory)
|
|
|
|
workingDir = rootDir
|
|
systemProperty("kotlin.test.script.classpath", testSourceSet.output.classesDirs.joinToString(File.pathSeparator))
|
|
val antLauncherJarPathProvider = project.provider {
|
|
antLauncherJar.asPath
|
|
}
|
|
doFirst {
|
|
systemProperty("kotlin.ant.classpath", antLauncherJarPathProvider.get())
|
|
systemProperty("kotlin.ant.launcher.class", "org.apache.tools.ant.Main")
|
|
}
|
|
}
|
|
|
|
val generateTestData by generator("org.jetbrains.kotlin.generators.tests.GenerateCompilerTestDataKt")
|
|
|
|
testsJar()
|