You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The transformer is used to avoid any tasks dependencies, as copyFlutterAssets is hooked up in a way that it depends on the minify task, which is a required input for our task, leading to circular dependencies, see this related issue for more details: getsentry/sentry-react-native#3644
Steps to reproduce:
setup a blank flutter app
setup sentry
setup assets for the flutter app via pubspec.yaml
assets:
- some/random/file.png
Try to build the app, it fails with the following error message:
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':app:injectSentryDebugMetaPropertiesIntoAssetsDebug' (type 'InjectSentryMetaPropertiesIntoAssetsTask').
- Gradle detected a problem with the following location: '<app>/build/app/intermediates/assets/debug/mergeDebugAssets'.
Reason: Task ':app:injectSentryDebugMetaPropertiesIntoAssetsDebug' uses this output of task ':app:copyFlutterAssetsDebug' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Possible solutions:
1. Declare task ':app:copyFlutterAssetsDebug' as an input of ':app:injectSentryDebugMetaPropertiesIntoAssetsDebug'.
5. Declare an explicit dependency on ':app:copyFlutterAssetsDebug' from ':app:injectSentryDebugMetaPropertiesIntoAssetsDebug' using Task#dependsOn.
6. Declare an explicit dependency on ':app:copyFlutterAssetsDebug' from ':app:injectSentryDebugMetaPropertiesIntoAssetsDebug' using Task#mustRunAfter.
For more information, please refer to https://docs.gradle.org/8.2/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.
The text was updated successfully, but these errors were encountered:
Description
Flutter registers it's own copyAssets task, which get's wired up with the
mergeAssets
task here: https://github.com/flutter/flutter/blob/6ce591f7ea3ba827d9340ce03f7d8e3a37ebb03a/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy#L1295-L1298Our plugin on the other hand uses assets transformer to inject the properties file:
sentry-android-gradle-plugin/plugin-build/src/main/kotlin/io/sentry/android/gradle/AndroidComponentsConfig.kt
Lines 124 to 139 in 6d1c33d
The transformer is used to avoid any tasks dependencies, as
copyFlutterAssets
is hooked up in a way that it depends on theminify
task, which is a required input for our task, leading to circular dependencies, see this related issue for more details: getsentry/sentry-react-native#3644Steps to reproduce:
pubspec.yaml
The text was updated successfully, but these errors were encountered: