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

🐛 [firebase_core] Support Gradle 8 #10825

Closed
guidezpl opened this issue Apr 20, 2023 · 5 comments · Fixed by #10901
Closed

🐛 [firebase_core] Support Gradle 8 #10825

guidezpl opened this issue Apr 20, 2023 · 5 comments · Fixed by #10901
Assignees
Labels
platform: android Issues / PRs which are specifically for Android. plugin: core resolution: fixed A fix has been merged or is pending merge from a PR. type: bug Something isn't working

Comments

@guidezpl
Copy link

guidezpl commented Apr 20, 2023

Bug report

Describe the bug
Gradle 8 is not supported.

Steps to reproduce

Steps to reproduce the behavior:

  1. Update a Flutter's build.gradle to use classpath 'com.android.tools.build:gradle:8.0.0'
  2. Try to build
  3. See error:
A problem occurred configuring project ':firebase_core'.
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
   > Namespace not specified. Please specify a namespace in the module's build.gradle file like so:

android {
    namespace 'com.example.namespace'
}

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

Expected behavior

No errors

Sample project

https://github.com/flutter/gallery

@guidezpl guidezpl added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Apr 20, 2023
@darshankawar darshankawar added the triage Issue is currently being triaged. label Apr 21, 2023
@darshankawar
Copy link

Similar issue in flutter repo for more details: flutter/flutter#125181

flutter/flutter#125181 (comment)

@darshankawar darshankawar added plugin: core platform: android Issues / PRs which are specifically for Android. and removed Needs Attention This issue needs maintainer attention. triage Issue is currently being triaged. labels Apr 21, 2023
@darshankawar
Copy link

/cc @Lyokone

@vbuberen
Copy link
Contributor

vbuberen commented Apr 21, 2023

Would like to share some of experience of trying to update to AGP 8 and Gradle 8 for one of packages: ajinasokan/flutter_displaymode#21

The issue is in missing namespace only. However, I would suggest to not remove package tag for now (till integration_tests package supports the new namespace property) from AndroidManifest to not fail integration tests as it happens here: https://github.com/fluttercommunity/plus_plugins/actions/runs/4756241629/jobs/8451506112?pr=1699
Finally, Flutter 3.7.12 is required to build the project after updates or, otherwise, there will be errors pointing to flutter_tools, like I had yesterday before moving from 3.7.11:

FAILURE: Build failed with an exception.
* Where:
Script '/Users/vb/Development/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 912

@Lyokone
Copy link
Contributor

Lyokone commented May 4, 2023

Support for AGP 8.0 will be rolled out in a couple of hours. Please note that some of our dependencies (like GRPC Java) are not fully compatible yet. So if you are using Firestore / Database or Performance) you should probably wait a bit on AGP 7.4.2 till every dependency is compatible.

@darshankawar darshankawar added the resolution: fixed A fix has been merged or is pending merge from a PR. label May 4, 2023
@Lyokone
Copy link
Contributor

Lyokone commented May 5, 2023

After some more investigation, it seems that adding the

  integration_test:
    sdk: flutter

is what is causing the R8 errors. Till integration_test is, not fully updated you should stay on 7.4.2 if your are using integration testing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform: android Issues / PRs which are specifically for Android. plugin: core resolution: fixed A fix has been merged or is pending merge from a PR. type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants