- 
                Notifications
    
You must be signed in to change notification settings  - Fork 4.4k
 
Closed
Labels
Description
Gson version
2.13.0
Java / Android version
Android 14 (API 34)
Android 15 (API 35)
Used tools
- Maven; version:
 - Gradle; version: 8
 - ProGuard (attach the configuration file please); version:
 - com.jaredsburrows:gradle-license-plugin:0.9.7
 - React Native: 0.75.5
 
Description
The latest version of gson (2.13.0), released around April 11, 2025, causes StackOverflowErrors when used with Gradle license report generation tools, specifically with com.jaredsburrows:gradle-license-plugin:0.9.7.
Expected behavior
The license report generation task should complete successfully, as it does with gson 2.12.1 and earlier versions.
Actual behavior
When the project resolves to gson 2.13.0, the license report generation task fails with a StackOverflowError with no additional error message.
Reproduction steps
- Create or use a project that includes the gradle-license-plugin:
 
plugins {
  id "com.jaredsburrows.license" version "0.9.7"
}- Include a dependency that uses gson 2.13.0 (or a library with wildcard dependency like 
com.google.code.gson:gson:+). In my case this happens withrollbar-react-native - Configure license report generation:
 
licenseReport {
  generateHtmlReport = false
  generateJsonReport = true
  copyHtmlReportToAssets = false
  copyJsonReportToAssets = true
}- Run the license report generation task:
 
./gradlew licenseReleaseReport
Exception stack trace
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:licenseReleaseReport'.
> java.lang.StackOverflowError (no error message)
Additional information:
- The error does not occur when forcing gson 2.12.1 with this workaround:
 
configurations.all {
  resolutionStrategy {
    force 'com.google.code.gson:gson:2.12.1'
  }
}- I discovered this issue in a React Native project using rollbar-react-native, which includes a wildcard dependency on gson, but the issue appears to be with gson 2.13.0 itself.
 
ccodega and Glasi731