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

Opt all tasks out of tracking and configuration caching. #20

Merged
merged 1 commit into from
May 11, 2022

Conversation

autonomousapps
Copy link
Contributor

@autonomousapps autonomousapps commented May 11, 2022

Resolves #4.

See https://docs.gradle.org/current/userguide/configuration_cache.html for more information.

The point of notCompatibleWithConfigurationCache("Uses Project at execution time") is to tell Gradle that, if a user tries to run this task with the flag org.gradle.unsafe.configuration-cache=true set, then that flag should be ignored. Without that method call, then Gradle would instead fail the build. This lets users say they want CC on by default, while gracefully falling back to having it off for tasks that aren't compatible. Otherwise, they'd have to remember it doesn't work for tasks X, Y, and Z, and manually use --no-configuration-cache, which is annoying.

As an aside, something weird is happening with this project's .gitignore files. I had to manually add both files in the utils package.

git add dependency-guard/src/main/kotlin/com/dropbox/gradle/plugins/dependencyguard/internal/utils/GradleVersion.kt
The following paths are ignored by one of your .gitignore files:
dependency-guard/src/main/kotlin/com/dropbox/gradle
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"

I think it's the gitignore rule to ignore simply gradle.

Copy link
Collaborator

@handstandsam handstandsam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, can you add a test? If not, that's fine. Will merge later tonight!

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.

Tasks not compatible with the configuration cache
2 participants