From a8d9e23577cc8a145d3beb4cd800e8b86be1f7b3 Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Mon, 5 Dec 2022 14:13:11 +0100 Subject: [PATCH] Fix "Could not get unknown property 'metadataRoot' for root project" --- .../src/main/groovy/org.graalvm.internal.tck-base.gradle | 2 +- .../src/main/groovy/org.graalvm.internal.tck.gradle | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/tck-build-logic/src/main/groovy/org.graalvm.internal.tck-base.gradle b/tests/tck-build-logic/src/main/groovy/org.graalvm.internal.tck-base.gradle index 9cc842d50..036be676e 100644 --- a/tests/tck-build-logic/src/main/groovy/org.graalvm.internal.tck-base.gradle +++ b/tests/tck-build-logic/src/main/groovy/org.graalvm.internal.tck-base.gradle @@ -1,3 +1,3 @@ import org.graalvm.internal.tck.harness.TckExtension -def testUtils = project.extensions.create("tck", TckExtension, project) +TckExtension testUtils = project.extensions.create("tck", TckExtension, project) diff --git a/tests/tck-build-logic/src/main/groovy/org.graalvm.internal.tck.gradle b/tests/tck-build-logic/src/main/groovy/org.graalvm.internal.tck.gradle index 53e061340..1dfbe581d 100644 --- a/tests/tck-build-logic/src/main/groovy/org.graalvm.internal.tck.gradle +++ b/tests/tck-build-logic/src/main/groovy/org.graalvm.internal.tck.gradle @@ -31,14 +31,14 @@ tasks.register("checkstyle") { dependsOn tasks.withType(Checkstyle) } -def metadataPath = Objects.requireNonNullElse( - System.getenv("GVM_TCK_MD"), - providers.gradleProperty('metadata.dir').get() +String metadataPath = Objects.requireNonNullElse( + System.getenv("GVM_TCK_MD"), + providers.gradleProperty('metadata.dir').get() ) File metadataFile if (!metadataPath.startsWith("/")) { - metadataFile = metadataRoot.resolve(metadataPath).toFile() + metadataFile = file(tck.metadataRoot).toPath().resolve(metadataPath).toFile() } else { metadataFile = file(metadataPath) }