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 support for configuration cache #164

Merged
merged 8 commits into from Mar 26, 2021
Merged

Conversation

joschi
Copy link
Contributor

@joschi joschi commented Mar 13, 2021

Remove problematic invocations in the task action and replace them with the recommended replacements from the Gradle documentation.

https://docs.gradle.org/6.8.3/userguide/configuration_cache.html
https://docs.gradle.org/6.8.3/userguide/lazy_configuration.html

Closes #160

Copy link
Contributor Author

@joschi joschi left a comment

Choose a reason for hiding this comment

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

@n0mer @tha2015 This PR contains the changes from #162 and #163 too, so depending on whether you want to merge those PRs, I can adapt this PR accordingly.

Remove problematic invocations in the task action and replace them with
the recommended replacements from the Gradle documentation.

https://docs.gradle.org/6.8.3/userguide/configuration_cache.html
https://docs.gradle.org/6.8.3/userguide/lazy_configuration.html

Closes n0mer#160
@joschi
Copy link
Contributor Author

joschi commented Mar 21, 2021

@tha2015 I've rebased the PR on the latest master branch and included the last missing part from #158.

Let me know if you have any questions about the changes in this PR. 😄

@tha2015
Copy link
Collaborator

tha2015 commented Mar 23, 2021

Hi @joschi , sorry for the delay. I was busy and could not spend much time to review and test the changes for backward compatibility. Could you help to verify that it works on Gradle 4.x and also increase the plugin version? Then I will release it. Thanks.

  • Thai

@joschi
Copy link
Contributor Author

joschi commented Mar 23, 2021

Could you help to verify that it works on Gradle 4.x

The changes won't work on Gradle 4.x because of some changes regarding how to build instances of DirectoryProperty.

This being said, I've made the plugin work with Gradle 5.1 up to Gradle 7.0-rc1 (see BackwardCompatibilityFunctionalTest) with a few exemptions from Gradle 6.0-6.3 because of a bug in Gradle's handling of properties (see comments in test).

Gradle 4.10.3 has been released on Dec 05, 2018 (more than two years ago).
Should this plugin still support Gradle 4.x?

@tha2015
Copy link
Collaborator

tha2015 commented Mar 23, 2021

Thanks for the info. Agreed that we don't have to support it anymore. We will just need to change the plugin's major version and put a note so people will be able about this change.

@joschi
Copy link
Contributor Author

joschi commented Mar 24, 2021

@tha2015 I've update the backward-compatibility test to skip tests on unsupported Java versions, bumped the plugin version to 2.3.0, and added a compatibility matrix in the README.

README.md Outdated Show resolved Hide resolved
@joschi
Copy link
Contributor Author

joschi commented Mar 25, 2021

@tha2015 Thanks for checking! I think I've caught them all now.

README.md Outdated Show resolved Hide resolved
Co-authored-by: makigumo <makigumo@users.noreply.github.com>
@tha2015 tha2015 merged commit 365c0b8 into n0mer:master Mar 26, 2021
@tha2015
Copy link
Collaborator

tha2015 commented Mar 26, 2021

FYI, I've published it but it is not approved yet.

Task :publishPlugins
Publishing plugin com.gorylenko.gradle-git-properties version 2.3.0
Thank you. Your new plugin com.gorylenko.gradle-git-properties has been submitted for approval by Gradle engineers. The
request should be processed within the next few days, at which point you will be contacted via email.

@joschi joschi deleted the config-cache branch March 26, 2021 07:39
@joschi
Copy link
Contributor Author

joschi commented Mar 29, 2021

@tha2015 Thanks for merging! 😄

Could we tag the release in this repository?
The latest tag is still https://github.com/n0mer/gradle-git-properties/releases/tag/v.2.2.4.

@tha2015
Copy link
Collaborator

tha2015 commented Mar 29, 2021 via email

joschi added a commit to joschi/gradle-git-properties that referenced this pull request Apr 7, 2021
The changes in n0mer#164 to support the Gradle configuration cache broke
using the plugin during configuration phase of Gradle (e. g. as part of
a custom plugin via `buildSrc` and similar use cases).

Fixes n0mer#169
joschi added a commit to joschi/gradle-git-properties that referenced this pull request Apr 7, 2021
The changes in n0mer#164 to support the Gradle configuration cache broke
using the plugin during configuration phase of Gradle (e. g. as part of
a custom plugin via `buildSrc` and similar use cases).

Fixes n0mer#169
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.

Support config-cache
3 participants