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

gradle task configuration avoidance #2299

Merged
merged 2 commits into from
Jun 14, 2022
Merged

gradle task configuration avoidance #2299

merged 2 commits into from
Jun 14, 2022

Conversation

rzpt
Copy link
Contributor

@rzpt rzpt commented Jun 11, 2022

also fix an issue in BaselineJavaVersion

Before this PR

We are unnecessarily creating and configuring tasks during gradle configuration. See https://docs.gradle.org/current/userguide/task_configuration_avoidance.html for more details.

After this PR

==COMMIT_MSG==
Avoid creating and configuring gradle tasks
==COMMIT_MSG==

Possible downsides?

None.

@changelog-app
Copy link

changelog-app bot commented Jun 11, 2022

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Avoid creating and configuring gradle tasks

Check the box to generate changelog(s)

  • Generate changelog entry

also fix an issue in BaselineJavaVersion
.register("checkJavaVersions", CheckJavaVersionsTask.class, new Action<CheckJavaVersionsTask>() {
@Override
public void execute(CheckJavaVersionsTask task) {
task.getTargetVersion().set(extension.target());
task.getRuntimeVersion().set(extension.runtime());
project.getTasks().getByName("check").dependsOn(task);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a problem because check would only depend on checkJavaVersions if checkJavaVersions was configured.

@bulldozer-bot bulldozer-bot bot merged commit dbd8a5c into develop Jun 14, 2022
@bulldozer-bot bulldozer-bot bot deleted the avoidance branch June 14, 2022 19:25
@svc-autorelease
Copy link
Collaborator

Released 4.144.0

This was referenced Jun 14, 2022
This was referenced Jun 14, 2022
bulldozer-bot bot pushed a commit to palantir/witchcraft-api that referenced this pull request Jun 15, 2022
###### _excavator_ is a bot for automating changes across repositories.

Changes produced by the roomba/latest-baseline-oss check.

# Release Notes
## 4.144.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Improvement | Avoid creating and configuring gradle tasks | palantir/gradle-baseline#2299 |



To enable or disable this check, please contact the maintainers of Excavator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants