@@ -97,7 +97,7 @@ Here is an example of additional options usage:
97
97
graalvmNative {
98
98
binaries.all {
99
99
// common options
100
- jvmArgs.add('flag')
100
+ verbose = true
101
101
}
102
102
binaries.main {
103
103
// options to configure the main binary
@@ -109,7 +109,6 @@ graalvmNative {
109
109
// options to configure the test binary
110
110
quickBuild = true
111
111
debug = true
112
- verbose = true
113
112
}
114
113
}
115
114
----
@@ -119,7 +118,7 @@ graalvmNative {
119
118
graalvmNative {
120
119
binaries.all {
121
120
// common options
122
- buildArgs.add('--emit build-report' )
121
+ verbose.set(true )
123
122
}
124
123
125
124
binaries.main {
@@ -133,7 +132,6 @@ graalvmNative {
133
132
// options to configure the test binary
134
133
quickBuild.set(true)
135
134
debug.set(true)
136
- verbose.set(true)
137
135
}
138
136
}
139
137
----
@@ -175,8 +173,7 @@ testImplementation('junit:junit:4.13.2')
175
173
./gradlew nativeTest
176
174
----
177
175
178
- First, the tests run on the JVM.
179
- Then, they are compiled ahead of time and executed as native code.
176
+ The tests are compiled ahead of time and executed as native code.
180
177
181
178
[[gather-execution-profiles]]
182
179
=== Gather Execution Profiles and Build Optimized Images
@@ -207,7 +204,7 @@ By default, the _default.iprof_ file, if not specified otherwise, is generated a
207
204
208
205
[source,bash, role="multi-language-sample"]
209
206
----
210
- ./build/native/nativeCompile/my- application-instrumented
207
+ ./build/native/nativeCompile/application-instrumented
211
208
----
212
209
213
210
Step 3. **Build an optimized native image with profiles**.
@@ -251,13 +248,13 @@ To address this, start by checking if any required configuration is missing.
251
248
The best way to detect missing metadata is by running your native tests.
252
249
Alternatively, you can **identify missing configuration manually** using the following method.
253
250
254
- - Pass the `--exact-reachablity -metadata` option to the `native-image` tool inside `graalvmNative` block of your _build.gradle_, as shown below:
251
+ - Pass the `--exact-reachability -metadata` option to the `native-image` tool inside `graalvmNative` block of your _build.gradle_, as shown below:
255
252
256
253
[source,groovy,subs="verbatim,attributes", role="multi-language-sample"]
257
254
----
258
255
graalvmNative {
259
256
binaries.all {
260
- buildArgs.add('--exact-reachablity -metadata')
257
+ buildArgs.add('--exact-reachability -metadata')
261
258
runtimeArgs.add('-XX:MissingRegistrationReportingMode=Warn')
262
259
}
263
260
}
@@ -267,7 +264,7 @@ graalvmNative {
267
264
----
268
265
graalvmNative {
269
266
binaries.all {
270
- buildArgs.add('--exact-reachablity -metadata')
267
+ buildArgs.add('--exact-reachability -metadata')
271
268
runtimeArgs.add('-XX:MissingRegistrationReportingMode=Warn')
272
269
}
273
270
}
@@ -317,21 +314,17 @@ Step 1: **Enable the agent** by setting `agent` to `true` in the `graalvmNative`
317
314
[source,groovy,subs="verbatim,attributes", role="multi-language-sample"]
318
315
----
319
316
graalvmNative {
320
- binaries.all {
321
- agent {
322
- enabled = true
323
- }
317
+ agent {
318
+ enabled = true
324
319
}
325
320
}
326
321
----
327
322
328
323
[source,kotlin,subs="verbatim,attributes", role="multi-language-sample"]
329
324
----
330
325
graalvmNative {
331
- binaries.all {
332
- agent {
333
- enabled.set(true)
334
- }
326
+ agent {
327
+ enabled.set(true)
335
328
}
336
329
}
337
330
----
0 commit comments