Skip to content

Commit

Permalink
Workaround for Gradle bug
Browse files Browse the repository at this point in the history
This works around a bug in Gradle which prevents the service provider from
being registered on the native image tasks.

See gradle/gradle#17559
  • Loading branch information
melix authored and lazar-mitrovic committed Jun 28, 2021
1 parent d550b29 commit f432b2f
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@
*/
package org.graalvm.buildtools.gradle.tasks;

import org.graalvm.buildtools.gradle.GradleUtils;
import org.graalvm.buildtools.gradle.NativeImageService;
import org.graalvm.buildtools.Utils;
import org.graalvm.buildtools.gradle.GradleUtils;
import org.graalvm.buildtools.gradle.dsl.JUnitPlatformOptions;
import org.graalvm.buildtools.gradle.internal.GraalVMLogger;
import org.gradle.api.Project;
Expand Down Expand Up @@ -115,8 +114,10 @@ public File getOutputFile() {
}

// This property provides access to the service instance
// It should be Property<NativeImageService> but because of a bug in Gradle
// we have to use a more generic type, see https://github.com/gradle/gradle/issues/17559
@Internal
public abstract Property<NativeImageService> getServer();
public abstract Property<Object> getServer();

@Override
@SuppressWarnings("ConstantConditions")
Expand Down

0 comments on commit f432b2f

Please sign in to comment.