Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork4.1k
Migrate tojakarta.inject.*
in gradle plugin (requiresjakarta.inject-api
dependency)#13090
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -37,6 +37,7 @@ dependencies { | |||
compileOnly("org.playframework:play-routes-compiler_2.13:$playVersion") | |||
compileOnly("org.playframework.twirl:gradle-twirl:${libs.versions.twirl.get()}") | |||
implementation("org.playframework:play-run-support:$playVersion") | |||
implementation("jakarta.inject:jakarta.inject-api:2.0.1") |
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.
Not sure if this will really be necessary, because it seems currently gradle implicitly adds the javax dependency, so maybe they will do the same with the jakarta one:
btw, currently this is failing with:
|
@@ -80,7 +80,7 @@ private void configureTwirlDefaultImports(final Project project) { | |||
}); | |||
} | |||
var annotations = ((TwirlSourceDirectorySet) twirlSource).getConstructorAnnotations(); | |||
if (annotations != null) annotations.add("@javax.inject.Inject()"); | |||
if (annotations != null) annotations.add("@jakarta.inject.Inject()"); |
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.
I extracted this important change into separated PR#13226 😉
For Play itself not really relevant, this is just about the gradle plugin.
Currently gradle only supports
javax.inject
, whichis hardcoded.So we need to wait for: