diff --git a/testapp/build.gradle b/testapp/build.gradle index e1cb4b7..5ebee83 100644 --- a/testapp/build.gradle +++ b/testapp/build.gradle @@ -17,6 +17,8 @@ * along with this program. If not, see . */ +import org.mikeneck.graalvm.BuildTypeSelector + // Plugins plugins { id("java") @@ -87,26 +89,40 @@ application { // GraalVM native-image plugin configuration nativeImage { + outputs.upToDateWhen { true } + graalVmHome = project.hasProperty("graalHome") ? project.property("graalHome") as String : System.getProperty("java.home") - mainClass = "de.staropensource.sosengine.testapp.Main" executableName = "sosengine-testapp" outputDirectory = file("build/bin") + setClasspath(shadowJar) + buildType { BuildTypeSelector build -> + build.executable { + main = 'de.staropensource.sosengine.testapp.Main' + } + } arguments { - "--color=always" - "-march native" - "-O3" - "--gc=g1" - "--no-fallback" - "--enable-all-security-services" - "--report-unsupported-elements-at-runtime" - //"-H:IncludeResources=.*properties\$" + add "-H:+UnlockExperimentalVMOptions" + add "--color=always" + add "-march=native" + add "-O3" + add "--no-fallback" + add "--report-unsupported-elements-at-runtime" + add "--enable-http" + add "--enable-https" + add "-H:IncludeResources=.*properties\$" } } // Register task for executing the generated binary -tasks.register('runNativeimage', Exec) { +tasks.register('runNativeImage', Exec) { + outputs.upToDateWhen { false } dependsOn(nativeImage) + + args( + "-Dsosengine.base.loggerLevel=diagnostic", + "-Dsosengine.base.loggerForceStandardOutput=true", + "-Djansi.mode=force" + ) executable("build/bin/sosengine-testapp") - args = application.applicationDefaultJvmArgs }