Skip to content

Commit 1e995af

Browse files
committed
Publishing documentation for version 0.11.1-SNAPSHOT
1 parent bec1d42 commit 1e995af

File tree

2 files changed

+123
-126
lines changed

2 files changed

+123
-126
lines changed

0.11.1-SNAPSHOT/end-to-end-gradle-guide.html

Lines changed: 42 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -474,12 +474,12 @@ <h1>Building Native Images with Gradle: An End-to-End Guide</h1>
474474
<ul class="sectlevel2">
475475
<li><a href="#add-plugin">Add the Plugin</a></li>
476476
<li><a href="#run-your-project">Build and Run Your Application</a></li>
477+
<li><a href="#run-junit-tests">Run Junit Tests</a></li>
477478
</ul>
478479
</li>
479480
<li><a href="#advanced-use-cases">Advanced Use Cases: How to</a>
480481
<ul class="sectlevel2">
481482
<li><a href="#configure-image-build">Configure Native Image Build</a></li>
482-
<li><a href="#run-junit-tests">Run Junit Tests</a></li>
483483
<li><a href="#gather-execution-profiles">Gather Execution Profiles and Build Optimized Images</a></li>
484484
<li><a href="#troubleshoot-missing-configuration">Troubleshoot Missing Configuration</a></li>
485485
<li><a href="#use-diagnostics-tools">Use Diagnostics Tools</a></li>
@@ -576,8 +576,48 @@ <h3 id="run-your-project"><a class="anchor" href="#run-your-project"></a>Build a
576576
<pre class="highlightjs highlight"><code data-lang="bash" class="language-bash hljs">./gradlew nativeRun</code></pre>
577577
</div>
578578
</div>
579+
</div>
580+
<div class="sect2">
581+
<h3 id="run-junit-tests"><a class="anchor" href="#run-junit-tests"></a>Run Junit Tests</h3>
579582
<div class="paragraph">
580-
<p>Continue reading below to learn more about the plugin.</p>
583+
<p>This plugin supports running tests on the JUnit Platform.
584+
The tests are compiled ahead of time and executed as native code.</p>
585+
</div>
586+
<div class="ulist">
587+
<ul>
588+
<li>
589+
<p>Add the JUnit 5 dependency to <em>build.gradle</em> / <em>build.gradle.kts</em> to include the testing framework:</p>
590+
</li>
591+
</ul>
592+
</div>
593+
<div class="listingblock multi-language-sample">
594+
<div class="content">
595+
<pre class="highlightjs highlight"><code data-lang="groovy" class="language-groovy hljs">testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
596+
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
597+
testImplementation 'junit:junit:4.13.2'</code></pre>
598+
</div>
599+
</div>
600+
<div class="listingblock multi-language-sample">
601+
<div class="content">
602+
<pre class="highlightjs highlight"><code data-lang="kotlin" class="language-kotlin hljs">testImplementation('org.junit.jupiter:junit-jupiter-api:5.8.1')
603+
testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine:5.8.1')
604+
testImplementation('junit:junit:4.13.2')</code></pre>
605+
</div>
606+
</div>
607+
<div class="ulist">
608+
<ul>
609+
<li>
610+
<p>Run the tests:</p>
611+
</li>
612+
</ul>
613+
</div>
614+
<div class="listingblock multi-language-sample">
615+
<div class="content">
616+
<pre class="highlightjs highlight"><code data-lang="bash" class="language-bash hljs">./gradlew nativeTest</code></pre>
617+
</div>
618+
</div>
619+
<div class="paragraph">
620+
<p>The tests are compiled ahead of time and executed as native code.</p>
581621
</div>
582622
</div>
583623
</div>
@@ -689,49 +729,6 @@ <h3 id="configure-image-build"><a class="anchor" href="#configure-image-build"><
689729
</div>
690730
</div>
691731
<div class="sect2">
692-
<h3 id="run-junit-tests"><a class="anchor" href="#run-junit-tests"></a>Run Junit Tests</h3>
693-
<div class="paragraph">
694-
<p>This plugin supports running tests on the JUnit Platform.
695-
The tests are compiled ahead of time and executed as native code.</p>
696-
</div>
697-
<div class="ulist">
698-
<ul>
699-
<li>
700-
<p>Add the JUnit 5 dependency to <em>build.gradle</em> / <em>build.gradle.kts</em> to include the testing framework:</p>
701-
</li>
702-
</ul>
703-
</div>
704-
<div class="listingblock multi-language-sample">
705-
<div class="content">
706-
<pre class="highlightjs highlight"><code data-lang="groovy" class="language-groovy hljs">testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
707-
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
708-
testImplementation 'junit:junit:4.13.2'</code></pre>
709-
</div>
710-
</div>
711-
<div class="listingblock multi-language-sample">
712-
<div class="content">
713-
<pre class="highlightjs highlight"><code data-lang="kotlin" class="language-kotlin hljs">testImplementation('org.junit.jupiter:junit-jupiter-api:5.8.1')
714-
testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine:5.8.1')
715-
testImplementation('junit:junit:4.13.2')</code></pre>
716-
</div>
717-
</div>
718-
<div class="ulist">
719-
<ul>
720-
<li>
721-
<p>Run the tests:</p>
722-
</li>
723-
</ul>
724-
</div>
725-
<div class="listingblock multi-language-sample">
726-
<div class="content">
727-
<pre class="highlightjs highlight"><code data-lang="bash" class="language-bash hljs">./gradlew nativeTest</code></pre>
728-
</div>
729-
</div>
730-
<div class="paragraph">
731-
<p>The tests are compiled ahead of time and executed as native code.</p>
732-
</div>
733-
</div>
734-
<div class="sect2">
735732
<h3 id="gather-execution-profiles"><a class="anchor" href="#gather-execution-profiles"></a>Gather Execution Profiles and Build Optimized Images</h3>
736733
<div class="paragraph">
737734
<p>You may want to gather profiling information from your application&#8217;s execution to pinpoint areas of inefficiency.

