Minor cleanups

This commit is contained in:
Erik C. Thauvin 2024-04-04 14:53:08 -07:00
parent 375b275d2a
commit b3b5931982
Signed by: erik
GPG key ID: 776702A6A2DA330E
2 changed files with 9 additions and 3 deletions

View file

@ -37,4 +37,3 @@ Be sure to have the GraalVM `native-image` utility in your path, or set its loca
The options documentation can be found at:
* https://www.graalvm.org/22.0/reference-manual/native-image/Options/

View file

@ -12,6 +12,13 @@ import static rife.bld.dependencies.Repository.MAVEN_CENTRAL;
import static rife.bld.dependencies.Repository.RIFE2_RELEASES;
import static rife.bld.dependencies.Scope.test;
/**
* Gradle Native Example Build.
*
* <ul style="list-style-type:none">
* <li>{@code ./bld compile jar native-exec}</li>
* </ul>
*/
public class GraalNativeBuild extends Project {
public GraalNativeBuild() {
pkg = "com.example";
@ -29,6 +36,7 @@ public class GraalNativeBuild extends Project {
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 2)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 2)));
// Add the main class to the manifest
jarOperation().manifestAttribute(Attributes.Name.MAIN_CLASS, mainClass());
}
@ -36,7 +44,7 @@ public class GraalNativeBuild extends Project {
new GraalNativeBuild().start(args);
}
@BuildCommand(value = "native-exec", summary = "Build a native executable")
@BuildCommand(value = "native-exec", summary = "Builds a native executable")
public void nativeExec() throws Exception {
new ExecOperation()
.fromProject(this)
@ -48,6 +56,5 @@ public class GraalNativeBuild extends Project {
Paths.get(buildDistDirectory().getAbsolutePath(), jarFileName()).toString(),
"hello")
.execute();
}
}