diff --git a/build.sbt b/build.sbt index 12ca0dedd3..4229025f6c 100644 --- a/build.sbt +++ b/build.sbt @@ -195,6 +195,10 @@ lazy val cli = crossProject(JVMPlatform).withoutSuffixFor(JVMPlatform) val isStatic = sys.env.get("NATIVE_IMAGE_STATIC").exists(_.toBoolean) if (isStatic) Seq("--static") else Nil }, + nativeImageOptions ++= Seq( + "org.scalafmt.cli.ScalafmtDynamicRunner$", + "coursierapi.internal.jniutils.ApiInternalNativeApi", + ).map(cls => s"--initialize-at-run-time=$cls"), ).dependsOn(core, dynamic).enablePlugins(NativeImagePlugin) lazy val tests = crossProject(JVMPlatform).withoutSuffixFor(JVMPlatform)