0.11.1-SNAPSHOT/end-to-end-maven-guide.html

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -474,12 +474,12 @@ <h1>Building Native Images with Maven: An End-to-End Guide</h1>
474474
<ul class="sectlevel2">
475475
<li><a href="#add-plugin">Add the Plugin</a></li>
476476
<li><a href="#run-your-project">Build and Run Your Application</a></li>
477+
<li><a href="#run-junit-tests">Run Junit Tests</a></li>
477478
</ul>
478479
</li>
479480
<li><a href="#advanced-use-cases">Advanced Use Cases: How to</a>
480481
<ul class="sectlevel2">
481482
<li><a href="#configure-image-build">Configure Native Image Build</a></li>
482-
<li><a href="#run-junit-tests">Run Junit Tests</a></li>
483483
<li><a href="#gather-execution-profiles">Gather Execution Profiles and Build Optimized Images</a></li>
484484
<li><a href="#troubleshoot-missing-configuration">Troubleshoot Missing Configuration</a></li>
485485
<li><a href="#use-diagnostics-tools">Use Diagnostics Tools</a></li>
@@ -615,86 +615,6 @@ <h3 id="run-your-project"><a class="anchor" href="#run-your-project"></a>Build a
615615
Continue to advanced use cases to learn more.</p>
616616
</div>
617617
</div>
618-
</div>
619-
</div>
620-
<div class="sect1">
621-
<h2 id="advanced-use-cases"><a class="anchor" href="#advanced-use-cases"></a>Advanced Use Cases: How to</h2>
622-
<div class="sectionbody">
623-
<div class="paragraph">
624-
<p>For advanced use cases, this guide provides instructions for configuring the build process, running tests on native code, gathering execution profiles, troubleshooting missing configuration, and enabling diagnostic tools to analyze native images.</p>
625-
</div>
626-
<div class="sect2">
627-
<h3 id="configure-image-build"><a class="anchor" href="#configure-image-build"></a>Configure Native Image Build</h3>
628-
<div class="paragraph">
629-
<p>The plugin supports passing options directly to Native Image inside the <code>&lt;configuration&gt;</code> block.
630-
Using <code>&lt;buildArg&gt;</code>, you can pass any Native Image build option listed on <a href="https://www.graalvm.org/reference-manual/native-image/overview/Options/">this page</a>.</p>
631-
</div>
632-
<div class="paragraph">
633-
<p>The plugin also provides special properties to configure the build:</p>
634-
</div>
635-
<div class="ulist">
636-
<ul>
637-
<li>
638-
<p><code>&lt;environment&gt;</code> - Sets the environment options</p>
639-
</li>
640-
<li>
641-
<p><code>&lt;imageName&gt;</code> - Specifies of the name for the native executable file. If a custom name is not supplied, the artifact ID of the project will be used by default (defaults to the project name).</p>
642-
</li>
643-
<li>
644-
<p><code>&lt;jvmArgs&gt;</code> - Passes the given argument directly to the JVM running the <code>native-image</code> tool</p>
645-
</li>
646-
<li>
647-
<p><code>&lt;quickBuild&gt;</code> - Enables quick build mode</p>
648-
</li>
649-
<li>
650-
<p><code>&lt;verbose&gt;</code> - Enables the verbose output</p>
651-
</li>
652-
<li>
653-
<p>and many more <a href="https://graalvm.github.io/native-build-tools/latest/maven-plugin.html#configuration-options">listed here</a>.</p>
654-
</li>
655-
</ul>
656-
</div>
657-
<div class="paragraph">
658-
<p>Here is an example of additional options usage:</p>
659-
</div>
660-
<div class="listingblock multi-language-sample">
661-
<div class="content">
662-
<pre class="highlightjs highlight"><code data-lang="xml" class="language-xml hljs">&lt;configuration&gt;
663-
&lt;mainClass&gt;org.example.Main&lt;/mainClass&gt;
664-
&lt;imageName&gt;myApp&lt;/imageName&gt;
665-
&lt;verbose&gt;true&lt;/verbose&gt;
666-
&lt;buildArgs&gt;
667-
&lt;buildArg&gt;-O3&lt;/buildArg&gt; &lt;!-- enables additional compiler optimizations --&gt;
668-
&lt;/buildArgs&gt;
669-
&lt;environment&gt;
670-
&lt;variable1&gt;value1&lt;/variable1&gt;
671-
&lt;variable2&gt;value2&lt;/variable2&gt;
672-
&lt;/environment&gt;
673-
&lt;jvmArgs&gt;
674-
&lt;arg&gt;your-argument&lt;/arg&gt;
675-
&lt;/jvmArgs&gt;
676-
&lt;/configuration&gt;</code></pre>
677-
</div>
678-
</div>
679-
<div class="admonitionblock tip">
680-
<table>
681-
<tr>
682-
<td class="icon">
683-
<i class="fa icon-tip" title="Tip"></i>
684-
</td>
685-
<td class="content">
686-
<div class="paragraph">
687-
<p>As an alternative, you can pass additional build options via the <code>NATIVE_IMAGE_OPTIONS</code> environment variable, on the command line.
688-
This works similarly to <code>JAVA_TOOL_OPTIONS</code>, where the value of the environment variable is prefixed to the options supplied to <code>native-image</code>.</p>
689-
</div>
690-
</td>
691-
</tr>
692-
</table>
693-
</div>
694-
<div class="paragraph">
695-
<p>Learn more about Native Image build configuration <a href="https://www.graalvm.org/reference-manual/native-image/overview/BuildConfiguration/">on the website</a>.</p>
696-
</div>
697-
</div>
698618
<div class="sect2">
699619
<h3 id="run-junit-tests"><a class="anchor" href="#run-junit-tests"></a>Run Junit Tests</h3>
700620
<div class="paragraph">
@@ -803,6 +723,86 @@ <h4 id="_disable_tests"><a class="anchor" href="#_disable_tests"></a>Disable tes
803723
</div>
804724
</div>
805725
</div>
726+
</div>
727+
</div>
728+
<div class="sect1">
729+
<h2 id="advanced-use-cases"><a class="anchor" href="#advanced-use-cases"></a>Advanced Use Cases: How to</h2>
730+
<div class="sectionbody">
731+
<div class="paragraph">
732+
<p>For advanced use cases, this guide provides instructions for configuring the build process, running tests on native code, gathering execution profiles, troubleshooting missing configuration, and enabling diagnostic tools to analyze native images.</p>
733+
</div>
734+
<div class="sect2">
735+
<h3 id="configure-image-build"><a class="anchor" href="#configure-image-build"></a>Configure Native Image Build</h3>
736+
<div class="paragraph">
737+
<p>The plugin supports passing options directly to Native Image inside the <code>&lt;configuration&gt;</code> block.
738+
Using <code>&lt;buildArg&gt;</code>, you can pass any Native Image build option listed on <a href="https://www.graalvm.org/reference-manual/native-image/overview/Options/">this page</a>.</p>
739+
</div>
740+
<div class="paragraph">
741+
<p>The plugin also provides special properties to configure the build:</p>
742+
</div>
743+
<div class="ulist">
744+
<ul>
745+
<li>
746+
<p><code>&lt;environment&gt;</code> - Sets the environment options</p>
747+
</li>
748+
<li>
749+
<p><code>&lt;imageName&gt;</code> - Specifies of the name for the native executable file. If a custom name is not supplied, the artifact ID of the project will be used by default (defaults to the project name).</p>
750+
</li>
751+
<li>
752+
<p><code>&lt;jvmArgs&gt;</code> - Passes the given argument directly to the JVM running the <code>native-image</code> tool</p>
753+
</li>
754+
<li>
755+
<p><code>&lt;quickBuild&gt;</code> - Enables quick build mode</p>
756+
</li>
757+
<li>
758+
<p><code>&lt;verbose&gt;</code> - Enables the verbose output</p>
759+
</li>
760+
<li>
761+
<p>and many more <a href="https://graalvm.github.io/native-build-tools/latest/maven-plugin.html#configuration-options">listed here</a>.</p>
762+
</li>
763+
</ul>
764+
</div>
765+
<div class="paragraph">
766+
<p>Here is an example of additional options usage:</p>
767+
</div>
768+
<div class="listingblock multi-language-sample">
769+
<div class="content">
770+
<pre class="highlightjs highlight"><code data-lang="xml" class="language-xml hljs">&lt;configuration&gt;
771+
&lt;mainClass&gt;org.example.Main&lt;/mainClass&gt;
772+
&lt;imageName&gt;myApp&lt;/imageName&gt;
773+
&lt;verbose&gt;true&lt;/verbose&gt;
774+
&lt;buildArgs&gt;
775+
&lt;buildArg&gt;-O3&lt;/buildArg&gt; &lt;!-- enables additional compiler optimizations --&gt;
776+
&lt;/buildArgs&gt;
777+
&lt;environment&gt;
778+
&lt;variable1&gt;value1&lt;/variable1&gt;
779+
&lt;variable2&gt;value2&lt;/variable2&gt;
780+
&lt;/environment&gt;
781+
&lt;jvmArgs&gt;
782+
&lt;arg&gt;your-argument&lt;/arg&gt;
783+
&lt;/jvmArgs&gt;
784+
&lt;/configuration&gt;</code></pre>
785+
</div>
786+
</div>
787+
<div class="admonitionblock tip">
788+
<table>
789+
<tr>
790+
<td class="icon">
791+
<i class="fa icon-tip" title="Tip"></i>
792+
</td>
793+
<td class="content">
794+
<div class="paragraph">
795+
<p>As an alternative, you can pass additional build options via the <code>NATIVE_IMAGE_OPTIONS</code> environment variable, on the command line.
796+
This works similarly to <code>JAVA_TOOL_OPTIONS</code>, where the value of the environment variable is prefixed to the options supplied to <code>native-image</code>.</p>
797+
</div>
798+
</td>
799+
</tr>
800+
</table>
801+
</div>
802+
<div class="paragraph">
803+
<p>Learn more about Native Image build configuration <a href="https://www.graalvm.org/reference-manual/native-image/overview/BuildConfiguration/">on the website</a>.</p>
804+
</div>
805+
</div>
806806
<div class="sect2">
807807
<h3 id="gather-execution-profiles"><a class="anchor" href="#gather-execution-profiles"></a>Gather Execution Profiles and Build Optimized Images</h3>
808808
<div class="paragraph">

0 commit comments

Comments
 (0)