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

Disable JavaxInjectOnAbstractMethod for Gradle plugins #2460

Merged
merged 2 commits into from
Dec 7, 2022

Conversation

CRogers
Copy link
Contributor

@CRogers CRogers commented Dec 6, 2022

Before this PR

Gradle uses the pattern of putting @Inject on abstract methods a lot - it's how it's whole service injection for Managed Properties works. Every time you want to use one of these injected types, you need to suppress the JavaxInjectOnAbstractMethod errorprone check:

@SuppressWarnings("JavaxInjectOnAbstractMethod")
@Inject
public abstract ExecOperations getExecOperations();

After this PR

==COMMIT_MSG==
Suppress the JavaxInjectOnAbstractMethod check for projects that apply java-gradle-plugin.
==COMMIT_MSG==

Possible downsides?

@changelog-app
Copy link

changelog-app bot commented Dec 6, 2022

Generate changelog in changelog/@unreleased

Type

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

Description

Suppress the JavaxInjectOnAbstractMethod check for projects that apply java-gradle-plugin.

Check the box to generate changelog(s)

  • Generate changelog entry

@bulldozer-bot bulldozer-bot bot merged commit 2792828 into develop Dec 7, 2022
@bulldozer-bot bulldozer-bot bot deleted the callumr/disable-some-checks-on-gradle branch December 7, 2022 13:30
@svc-autorelease
Copy link
Collaborator

Released 4.184.0

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

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

# Release Notes
## 4.184.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Fix | Bring IntelliJ in sync with ErrorProne on bad inner static class names | palantir/gradle-baseline#2447 |
| Fix | Suppress the `JavaxInjectOnAbstractMethod` check for projects that apply `java-gradle-plugin`. | palantir/gradle-baseline#2460 |



To enable or disable this check, please contact the maintainers of Excavator.
This was referenced Dec 9, 2022
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.

4 participants