Files
gson/test-graal-native-image
dependabot[bot] 04091faee8 Bump the maven group across 1 directory with 5 updates (#2986)
Bumps the maven group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [com.google.errorprone:error_prone_core](https://github.com/google/error-prone) | `2.46.0` | `2.47.0` |
| [com.google.errorprone:error_prone_annotations](https://github.com/google/error-prone) | `2.46.0` | `2.47.0` |
| [com.guardsquare:proguard-core](https://github.com/Guardsquare/proguard-core) | `9.2.0` | `9.3.0` |
| [org.junit:junit-bom](https://github.com/junit-team/junit-framework) | `6.0.2` | `6.0.3` |
| [io.github.ascopes:protobuf-maven-plugin](https://github.com/ascopes/protobuf-maven-plugin) | `4.1.2` | `4.1.3` |



Updates `com.google.errorprone:error_prone_core` from 2.46.0 to 2.47.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.46.0...v2.47.0)

Updates `com.google.errorprone:error_prone_annotations` from 2.46.0 to 2.47.0
- [Release notes](https://github.com/google/error-prone/releases)
- [Commits](https://github.com/google/error-prone/compare/v2.46.0...v2.47.0)

Updates `com.guardsquare:proguard-core` from 9.2.0 to 9.3.0
- [Release notes](https://github.com/Guardsquare/proguard-core/releases)
- [Commits](https://github.com/Guardsquare/proguard-core/compare/v9.2.0...v9.3.0)

Updates `org.junit:junit-bom` from 6.0.2 to 6.0.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r6.0.2...r6.0.3)

Updates `io.github.ascopes:protobuf-maven-plugin` from 4.1.2 to 4.1.3
- [Release notes](https://github.com/ascopes/protobuf-maven-plugin/releases)
- [Commits](https://github.com/ascopes/protobuf-maven-plugin/compare/v4.1.2...v4.1.3)

---
updated-dependencies:
- dependency-name: com.google.errorprone:error_prone_core
  dependency-version: 2.47.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: maven
- dependency-name: com.google.errorprone:error_prone_annotations
  dependency-version: 2.47.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: maven
- dependency-name: com.guardsquare:proguard-core
  dependency-version: 9.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: maven
- dependency-name: org.junit:junit-bom
  dependency-version: 6.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: maven
- dependency-name: io.github.ascopes:protobuf-maven-plugin
  dependency-version: 4.1.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: maven
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-01 07:49:23 -08:00
..

test-graal-native-image

This Maven module contains integration tests for using Gson in a GraalVM Native Image.

Execution requires using GraalVM as JDK, and can be quite resource intensive. Native Image tests are therefore not enabled by default and the tests are only executed as regular unit tests. To run Native Image tests, make sure your PATH and JAVA_HOME environment variables point to GraalVM and then run:

mvn clean test --activate-profiles native-image-test

Technically it would also be possible to directly configure Native Image test execution for the gson module instead of having this separate Maven module. However, maintaining the reflection metadata for the unit tests would be quite cumbersome and would hinder future changes to the gson unit tests because many of them just happen to use reflection, without all of them being relevant for Native Image testing.

Reflection metadata

Native Image creation requires configuring which class members are accessed using reflection, see the GraalVM documentation.

The file reflect-config.json contains this reflection metadata.

You can also run with -Dagent=true to let the Maven plugin automatically generate a metadata file, see the plugin documentation.