[Build] Migrate most of the build logic from Project.buildDir usage
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
This commit is contained in:
committed by
Space Team
parent
b784544f8d
commit
a19bd2ed2e
@@ -55,7 +55,7 @@ projectTest(
|
||||
defineJDKEnvVariables = listOf(JdkMajorVersion.JDK_1_8, JdkMajorVersion.JDK_11_0, JdkMajorVersion.JDK_17_0)
|
||||
) {
|
||||
dependsOn(":dist")
|
||||
useJsIrBoxTests(version = version, buildDir = "$buildDir/")
|
||||
useJsIrBoxTests(version = version, buildDir = layout.buildDirectory)
|
||||
|
||||
workingDir = rootDir
|
||||
systemProperty("kotlin.test.script.classpath", testSourceSet.output.classesDirs.joinToString(File.pathSeparator))
|
||||
|
||||
@@ -68,7 +68,7 @@ fun Test.configureTest(configureJUnit: JUnitPlatformOptions.() -> Unit = {}) {
|
||||
useJUnitPlatform {
|
||||
configureJUnit()
|
||||
}
|
||||
useJsIrBoxTests(version = version, buildDir = "$buildDir/")
|
||||
useJsIrBoxTests(version = version, buildDir = layout.buildDirectory)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -43,12 +43,12 @@ sourceSets {
|
||||
|
||||
projectTest(parallel = true) {
|
||||
workingDir = rootDir
|
||||
useJsIrBoxTests(version = version, buildDir = "$buildDir/")
|
||||
useJsIrBoxTests(version = version, buildDir = layout.buildDirectory)
|
||||
}
|
||||
|
||||
projectTest("testJvmICWithJdk11", parallel = true) {
|
||||
workingDir = rootDir
|
||||
useJsIrBoxTests(version = version, buildDir = "$buildDir/")
|
||||
useJsIrBoxTests(version = version, buildDir = layout.buildDirectory)
|
||||
filter {
|
||||
includeTestsMatching("org.jetbrains.kotlin.incremental.IncrementalK1JvmCompilerRunnerTestGenerated*")
|
||||
includeTestsMatching("org.jetbrains.kotlin.incremental.IncrementalK2JvmCompilerRunnerTestGenerated*")
|
||||
|
||||
@@ -31,7 +31,7 @@ sourceSets {
|
||||
|
||||
ant.importBuild("buildLexer.xml")
|
||||
|
||||
ant.properties["builddir"] = buildDir.absolutePath
|
||||
ant.properties["builddir"] = layout.buildDirectory.get().asFile.absolutePath
|
||||
|
||||
tasks.findByName("lexer")!!.apply {
|
||||
doFirst {
|
||||
|
||||
@@ -32,7 +32,7 @@ val testDataDir = project(":compiler").projectDir.resolve("testData/klib/dump-ab
|
||||
|
||||
projectTest(jUnitMode = JUnitMode.JUnit5) {
|
||||
inputs.dir(testDataDir)
|
||||
outputs.dir("$buildDir/t")
|
||||
outputs.dir(layout.buildDirectory.dir("t"))
|
||||
|
||||
dependsOn(":dist")
|
||||
workingDir = rootDir
|
||||
|
||||
Reference in New Issue
Block a user