Minor cleanups
This commit is contained in:
parent
375b275d2a
commit
b3b5931982
2 changed files with 9 additions and 3 deletions
|
@ -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:
|
The options documentation can be found at:
|
||||||
|
|
||||||
* https://www.graalvm.org/22.0/reference-manual/native-image/Options/
|
* https://www.graalvm.org/22.0/reference-manual/native-image/Options/
|
||||||
|
|
||||||
|
|
|
@ -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.Repository.RIFE2_RELEASES;
|
||||||
import static rife.bld.dependencies.Scope.test;
|
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 class GraalNativeBuild extends Project {
|
||||||
public GraalNativeBuild() {
|
public GraalNativeBuild() {
|
||||||
pkg = "com.example";
|
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.jupiter", "junit-jupiter", version(5, 10, 2)))
|
||||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 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());
|
jarOperation().manifestAttribute(Attributes.Name.MAIN_CLASS, mainClass());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +44,7 @@ public class GraalNativeBuild extends Project {
|
||||||
new GraalNativeBuild().start(args);
|
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 {
|
public void nativeExec() throws Exception {
|
||||||
new ExecOperation()
|
new ExecOperation()
|
||||||
.fromProject(this)
|
.fromProject(this)
|
||||||
|
@ -48,6 +56,5 @@ public class GraalNativeBuild extends Project {
|
||||||
Paths.get(buildDistDirectory().getAbsolutePath(), jarFileName()).toString(),
|
Paths.get(buildDistDirectory().getAbsolutePath(), jarFileName()).toString(),
|
||||||
"hello")
|
"hello")
|
||||||
.execute();
|
.execute();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue