gson-comments/shrinker-test
dependabot[bot] 623040456a
Bump org.codehaus.mojo:exec-maven-plugin from 3.1.1 to 3.2.0 (#2634)
Bumps [org.codehaus.mojo:exec-maven-plugin](https://github.com/mojohaus/exec-maven-plugin) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/mojohaus/exec-maven-plugin/releases)
- [Commits](https://github.com/mojohaus/exec-maven-plugin/compare/3.1.1...3.2.0)

---
updated-dependencies:
- dependency-name: org.codehaus.mojo:exec-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-27 16:18:11 -08:00
..
src Enable additional Error Prone checks & fix violations (#2561) 2024-01-09 10:19:09 -08:00
README.md Add ProGuard / R8 integration tests & add default ProGuard rules (#2397) 2023-05-28 12:24:05 -07:00
common.pro Add shrinker-test examples with never-referenced constructors (#2478) 2023-09-05 06:47:54 -07:00
pom.xml Bump org.codehaus.mojo:exec-maven-plugin from 3.1.1 to 3.2.0 (#2634) 2024-02-27 16:18:11 -08:00
proguard.pro Add shrinker-test examples with never-referenced constructors (#2478) 2023-09-05 06:47:54 -07:00
r8.pro Add shrinker-test examples with never-referenced constructors (#2478) 2023-09-05 06:47:54 -07:00

README.md

shrinker-test

This Maven module contains integration tests which check the behavior of Gson when used in combination with code shrinking and obfuscation tools, such as ProGuard or R8.

The code which is shrunken is under src/main/java; it should not contain any important assertions in case the code shrinking tools affect these assertions in any way. The test code under src/test/java executes the shrunken and obfuscated JAR and verifies that it behaves as expected.

The tests might be a bit brittle, especially the R8 test setup. Future ProGuard and R8 versions might cause the tests to behave differently. In case tests fail the ProGuard and R8 mapping files created in the target directory can help with debugging. If necessary rewrite tests or even remove them if they cannot be implemented anymore for newer ProGuard or R8 versions.

Important: Because execution of the code shrinking tools is performed during the Maven build, trying to directly run the integration tests from the IDE might not work, or might use stale results if you changed the configuration in between. Run mvn clean verify before trying to run the integration tests from the IDE.