Add Kotlin compile options for JDK 24

This commit is contained in:
Erik C. Thauvin 2025-03-20 09:46:00 -07:00
parent 679fba1441
commit 28b8b05cca
Signed by: erik
GPG key ID: 776702A6A2DA330E

View file

@ -37,6 +37,7 @@ import rife.bld.extension.*;
import rife.bld.extension.dokka.LoggingLevel; import rife.bld.extension.dokka.LoggingLevel;
import rife.bld.extension.dokka.OutputFormat; import rife.bld.extension.dokka.OutputFormat;
import rife.bld.extension.dokka.SourceSet; import rife.bld.extension.dokka.SourceSet;
import rife.bld.extension.kotlin.CompileOptions;
import rife.bld.extension.kotlin.CompilerPlugin; import rife.bld.extension.kotlin.CompilerPlugin;
import rife.bld.operations.exceptions.ExitStatusException; import rife.bld.operations.exceptions.ExitStatusException;
import rife.bld.publish.PomBuilder; import rife.bld.publish.PomBuilder;
@ -138,8 +139,11 @@ public class AkismetBuild extends Project {
@Override @Override
public void compile() throws Exception { public void compile() throws Exception {
genver(); genver();
final var options = new CompileOptions();
options.jvmOptions().add("--enable-native-access=ALL-UNNAMED");
var op = new CompileKotlinOperation() var op = new CompileKotlinOperation()
.fromProject(this) .fromProject(this)
.compileOptions(options)
.plugins(CompilerPlugin.KOTLIN_SERIALIZATION); .plugins(CompilerPlugin.KOTLIN_SERIALIZATION);
op.compileOptions().verbose(true); op.compileOptions().verbose(true);
op.execute(); op.execute();