Move jvmOptions to main compile operation

This commit is contained in:
Erik C. Thauvin 2025-03-23 02:18:31 -07:00
parent 3a012bf012
commit 125e9f7327
Signed by: erik
GPG key ID: 776702A6A2DA330E
6 changed files with 65 additions and 72 deletions

View file

@ -182,10 +182,14 @@ class CompileKotlinOperationTest {
op.compileOptions().verbose(true);
op.compileOptions().jdkRelease("17");
op.compileOptions().jvmOptions().enableNativeAccess(JvmOptions.ALL_UNNAMED);
if (!CompileKotlinOperation.isWindows()) {
op.jvmOptions().enableNativeAccess(JvmOptions.ALL_UNNAMED);
assertThat(op.jvmOptions()).containsExactly("--enable-native-access=ALL-UNNAMED");
}
var args = op.compileOptions().args();
var matches = List.of("-Xjdk-release=17", "-J--enable-native-access=ALL-UNNAMED", "-no-stdlib", "-verbose");
var matches = List.of("-Xjdk-release=17", "-no-stdlib", "-verbose");
assertThat(args).as(args + " == " + matches).isEqualTo(matches);
op.execute();