Skip to content

Commit

Permalink
Update native-image configs
Browse files Browse the repository at this point in the history
  • Loading branch information
kubukoz committed Oct 23, 2021
1 parent 6bfc685 commit a50c71e
Show file tree
Hide file tree
Showing 7 changed files with 723 additions and 763 deletions.
14 changes: 2 additions & 12 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,7 @@ ThisBuild / githubWorkflowPublish := Seq(
ThisBuild / githubWorkflowGeneratedCI ~= {
_.map {
case job if job.id == "publish" =>
job.copy(
oses = List("macos-10.15")
// steps = job.steps.map {
// case step: WorkflowStep.Use if step.name.exists(_.startsWith("Download target directories")) =>
// step
// .copy(
// params = step.params + ("name" -> step.params("name").replace("${{ matrix.os }}", "ubuntu-latest"))
// )

// case step => step
// }
)
job.copy(oses = List("macos-10.15"))
case job =>
job
}
Expand Down Expand Up @@ -149,6 +138,7 @@ val front = project
val nativeImageSettings: Seq[Setting[_]] = Seq(
Compile / mainClass := Some("com.kubukoz.next.Main"),
nativeImageVersion := "21.2.0",
nativeImageAgentOutputDir := (Compile / resourceDirectory).value,
nativeImageOptions ++= Seq(
s"-H:ReflectionConfigurationFiles=${(Compile / resourceDirectory).value / "reflect-config.json"}",
s"-H:ResourceConfigurationFiles=${(Compile / resourceDirectory).value / "resource-config.json"}",
Expand Down
16 changes: 16 additions & 0 deletions src/main/resources/jni-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[
{
"name":"java.lang.ClassLoader",
"methods":[
{"name":"getPlatformClassLoader","parameterTypes":[] },
{"name":"loadClass","parameterTypes":["java.lang.String"] }
]
},
{
"name":"jdk.internal.loader.ClassLoaders$PlatformClassLoader"
},
{
"name":"org.graalvm.nativebridge.jni.JNIExceptionWrapperEntryPoints",
"methods":[{"name":"getClassName","parameterTypes":["java.lang.Class"] }]
}
]
8 changes: 8 additions & 0 deletions src/main/resources/predefined-classes-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"type":"agent-extracted",
"classes":[
]
}
]

2 changes: 2 additions & 0 deletions src/main/resources/proxy-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[
]
Loading

0 comments on commit a50c71e

Please sign in to comment.