-
Notifications
You must be signed in to change notification settings - Fork 172
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
feat: Use com.google.inject
over javax.inject
to allow migrate to guice7+
#2884
feat: Use com.google.inject
over javax.inject
to allow migrate to guice7+
#2884
Conversation
…ing to Guice 7 This replaces usages to enable migration to [Guice 7+](https://github.com/google/guice/wiki/Guice700). This is the first (only?) step to allow projects using Guice 6.0.0 *or* Guice 7.0.0 to use `misk-inject`. By using `com.google.inject` instead of `javax.inject`, injections work in both 6+ and 7+ versions. The new project, `:misk-inject-guice7-test` sets up a test project with the classpath forced to Guice 7+. This acts as a guard project for basic usages. As needed, we can add more content.
@@ -0,0 +1,5 @@ | |||
## misk-inject-guice7-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These files are the only not-renaming-import changes
@@ -0,0 +1,23 @@ | |||
|
|||
plugins { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These files are the only not-renaming-import changes
import org.junit.jupiter.api.BeforeEach | ||
import org.junit.jupiter.api.Test | ||
|
||
internal class Guice7IntegrationTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These files are the only not-renaming-import changes
import org.assertj.core.api.Assertions.assertThat | ||
|
||
@Singleton | ||
internal class Guice7TestClass @Inject constructor( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These files are the only not-renaming-import changes
@@ -0,0 +1,5 @@ | |||
package misk.inject.guice7 | |||
|
|||
internal interface Guice7TestInterface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These files are the only not-renaming-import changes
com.google.inject
over javax.inject
to allow migrat…com.google.inject
over javax.inject
to allow migrate to guice7+
Proposal: #2863
This replaces usages to enable migration to Guice 7+. This is the first (only?) step to allow projects using Guice 6.0.0 or Guice 7.0.0 to use
misk-inject
.By using
com.google.inject
instead ofjavax.inject
, injections work in both 6+ and 7+ versions. The new project,:misk-inject-guice7-test
sets up a test project with the classpath forced to Guice 7+. This acts as a guard project for basic usages. As needed, we can add more content.