diff --git a/build.gradle b/build.gradle index 97e3e8f..f267114 100644 --- a/build.gradle +++ b/build.gradle @@ -29,9 +29,6 @@ dependencies { implementation 'org.jgrapht:jgrapht-io:1.5.2' implementation 'com.github.javaparser:javaparser-core:3.25.10' -// implementation 'org.graalvm.polyglot:js:24.0.1' -// implementation 'guru.nidi.com.eclipsesource.j2v8:j2v8_macosx_x86_64:4.6.0' -// implementation 'guru.nidi.com.eclipsesource.j2v8:j2v8_linux_x86_64:4.6.0' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.shell:spring-shell-test' @@ -50,7 +47,10 @@ graalvmNative { } binaries { main { + buildArgs.add('--verbose') buildArgs.add('-H:IncludeResources=.*js$') + buildArgs.add("-H:ReflectionConfigurationFiles=${projectDir}/src/main/resources/META-INF/native-image/reflect-config.json") + buildArgs.add("-H:ResourceConfigurationFiles=${projectDir}/src/main/resources/META-INF/native-image/resource-config.json") } } } diff --git a/src/main/resources/META-INF/native-image/reflect-config.json b/src/main/resources/META-INF/native-image/reflect-config.json new file mode 100644 index 0000000..15f8304 --- /dev/null +++ b/src/main/resources/META-INF/native-image/reflect-config.json @@ -0,0 +1,16 @@ +[ + { + "name": "com.github.javaparser.ast.body.FieldDeclaration", + "allPublic": true, + "allDeclaredConstructors": true, + "allDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name" : "com.github.javaparser.ast.expr.VariableDeclarationExpr", + "allPublic" : true, + "allDeclaredConstructors" : true, + "allDeclaredMethods" : true, + "allDeclaredFields" : true + } +] \ No newline at end of file diff --git a/src/main/resources/META-INF/native-image/resource-config.json b/src/main/resources/META-INF/native-image/resource-config.json new file mode 100644 index 0000000..ae02009 --- /dev/null +++ b/src/main/resources/META-INF/native-image/resource-config.json @@ -0,0 +1,8 @@ +{ + "resources": { + "includes": [ + {"pattern" : "org/apache/commons/exec/CommandLine.class"}, + {"pattern" : "org/apache/batik/transcoder/Transcoder.class"} + ] + } +} \ No newline at end of file diff --git a/src/main/resources/banner.txt b/src/main/resources/banner.txt new file mode 100644 index 0000000..d104ed3 --- /dev/null +++ b/src/main/resources/banner.txt @@ -0,0 +1,7 @@ + __ __ _______ _______ +| | | || || | +| |_| || ___|| _ | +| || |___ | | | | +| || ___|| |_| | +| _ || |___ | | +|__| |__||_______||_______|