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

Reduce usage of Guice #504

Merged
merged 1 commit into from
Jan 24, 2024
Merged

Reduce usage of Guice #504

merged 1 commit into from
Jan 24, 2024

Conversation

basil
Copy link
Member

@basil basil commented Jan 24, 2024

This plugin's tests currently depend on javax.inject, preventing them from running against Jenkins core with Guice 7.0 or later which only provide jakarta.inject (currently Jenkins core ships Guice 6.0 which provides both javax.inject and jakarta.jnject). To prepare for this migration, stop using Guice in favor of traditional static dependency injection.

Testing done

Ran mvn clean verify -Dtest=com.cloudbees.jenkins.support.SupportActionTest against jenkinsci/jenkins#8889.

@basil basil added the chore label Jan 24, 2024
@basil basil requested a review from a team as a code owner January 24, 2024 01:36
@@ -78,12 +77,11 @@ public class SupportActionTest {
@Rule
public LoggerRule logger = new LoggerRule();

@Inject
SupportAction root;
private SupportAction root;
Copy link
Member

Choose a reason for hiding this comment

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

(could now simply be inlined)

@jglick jglick merged commit a256158 into jenkinsci:master Jan 24, 2024
17 checks passed
@basil basil deleted the guice branch January 24, 2024 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants