diff --git a/build.sbt b/build.sbt index 323dbca..d44c8ea 100644 --- a/build.sbt +++ b/build.sbt @@ -5,7 +5,7 @@ import scala.collection.mutable.ArrayBuffer import scala.util.Try import scala.sys.process._ -val jnaVersion = "5.12.0" +val jnaVersion = "5.19.0" val jna = "net.java.dev.jna" % "jna" % jnaVersion val jnaPlatform = "net.java.dev.jna" % "jna-platform" % jnaVersion @@ -105,6 +105,22 @@ buildWin32X86_64 / skip := { }, _.isEmpty) } Test / fork := true +Test / javaOptions ++= { + import scala.util.Properties + if (Properties.isJavaAtLeast("11")) Seq("--enable-native-access=ALL-UNNAMED") + else Nil +} +Test / testGrouping := { + val tests = (Test / definedTests).value + tests + .groupBy(_.name) + .map { + case (name, tests) => + val options = (Test / forkOptions).value + new Tests.Group(name, tests, Tests.SubProcess(options)) + } + .toSeq +} clangfmt / fileInputs += baseDirectory.value.toGlob / "jni" / "*.c" commands += Command.command("buildNativeArtifacts") { state => "buildLinuxX86_64" :: "buildLinuxAarch64" :: "buildDarwin" :: "buildWin32X86_64" :: state