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

Enable stricter Gradle plugin validation #1257

Merged
merged 4 commits into from
Dec 19, 2022
Merged

Conversation

3flex
Copy link
Contributor

@3flex 3flex commented Dec 19, 2022

Pull Request Details

Improves cacheability of plugin tasks.

Description

  1. Enable stricter Gradle plugin validations
  2. Remove unnecessary property annotations from extension
  3. Add missing property annotations to tasks

Related Issue

Addresses one of the points raised in #1134, specifically:

The properties should be annotated correctly
https://docs.gradle.org/current/userguide/more_about_tasks.html#table:incremental_build_annotations

Closes #1258

Motivation and Context

This improves the state of Gradle incremental builds and also identifies tasks that are missing annotations that declare whether they're cacheable or not. Both of these improve build performance.

Changing the configuration of the validatePlugins task to use stricter checks will ensure this problem doesn't occur again as new tasks and properties are added.

How Has This Been Tested

Ran ./gradlew validatePlugins. I haven't done testing of the tasks though. The annotations need to be reviewed by someone who has detailed knowledge of each task before merging.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have included my change in the CHANGELOG.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@hsz hsz added this to the next milestone Dec 19, 2022
@hsz
Copy link
Member

hsz commented Dec 19, 2022

Thank you very much for taking care of it, Matthew!

For tasks you've marked with UntrackedTask that download additional resources – I'll extract CLI tools downloading to separated tasks (as they may or may not be executed when the latest value is used as a CLI version), so the actual task will be possible to get cached if CLI is already available.

@hsz hsz merged commit 676eb22 into JetBrains:master Dec 19, 2022
@3flex 3flex deleted the validate-plugin branch December 19, 2022 19:53
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.

Enable strict validation of Gradle tasks
2 participants