Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rollbar_flutter depends on "debug" dependencies from release builds #126

Open
eseidel opened this issue Mar 3, 2024 · 4 comments
Open

Comments

@eseidel
Copy link

eseidel commented Mar 3, 2024

https://shorebird.dev/ is a code-push solution for Flutter. We publish our own fork of Flutter which customers use to build their app. Our fork only (currently) contains release flavors of the Flutter engine.

We had a customer come and ask about a build failure today which seems to be related to rollbar_flutter.

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':rollbar_flutter:generateReleaseRFile'.
Could not resolve all files for configuration ':rollbar_flutter:releaseCompileClasspath'.
Could not resolve io.flutter:flutter_embedding_debug:1.0.0-62fa4e8bb30f56eb658989d3e6a982cb787d79d6.
     Required by:
         project :rollbar_flutter
Could not resolve io.flutter:flutter_embedding_debug:1.0.0-62fa4e8bb30f56eb658989d3e6a982cb787d79d6.
inconsistent module metadata found. Descriptor: io.flutter:flutter_embedding_debug:1.0.0-04817c99c9fd4956f27505204f7e344335810aed Errors: bad version: expected='1.0.0-62fa4e8bb30f56eb658989d3e6a982cb787d79d6' found='1.0.0-04817c99c9fd4956f27505204f7e344335810aed'

I believe this is the line causing the failure:

compileOnly "io.flutter:flutter_embedding_debug:${flutterVersion}"

I'm not a gradel expert, but my guess is the "correct" solution is to not depend on _debug flavors from _release builds. Maybe something like this?
https://stackoverflow.com/questions/22439593/different-dependencies-for-debug-and-release-in-gradle-and-android-studio

We can also change Shorebird to publish _debug builds, but don't plan to anytime soon since "code push" doesn't make a lot of sense in Debug builds (where hot reload is already available).

@eseidel eseidel changed the title rollbar_flutter does not work with Shorebird rollbar_flutter depends on "debug" dependencies from release builds Mar 3, 2024
@kieranmccwayleadr
Copy link

Bumping for push the fix on this.

@kevinconcourse
Copy link

Facing the same issue.
Any suggested solution?

@kieranmccwayleadr
Copy link

I forked this library and updated myself. Then in my pubspec I used the forked library instead.

@matux can we get some input on this?

@zdavis-rollbar
Copy link
Contributor

This package is now community supported. If you would like to contribute, please comment, and we can get you either as a maintainer or owner of the Flutter SDK.

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

No branches or pull requests

4 participants