How to pass --enable-preview in org.graalvm.buildtools.native plugin?

69 Views Asked by At

I would like to configure the Gradle native plugin in a way that it will have --enable-preview enabled.

When I try to add those properties to compileOptions I get access violation:

Cannot access 'compileOptions': it is protected/protected and package/ for synthetic extension in ''

1

There are 1 best solutions below

0
On BEST ANSWER

As suggested by @peterz:

graalvmNative {
    binaries {
        all {
            jvmArgs("--enable-preview")
        }
    }
}