Skip to content

Commit

Permalink
Use native-image configuration files. Fixes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
jordeu committed Nov 2, 2021
1 parent 089c45a commit a0ca8e7
Show file tree
Hide file tree
Showing 6 changed files with 2,056 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ license {

application {
mainClass.set("io.seqera.tower.agent.Agent")
applicationDefaultJvmArgs = ["-agentlib:native-image-agent=config-merge-dir=conf/"]
}

String gitVersion() {
Expand Down Expand Up @@ -113,6 +114,7 @@ graalvmNative {
main {
imageName = 'tw-agent'
mainClass = 'io.seqera.tower.agent.Agent'
configurationFileDirectories.from(file('conf'))
buildArgs(DefaultNativePlatform.currentOperatingSystem.isLinux() ? ['--static', '--libc=musl'] : [])
}

Expand Down
37 changes: 37 additions & 0 deletions conf/jni-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[
{
"name":"com.sun.management.internal.DiagnosticCommandArgumentInfo",
"methods":[{"name":"<init>","parameterTypes":["java.lang.String","java.lang.String","java.lang.String","java.lang.String","boolean","boolean","boolean","int"] }]
},
{
"name":"com.sun.management.internal.DiagnosticCommandArgumentInfo[]"
},
{
"name":"com.sun.management.internal.DiagnosticCommandInfo",
"methods":[{"name":"<init>","parameterTypes":["java.lang.String","java.lang.String","java.lang.String","java.lang.String","java.lang.String","java.lang.String","boolean","java.util.List"] }]
},
{
"name":"com.sun.management.internal.DiagnosticCommandInfo[]"
},
{
"name":"java.lang.ClassLoader",
"methods":[{"name":"getPlatformClassLoader","parameterTypes":[] }]
},
{
"name":"java.util.Arrays",
"methods":[{"name":"asList","parameterTypes":["java.lang.Object[]"] }]
},
{
"name":"sun.management.VMManagementImpl",
"fields":[
{"name":"compTimeMonitoringSupport"},
{"name":"currentThreadCpuTimeSupport"},
{"name":"objectMonitorUsageSupport"},
{"name":"otherThreadCpuTimeSupport"},
{"name":"remoteDiagnosticCommandsSupport"},
{"name":"synchronizerUsageSupport"},
{"name":"threadAllocatedMemorySupport"},
{"name":"threadContentionMonitoringSupport"}
]
}
]
2 changes: 2 additions & 0 deletions conf/proxy-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[
]
Loading

0 comments on commit a0ca8e7

Please sign in to comment.