Add GraalVM native-image tasks
This commit is contained in:
parent
867304b568
commit
0e28d746bd
2 changed files with 68 additions and 4 deletions
|
@ -1,6 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunManager">
|
||||
<configuration name="Build test application (native)" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" value="" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="testapp:nativeImage" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" />
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<RunAsTest>false</RunAsTest>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Build test application" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
|
@ -68,6 +90,28 @@
|
|||
<RunAsTest>false</RunAsTest>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Run test application (native)" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" value="" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="testapp:runNativeimage" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" />
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<RunAsTest>false</RunAsTest>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Run test application" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
|
@ -79,8 +123,7 @@
|
|||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="shadowJar" />
|
||||
<option value="testapp:run" />
|
||||
<option value="testapp:runShadow" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" />
|
||||
|
@ -114,11 +157,13 @@
|
|||
<method v="2" />
|
||||
</configuration>
|
||||
<list>
|
||||
<item itemvalue="Gradle.Build test application (native)" />
|
||||
<item itemvalue="Gradle.Run test application (native)" />
|
||||
<item itemvalue="Gradle.Build test application" />
|
||||
<item itemvalue="Gradle.Clean" />
|
||||
<item itemvalue="Gradle.Generate Javadoc" />
|
||||
<item itemvalue="Gradle.Run test application" />
|
||||
<item itemvalue="Gradle.Run tests" />
|
||||
<item itemvalue="Gradle.Generate Javadoc" />
|
||||
<item itemvalue="Gradle.Clean" />
|
||||
</list>
|
||||
</component>
|
||||
</project>
|
||||
|
|
|
@ -22,6 +22,7 @@ plugins {
|
|||
id "application"
|
||||
id("io.freefair.lombok") version("${pluginLombok}")
|
||||
id("io.github.goooler.shadow") version("${pluginShadow}")
|
||||
id('org.mikeneck.graalvm-native-image') version('v1.4.0')
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -73,3 +74,21 @@ application {
|
|||
"-Djansi.mode=force",
|
||||
]
|
||||
}
|
||||
|
||||
nativeImage {
|
||||
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")
|
||||
arguments {
|
||||
"--no-fallback"
|
||||
"--enable-all-security-services"
|
||||
"--report-unsupported-elements-at-runtime"
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('runNativeimage', Exec) {
|
||||
dependsOn(nativeImage)
|
||||
executable("build/bin/sosengine-testapp")
|
||||
args = application.applicationDefaultJvmArgs
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue