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

Add call to notCompatibleWithConfigurationCache to LicensesTask #242

Merged
merged 1 commit into from
Sep 22, 2022

Conversation

caller9
Copy link
Collaborator

@caller9 caller9 commented Sep 22, 2022

Calling notCompatibleWithConfigurationCache on the LicensesTask will prevent the build failure and instead only warn of the issue the first time it is encountered. We do a respondsTo method check before calling it. The method was added as incubating in Gradle 7.4 and may be removed in a future version.

We use the Project object during LicensesTask execution to query the location of POM files and any Play Services SDKs to extract license information. We don't know which artifact IDs to use in those queries until the AGP task that produces the information has run. It's a bit of a circular problem, but we can at least prevent the build halting error.

Running repeated builds still results in <= 1 second build time for a test project.

fix #206

@caller9 caller9 requested a review from jkasnicki September 22, 2022 15:54
@caller9 caller9 merged commit 45ec9c6 into master Sep 22, 2022
@caller9 caller9 deleted the config_cache branch September 22, 2022 17:47
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.

Configuration Cache is not working for two tasks
2 participants