Skip to content

Commit bc8ea12

Browse files
committed
Polish text
1 parent 133308a commit bc8ea12

File tree

2 files changed

+48
-46
lines changed

2 files changed

+48
-46
lines changed

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

+39-37
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ image:https://github.com/graalvm/native-build-tools/actions/workflows/test-nativ
88

99
The {doctitle} adds support for building and testing native images using the https://gradle.org[Gradle build tool].
1010

11-
For upgrading please take a look at the <<changelog.adoc#,Changelog>>.
11+
To upgrade, please take a look at the <<changelog.adoc#,project changelog>>.
1212

1313
[[quickstart]]
1414
== Quickstart
@@ -26,7 +26,7 @@ You can find full samples in https://github.com/graalvm/native-build-tools/tree/
2626
====
2727

2828

29-
== Adding the plugin
29+
Adding the Plugin
3030

3131
Add following to `plugins` section of your project's `build.gradle` / `build.gradle.kts`:
3232

@@ -68,14 +68,14 @@ include::../snippets/gradle/kotlin/settings.gradle.kts[tags=pre-release, indent=
6868
----
6969
====
7070

71-
== Installing GraalVM Native Image tool
71+
Installing GraalVM
7272

73-
By default, the plugin will try to use the `native-image` tool that is bundled with the JDK that is used to run Gradle.
73+
By default, the plugin attempts to use the `native-image` tool bundled with the JDK running Gradle. Therefore, you must ensure that Gradle runs on a GraalVM JDK.
7474
This means you must make sure that you run Gradle with a GraalVM JDK.
7575

7676
Alternatively, you may choose to:
7777

78-
1. Set up a `GRAALVM_HOME` environment variable pointing to your GraalVM installation, in which case the JDK pointed at this location will be used for Native Image builds instead
78+
1. Set the `GRAALVM_HOME` environment variable to point to your GraalVM installation. When this variable is configured, the JDK specified at this location will be used for Native Image builds.
7979
2. <<configuration-toolchains-enabling, Enable toolchain support>>
8080

8181
[NOTE]
@@ -134,7 +134,7 @@ Again, be aware that the toolchain detection _cannot_ distinguish between GraalV
134134
[[configuration]]
135135
== Configuration
136136

137-
This plugin works with the `application` plugin and will register a number of tasks and extensions for you to configure.
137+
This plugin works with the `application` plugin and registers a number of tasks and extensions for you to configure.
138138

139139
=== Available tasks
140140

@@ -149,7 +149,7 @@ Those tasks are configured with reasonable defaults using the `graalvmNative` ex
149149

150150
The main executable is configured by the image named `main`, while the test executable is configured via the image named `test`.
151151

152-
=== Native image options
152+
=== Configure Native Image
153153

154154
The link:javadocs/native-gradle-plugin/org/graalvm/buildtools/gradle/dsl/NativeImageOptions.html[NativeImageOptions] allows you to tweak how the native image is going to be built.
155155
The plugin allows configuring the final binary, the <<test-binary-config,tests>> one, as well as apply options to both.
@@ -182,74 +182,76 @@ include::../snippets/gradle/groovy/build.gradle[tags=all-config-options]
182182
include::../snippets/gradle/kotlin/build.gradle.kts[tags=all-config-options]
183183
----
184184

185-
Native Image options:
185+
==== Native Image options
186186

187-
- `imageName` -The name of the native image, defaults to the project name
188-
- `mainClass` - The main class to use, defaults to the application.mainClass
189-
- `debug` - Determines if debug info should be generated, defaults to false (alternatively add --debug-native to the CLI)
190-
- `verbose` - Add verbose output (`false` by default)
191-
- `fallback` - Sets the fallback mode of native-image (`false` by default)
192-
- `sharedLibrary` - Determines if image is a shared library
193-
- `quickBuild` - Determines if image is being built in quick build mode
194-
- `richOutput` - Determines if native-image building should be done with rich output
195-
- `requiredVersion` - The minimal GraalVM version, can be `MAJOR`, `MAJOR.MINOR` or `MAJOR.MINOR.PATCH`
196-
- `systemProperties` - Sets the system properties to use for the native image builder
197-
- `configurationFileDirectories` - Adds a native image configuration file directory, containing files like reflection configuration
198-
- `excludeConfig` - Excludes configuration that matches one of given regexes from JAR of dependency with said coordinates.
199-
- `jvmArgs` - Passes the given argument directly to the JVM running the native image builder
200-
- `useFatJar` - Instead of passing each jar individually, builds a fat jar
187+
- `imageName` - The name of the native image, defaults to the project name
188+
- `mainClass` - The main class to use, defaults to the _application.mainClass_
189+
- `debug` - Determines if debug info should be generated; defaults to `false` (alternatively add `--debug-native` to the CLI)
190+
- `verbose` - Adds verbose output (`false` by default)
191+
- `fallback` - Sets the fallback mode of `native-image` (`false` by default)
192+
- `sharedLibrary` - Determines if the image is a shared library
193+
- `quickBuild` - Determines if the image is being built in quick build mode
194+
- `richOutput` - Determines whether `native-image` building should produce rich output
195+
- `systemProperties`: Defines the system properties to use for the `native-image` builder
196+
- `configurationFileDirectories`: Adds a directory containing configuration files for `native-image`, such as reflection configuration
197+
-`excludeConfig`: Excludes configuration that matches any of the specified regex patterns from the JAR of a dependency with the given coordinates
198+
- `jvmArgs`: Passes the specified arguments directly to the JVM running the `native-image` builder
199+
- `useFatJar`: Builds a fat JAR instead of passing each JAR individually
201200

202201
You can also pass **build-time** and **run-time** arguments:
203202

203+
- `buildArgs.add('<buildArg>')`: Learn more about possible build arguments https://www.graalvm.org/latest/reference-manual/native-image/overview/BuildConfiguration/[here].
204+
- `runtimeArgs.add('<runtimeArg>')`: Specifies runtime arguments consumed by your application.
205+
204206
- `buildArgs.add('<buildArg>')` - You can find more about possible build arguments https://www.graalvm.org/latest/reference-manual/native-image/overview/BuildConfiguration/[here]
205207
- `runtimeArgs.add('<runtimeArg>')` - Runtime arguments consumed by your application
206208

207209

208210
NOTE: For options that can be set using command-line, if both DSL and command-line options are present, command-line options take precedence.
209211

210-
Native Image Agent options:
212+
==== Native Image Tracing Agent options
211213

212-
* `defaultMode` - Default agent mode if one isn't specified using `-Pagent=mode_name`
214+
* `defaultMode` - Specifies the default agent mode if one isn't specified using `-Pagent=mode_name`
213215
* `enabled` - Enables the agent
214-
* `modes`- you can configure following agent modes:
216+
* `modes`- Configures the following agent modes::
215217
** `standard` -The standard agent mode generates metadata without conditions
216218
** `conditional` - The conditional agent mode generates metadata with conditions
217-
*** `userCodeFilterPath` - Path to a filter file that determines classes which will be used in the metadata conditions
218-
*** `extraFilterPath` - Optional, extra filter used to further filter the collected metadata
219+
*** `userCodeFilterPath` - Path to a filter file that specifies which classes to include in metadata conditions
220+
*** `extraFilterPath` - (Optional) An additional filter file to further refine the collected metadata
219221
** `direct` - The direct agent mode allows users to directly pass options to the agent
220-
*** `{output_dir}` - a special string expanded by the plugin to where the agent files would usually be output
221-
* `tasksToInstrumentPredicate` - By default, if `-Pagent` is specified, all tasks that extend JavaForkOptions are instrumented.
222+
*** `{output_dir}` - The output directory to store agent files
223+
* `tasksToInstrumentPredicate` - By default, when `-Pagent` is specified, all tasks extending `JavaForkOptions` are instrumented.
222224
This can be limited to only specific tasks that match this predicate.
223225

224226
[TIP]
225227
Options like `callerFilterFiles`, `accessFilterFiles`, `builtinCallerFilter`, `builtinHeuristicFilter`, `enableExperimentalPredefinedClasses`, `enableExperimentalUnsafeAllocationTracing` and `trackReflectionMetadata`
226228
are common for all agent modes and intended to be used for more advanced purposes. You can read more about those options https://www.graalvm.org/latest/reference-manual/native-image/metadata/AutomaticMetadataCollection/#agent-advanced-usage[here].
227229

228230
[[agent-support]]
229-
==== Reflection support and running with the native agent
231+
==== Reflection Registration with the Tracing Agent
230232

231-
If your project requires reflection, classpath resources, dynamic proxies or other features requiring explicit native configuration, it may prove helpful to first run your application or tests using the https://www.graalvm.org/reference-manual/native-image/metadata/AutomaticMetadataCollection/[native-image-agent].
233+
If your project requires reflection, classpath resources, dynamic proxies, or other features that need explicit configuration, it may be helpful to first run your application or tests using the https://www.graalvm.org/reference-manual/native-image/metadata/AutomaticMetadataCollection/[Native Image Tracing Agent].
232234

233235
The Native Image Gradle plugin simplifies generation of the required metadata files by injecting the agent automatically for you (this includes, but is not limited to the reflection file).
234236

235-
Any task that extends `JavaForkOptions` (like `test`, `run` etc) can be instrumented by passing `-Pagent` to gradle when running said tasks.
237+
Any task that extends `JavaForkOptions` (such as `test`, `run`, etc.) can be instrumented by passing `-Pagent` to Gradle when running those tasks.
236238

237239
The agent can run in multiple modes that dictate how the metadata is collected and merged.
238240

239241
Once the metadata is collected, it can be copied into the project using the `metadataCopy` task.
240242

241243
[source,bash, role="multi-language-sample"]
242244
----
243-
./gradlew -Pagent run # Runs on JVM with native-image-agent.
245+
./gradlew -Pagent run # Runs on HotSpot with the agent
244246
./gradlew metadataCopy --task run --dir src/main/resources/META-INF/native-image # Copies the metadata collected by the agent into the project sources
245-
./gradlew nativeCompile # Builds image using metadata acquired by the agent.
247+
./gradlew nativeCompile # Builds an image using the metadata acquired by the agent.
246248
247249
# For testing
248250
./gradlew -Pagent nativeTest # Runs on JVM with the native-image agent, collects the metadata and uses it for testing on native-image.
249251
----
250252

251-
The generated configuration files will be found in the `${buildDir}/native/agent-output/${taskName}` directory, for example, `build/native/agent-output/run`.
252-
The plugin will also substitute `{output_dir}` in the agent options to point to this directory during the agent run.
253+
The generated configuration files can be found in the `${buildDir}/native/agent-output/${taskName}` directory, for example, _build/native/agent-output/run_.
254+
The plugin also substitutes `{output_dir}` in the agent options to point to this directory during the agent run.
253255

254256
[[max_parallel_builds]]
255257
==== Max parallel builds
@@ -502,7 +504,7 @@ In order to generate a binary with instrumentation enabled, you should run the `
502504

503505
`./gradlew nativeCompile --pgo-instrument`
504506

505-
This will generate a binary under `build/native/nativeCompile` with the `-instrumented` suffix.
507+
This will generate a binary under _build/native/nativeCompile_ with the `-instrumented` suffix.
506508
You can run the binary to gather profiling data:
507509

508510
[source,bash, role="multi-language-sample"]

docs/src/docs/asciidoc/index.adoc

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
= Native Build Tools
22
The GraalVM team
33

4-
The {doctitle} project provides plugins for different build tools to add support for building and testing native applications written in Java
5-
(or any other language compiled to JVM bytecode) using the https://www.graalvm.org/reference-manual/native-image/[GraalVM Native Image].
6-
At the moment, you can build your native projects using our Gradle or Maven plugin.
4+
5+
The {doctitle} project provides plugins for various build tools, enabling support for building and testing native applications written in Java (or any other language compiled to JVM bytecode) using https://www.graalvm.org/reference-manual/native-image/[GraalVM Native Image].
6+
Currently, you can build your native applications using our Gradle or Maven plugins.
77

88
Each plugin takes metadata for available libraries from the https://github.com/oracle/graalvm-reachability-metadata[GraalVM reachability metadata repository]
99
to provide better experience during the development of your native project.
@@ -13,25 +13,25 @@ If you are using alternative build systems, see <<alternative-build-systems.adoc
1313
[discrete]
1414
=== Documentation
1515

16-
In case you are new to the Native Build Tools (either as an end user or a library author), read our:
16+
If you're new to the Native Build Tools, whether as an end user or a library author, check out our:
1717

1818
- <<end-to-end-gradle-guide.adoc#,End-to-end Gradle guide>>
1919
- <<end-to-end-maven-guide.adoc#,End-to-end Maven guide>>
2020

21-
For detailed documentation, please refer to the following pages of the specific build tools:
21+
For detailed documentation, see the corresponding page for each build tool:
2222

2323
- <<gradle-plugin.adoc#,The Gradle plugin documentation>>
2424
- <<maven-plugin.adoc#,The Maven plugin documentation>>
2525

26-
You can see the full changelog <<changelog.adoc#,here>>.
26+
For updates to the Native Build Tools between releases, see the full changelog <<changelog.adoc#,here>>.
2727

2828
[discrete]
2929
=== Contributing
3030

3131
If you are interested in contributing or reporting an issue related to the plugins, please refer to the https://github.com/graalvm/native-build-tools[Native Build Tools repository].
32-
Also, be aware that all contributors must sign the https://oca.opensource.oracle.com/[Oracle Contributor Agreement] (OCA).
32+
Please note that all contributors must sign the https://oca.opensource.oracle.com/[Oracle Contributor Agreement] (OCA).
3333

3434
[TIP]
3535
--
36-
Please be aware that this repository should be used to report issues related to the Maven or Gradle plugins for GraalVM.
37-
Please report issues which are specific to the framework itself (for example https://spring.io/[Spring Framework] or the https://micronaut.io/[Micronaut framework]) to their specific repositories.
36+
This repository should be used for reporting issues related specifically to the Maven or Gradle plugins for GraalVM Native Image.
37+
For issues related to frameworks such as https://spring.io/[Spring Framework] or https://micronaut.io/[Micronaut framework], please report them to their respective repositories.

0 commit comments

Comments
 (0)