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

Fix incorrect wiring of the GoogleServicesTask #232

Merged
merged 1 commit into from
Jun 22, 2022

Conversation

cmwarrington
Copy link
Contributor

In the process of making configuration of the GooglerServicesTask lazily
configured, the registration of the generated outputs with the Android
Gradle plugin was moved into the task configuration block. This only
works if the google services task is configured before any of the tasks
that consume it, which is not guaranteed, leading to the

This changes also removes the partial workaround of manually adding the
task dependency to one of the consuming tasks.

Issue: #228
Also potentially related: #228
Test: Manually verified that the wiring works correctly with AGP 7.4.0-alpha03 and Gradle 7.5-rc-1

gavra0
gavra0 previously approved these changes Jun 9, 2022
In the process of making configuration of the GooglerServicesTask lazily
configured, the registration of the generated outputs with the Android
Gradle plugin was moved into the lazy task configuration. This only
works if the google services task is configured before any of the tasks
that consume it, which is not guaranteed, leading to the below issues.

This change also removes the partial workaround of manually adding the
task dependency to one of the consuming tasks.

Issue: google#228
Also potentially related: google#228
Test: Manually verified that the wiring works correctly with AGP 7.4.0-alpha03 and Gradle 7.5-rc-1
@davidmotson davidmotson merged commit fbaadbe into google:master Jun 22, 2022
@seventhmoon
Copy link

https://b.corp.google.com/issues/237071883?pli=1

AGP: 7.2.1
Gradle: 7.4.2
Google Play Services Plugin: 4.3.12

The following Error was shown when building. I believe it is related to this CL.


Execution failed for task ':app:uploadCrashlyticsMappingFileRelease'.
> Failed to calculate the value of task ':app:uploadCrashlyticsMappingFileRelease' property 'googleServicesResourceRoot'.
   > Could not get unknown property 'intermediateDir' for task ':app:processReleaseGoogleServices' of type com.google.gms.googleservices.GoogleServicesTask.

@thatfiredev
Copy link
Member

Seeing that same error in firebase/quickstart-android#1385

@ItzNotABug
Copy link

https://b.corp.google.com/issues/237071883?pli=1

AGP: 7.2.1 Gradle: 7.4.2 Google Play Services Plugin: 4.3.12

The following Error was shown when building. I believe it is related to this CL.


Execution failed for task ':app:uploadCrashlyticsMappingFileRelease'.
> Failed to calculate the value of task ':app:uploadCrashlyticsMappingFileRelease' property 'googleServicesResourceRoot'.
   > Could not get unknown property 'intermediateDir' for task ':app:processReleaseGoogleServices' of type com.google.gms.googleservices.GoogleServicesTask.

The plugin version 4.3.5 seems to be working for now as 4.3.10 isn't supported for that Gradle version.

@PattaFeuFeu
Copy link

Getting the same issue here with an older Gradle and AGP version:

AGP: 4.2.2
Gradle: 6.9.0
Google Play Services Plugin: 4.3.12

 * What went wrong:
Could not determine the dependencies of task ':app:uploadCrashlyticsMappingFileQaRelease'.
> Failed to query the value of task ':app:uploadCrashlyticsMappingFileQaRelease' property 'googleServicesResourceRoot'.
   > Could not get unknown property 'intermediateDir' for task ':app:processQaReleaseGoogleServices' of type com.google.gms.googleservices.GoogleServicesTask.

@ljubenAtPropertyMe
Copy link

Problem is not isolated to native development. Facing the same problem with flutter builds. 4.3.10 works, 4.3.12 doesn't. Seeing the number of comments above - is there an ETA on a fix?

@ArnyminerZ
Copy link

Getting the same problem as above:

* What went wrong:
Execution failed for task ':base:uploadCrashlyticsMappingFileRelease'.
> Failed to calculate the value of task ':base:uploadCrashlyticsMappingFileRelease' property 'googleServicesResourceRoot'.
   > Could not get unknown property 'intermediateDir' for task ':base:processReleaseGoogleServices' of type com.google.gms.googleservices.GoogleServicesTask.

Fixed by downgrading to 4.3.10. Using version 7.2.1 of AGP, and Kotlin 1.6.10 (Can't upgrade to 1.7 because of Jetpack Compose's dependency on 1.6.10). Same error with both SDK 32 and 33, just in case it's helpful in any way.

@ItzNotABug
Copy link

Looks like a fix has been added but not released.
Any ETA on when this fix would be released?

@thatfiredev
Copy link
Member

thatfiredev commented Jun 29, 2022

Hey all 👋
The fix has now been released in version 4.3.13
Thanks for your patience!

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

Successfully merging this pull request may close these issues.

None yet

9 participants