Skip to content

Commit 7d885f7

Browse files
melixdnestoro
authored andcommitted
Document command line options
1 parent 370073d commit 7d885f7

File tree

2 files changed

+31
-4
lines changed

2 files changed

+31
-4
lines changed

docs/src/docs/asciidoc/changelog.adoc

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
[[changelog]]
22
== Changelog
33

4+
== Release 0.10.6
5+
6+
=== Gradle plugin
7+
8+
- Added options to override parameters from command line
9+
410
== Release 0.10.5
511

612
- Add missing getters to `DirectoryConfiguration`

docs/src/docs/asciidoc/gradle-plugin.adoc

+25-4
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,31 @@ You can also pass **build-time** and **run-time** arguments:
173173
- `buildArgs.add('<buildArg>')`: Configures the build by passing options directly to `native-image`. You can pass any Native Image build option listed https://www.graalvm.org/reference-manual/native-image/overview/Options/[here].
174174
- `runtimeArgs.add('<runtimeArg>')`: Specifies runtime arguments consumed by your application.
175175

176-
[NOTE]
177-
====
178-
For options that can be set using the command line, if both DSL and command-line options are present, command-line options take precedence.
179-
====
176+
==== Command line options
177+
178+
The preferred way to configure native binaries is by using the DSL, so that you can provide reproducible builds which do not depend on obscure CLI invocations.
179+
However, in some circumstances, for experimentation, it may be useful to override parameters from command line.
180+
The following flags are available and (unless stated otherwise) will take precedence over the DSL configuration:
181+
182+
|===
183+
|Command line option|Description
184+
|`--image-name=<name>`|Overrides the `imageName` property
185+
|`--main-class=<class>`|Overrides the `mainClass` property
186+
|`--(no-)debug-native`|Enables or disables debug info generation
187+
|`--(no-)verbose`|Enables or disables verbose output
188+
|`--(no-)fallback`|Enables or disables the fallback mode
189+
|`--(no-)quick-build-native`|Enables or disables quick build mode
190+
|`--(no-)rich-output`|Enables or disables rich output
191+
|`--(no-)pgo-instrument`|Enables or disables PGO instrumentation
192+
|`--build-args`|Adds build arguments
193+
|`--force-build-args`|Overrides build arguments (DSL will be ignored)
194+
|`--(no-)fat-jar`|Enables or disables creation of a far jar for compilation
195+
|`--sysprop-native`|Adds a system property for compilation
196+
|`--env-native`|Adds an environment variable for compilation
197+
|`--jvm-args-native`|Adds JVM arguments for compilation
198+
|`--force-jvm-args-native`|Overrides JVM arguments (DSL will be ignored)
199+
|===
200+
180201

181202
[[native-image-tracing-agent]]
182203
== Native Image Tracing Agent

0 commit comments

Comments
 (0)