Skip to content

Use parametrized type tokens for GSON converters#1166

Merged
cortinico merged 1 commit into
ChuckerTeam:mainfrom
DroidsOnRoids:r8-param-types
Jan 25, 2024
Merged

Use parametrized type tokens for GSON converters#1166
cortinico merged 1 commit into
ChuckerTeam:mainfrom
DroidsOnRoids:r8-param-types

Conversation

@koral--

@koral-- koral-- commented Jan 25, 2024

Copy link
Copy Markdown
Contributor

Fixes "TypeToken must be created with a type argument: new TypeToken<...>() {}; When using code shrinkers (ProGuard, R8, ...) make sure that generic signatures are preserved." errors.

📷 Screenshots

N/A

📄 Context

One may use Chucker with optimized builds.

📝 Changes

Change how type tokens for lists are created so it works also in optimized/shrinked builds.
Just a different GSON API is now used, no changes in effects.

📎 Related PR

N/A

🚫 Breaking

Nothing

🛠️ How to test

Use chucker (standard, not no-op) with a release build type or enable minification in debug build type.

⏱️ Next steps

N/A

@koral-- koral-- requested a review from a team as a code owner January 25, 2024 11:53
@cortinico

Copy link
Copy Markdown
Member

@koral-- can you update the CHANGELOG.md file as well?

Fixes "TypeToken must be created with a type argument: new TypeToken<...>() {}; When using code shrinkers (ProGuard, R8, ...) make sure that generic signatures are preserved." errors.
@cortinico cortinico merged commit 587a78c into ChuckerTeam:main Jan 25, 2024
@cortinico

Copy link
Copy Markdown
Member

Thank you 🙏

@koral-- koral-- deleted the r8-param-types branch January 25, 2024 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants