The BugsnagReleaseTask takes the JVM mapping file as a task input. This is used to invalidate the task's caching - if the mapping file has changed, then the code has also changed so new release information needs to be sent to Bugsnag.
If the NDK and release uploads are enabled but JVM minification is disabled, then no mapping file will exist. This means that the value of jvmMappingFileProperty will not exist, which will cause Gradle to throw an invalid user data exception on AGP 4.1.0/Gradle 6.6, because task inputs should be a valid file.
The jvmMappingFileProperty is already marked as @Optional to try and avoid this scenario. This changeset fixes the issue by only setting the property value if obfuscation is enabled, as Gradle will not attempt to validate the property in this case.
Testing
Verified changes manually by running the ndk_app_agp400 scenarios on a6ec99235e8732fb5c7f3ff52aa4cc2e4a8e4617 with and without the changes.
Goal
The
BugsnagReleaseTask
takes the JVM mapping file as a task input. This is used to invalidate the task's caching - if the mapping file has changed, then the code has also changed so new release information needs to be sent to Bugsnag.If the NDK and release uploads are enabled but JVM minification is disabled, then no mapping file will exist. This means that the value of
jvmMappingFileProperty
will not exist, which will cause Gradle to throw an invalid user data exception on AGP 4.1.0/Gradle 6.6, because task inputs should be a valid file.The
jvmMappingFileProperty
is already marked as@Optional
to try and avoid this scenario. This changeset fixes the issue by only setting the property value if obfuscation is enabled, as Gradle will not attempt to validate the property in this case.Testing
Verified changes manually by running the
ndk_app_agp400
scenarios on a6ec99235e8732fb5c7f3ff52aa4cc2e4a8e4617 with and without the changes.