Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Draft
mkurz wants to merge1 commit intoplayframework:main
base:main
Choose a base branch
Loading
frommkurz:gradle_jakarta

Conversation

mkurz
Copy link
Member

For Play itself not really relevant, this is just about the gradle plugin.

Currently gradle only supportsjavax.inject, whichis hardcoded.

So we need to wait for:

@@ -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")
Copy link
MemberAuthor

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:

@mkurz
Copy link
MemberAuthor

btw, currently this is failing with:

Welcome to Gradle 8.12!Here are the highlights of this release: - Enhanced error and warning reporting with the Problems API - File-system watching support on Alpine Linux - Build and test Swift 6 libraries and appsFor more details see https://docs.gradle.org/8.12/release-notes.htmlTo honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.12/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.Daemon will be stopped at the end of the build > Task :clean> Task :checkKotlinGradlePluginConfigurationErrors SKIPPED> Task :compileKotlin NO-SOURCENote: /home/runner/work/playframework/playframework/dev-mode/gradle-plugin/src/main/java/play/gradle/internal/RoutesCompileAction.java uses or overrides a deprecated API.Note: Recompile with -Xlint:deprecation for details.> Task :compileJava> Task :pluginDescriptors> Task :processResources> Task :classes> Task :jar> Task :compileTestKotlin NO-SOURCE> Task :compileTestJava> Task :pluginUnderTestMetadata> Task :processTestResources NO-SOURCE> Task :testClasses> Task :testPlayPluginTest > Play extension should be registered FAILED    org.gradle.api.internal.plugins.PluginApplicationException at PlayPluginTest.java:23        Caused by: org.gradle.api.plugins.PluginInstantiationException at PlayPluginTest.java:23            Caused by: java.lang.IllegalArgumentException at PlayPluginTest.java:23PlayRoutesPluginTest > Play Routes configuration should be registered FAILED    org.gradle.api.internal.plugins.PluginApplicationException at PlayRoutesPluginTest.java:29        Caused by: org.gradle.api.plugins.PluginInstantiationException at PlayRoutesPluginTest.java:29            Caused by: java.lang.IllegalArgumentException at InjectUtil.java:57PlayRoutesPluginTest > Routes source directory set should be registered for main source set FAILED    org.gradle.api.internal.plugins.PluginApplicationException at PlayRoutesPluginTest.java:29        Caused by: org.gradle.api.plugins.PluginInstantiationException at PlayRoutesPluginTest.java:29            Caused by: java.lang.IllegalArgumentException at InjectUtil.java:57PlayRoutesPluginTest > Routes source directory set should be registered for test source set FAILED    org.gradle.api.internal.plugins.PluginApplicationException at PlayRoutesPluginTest.java:29        Caused by: org.gradle.api.plugins.PluginInstantiationException at PlayRoutesPluginTest.java:29            Caused by: java.lang.IllegalArgumentException at InjectUtil.java:57PlayRoutesPluginTest > Routes compile task should be registered for main/test source sets FAILED    org.gradle.api.internal.plugins.PluginApplicationException at PlayRoutesPluginTest.java:29        Caused by: org.gradle.api.plugins.PluginInstantiationException at PlayRoutesPluginTest.java:29            Caused by: java.lang.IllegalArgumentException at InjectUtil.java:57PlayRunPluginTest > Check classpath with submodules FAILED    org.gradle.api.internal.plugins.PluginApplicationException at PlayRunPluginTest.java:34        Caused by: org.gradle.api.plugins.PluginInstantiationException at PlayRunPluginTest.java:34            Caused by: java.lang.IllegalArgumentException at InjectUtil.java:576 tests completed, 6 failedFAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':test'.> There were failing tests. See the report at: file:///home/runner/work/playframework/playframework/dev-mode/gradle-plugin/build/reports/tests/test/index.html* Try:> Run with --scan to get full insights.BUILD FAILED in 1m 4s> Task :test FAILED[Incubating] Problems report is available at: file:///home/runner/work/playframework/playframework/dev-mode/gradle-plugin/build/reports/problems/problems-report.html8 actionable tasks: 8 executed

@@ -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()");
Copy link
Member

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 😉

mkurz reacted with thumbs up emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ihostageihostageihostage left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@mkurz@ihostage

[8]ページ先頭

©2009-2025 Movatter.jp