Hey guys, I have a project which requires preview ...
# community-support
a
Hey guys, I have a project which requires preview features of Java 21 and I have added these lines to the config:
Copy code
tasks.withType(JavaCompile).configureEach {
    options.compilerArgs += "--enable-preview"
}

tasks.withType(Test).configureEach {
    jvmArgs += "--enable-preview"
}

tasks.withType(JavaExec).configureEach {
    jvmArgs += '--enable-preview'
}
It builds fine locally, but it fails on GitHub (when the Gradle Build workflow runs) with these errors:
(use --enable-preview to enable string templates)
Is it a bug or I'm missing something?