From 536fd980f82c6d3b59c5ad60e7878a69ba0959bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lazar=20Mitrovi=C4=87?= Date: Mon, 27 Jun 2022 22:35:15 +0200 Subject: [PATCH] Restore NativeImagePlugin.NATIVE_TEST_EXTENSION --- .../java/org/graalvm/buildtools/gradle/NativeImagePlugin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/native-gradle-plugin/src/main/java/org/graalvm/buildtools/gradle/NativeImagePlugin.java b/native-gradle-plugin/src/main/java/org/graalvm/buildtools/gradle/NativeImagePlugin.java index f7dc15a66..3fed1282d 100644 --- a/native-gradle-plugin/src/main/java/org/graalvm/buildtools/gradle/NativeImagePlugin.java +++ b/native-gradle-plugin/src/main/java/org/graalvm/buildtools/gradle/NativeImagePlugin.java @@ -139,6 +139,7 @@ public class NativeImagePlugin implements Plugin { public static final String NATIVE_TEST_COMPILE_TASK_NAME = "nativeTestCompile"; public static final String NATIVE_TEST_TASK_NAME = "nativeTest"; public static final String NATIVE_MAIN_EXTENSION = "main"; + public static final String NATIVE_TEST_EXTENSION = "test"; public static final String DEPRECATED_NATIVE_BUILD_EXTENSION = "nativeBuild"; public static final String DEPRECATED_NATIVE_TEST_EXTENSION = "nativeTest"; @@ -248,7 +249,7 @@ private void configureJavaProject(Project project, Provider t.doFirst("Warn about deprecation", task -> task.getLogger().warn("Task " + DEPRECATED_NATIVE_BUILD_TASK + " is deprecated. Use " + NATIVE_COMPILE_TASK_NAME + " instead.")); }); - graalExtension.registerTestBinary("test", config -> { + graalExtension.registerTestBinary(NATIVE_TEST_EXTENSION, config -> { config.forTestTask(tasks.named("test", Test.class)); config.usingSourceSet(GradleUtils.findSourceSet(project, SourceSet.TEST_SOURCE_SET_NAME)); });