Skip to content

Invocation of Task.project at execution time has been deprecated. This will fail with an error in Gradle 10.0. #21489

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

Open
gastendonk opened this issue May 22, 2025 · 7 comments

Comments

@gastendonk
Copy link

gastendonk commented May 22, 2025

  • OS: Linux
  • Java 17
  • Gradle 8.14
  • Vaadin Plugin 24.7.3
  • Vaadin lib 24.7.3

Updating to newer Vaadin version and so newer Gradle version.

Jenkins reports this:

Task :i1-webapp:vaadinPrepareFrontend
Invocation of Task.project at execution time has been deprecated. This will fail with an error in Gradle 10.0. This API is incompatible with the configuration cache, which will become the only mode supported by Gradle in a future release. Consult the upgrading guide for further information: https://docs.gradle.org/8.14/userguide/upgrading_version_7.html#task_project
at org.gradle.internal.cc.impl.DeprecatedFeaturesListener.nagUserAbout(DeprecatedFeaturesListener.kt:98)

How do I solve this Vaadin problem?

Here some content of i1-webapp/build.gradle:

plugins {
    id 'com.vaadin' version '24.7.3'
}

vaadin {
    optimizeBundle = false
    productionMode = true
    forceProductionBuild = true
}

Task :i1-webapp:vaadinBuildFrontend
The ResolvedConfiguration.getFiles() method has been deprecated. This is scheduled to be removed in Gradle 9.0. Use Configuration#getFiles instead. Consult the upgrading guide for further information: https://docs.gradle.org/8.14/userguide/upgrading_version_8.html#deprecate_legacy_configuration_get_files
at org.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfiguration.getFiles(DefaultResolvedConfiguration.java:81)

We had to add classpath 'com.fasterxml.jackson.core:jackson-core:2.18.3' to the settings.gradle dependencies to make the new Vaadin build work. Can you explain me why is this necessary?

@mcollovati
Copy link
Collaborator

About the warnings, they are fixed in 24.8 by the changes introduced to support the configuration cache (#21022).

However, I can't see any errors related to Jackson build the Gradle starter project for production.
Can you share the logs produced by the failed build, or even better provide a project that reproduces the problem?

@mcollovati mcollovati transferred this issue from vaadin/vaadin-gradle-plugin May 22, 2025
@gastendonk
Copy link
Author

How can I use 24.8 (24.8.0.alpha1) ? (Does Vaadin lib 24.7.x work with Gradle plugin 24.8 ? )

Since my colleague is absent, I cannot provide Jackson details at this time.

@mcollovati
Copy link
Collaborator

You can use 24.8.0.alpha7 by adding the pre-releases plugin repository in the to Gradle settings file.

pluginManagement {
  repositories {
      maven { url = 'https://maven.vaadin.com/vaadin-prereleases' }
      gradlePluginPortal()
  }
  plugins {
      id 'com.vaadin' version "24.8.0.alpha7"
  }
}

However, I cannot 100% assure that the 24.8 plugin will work with 24.7.
In addition, I would not recommend using this approach only because of warning messages.

About Jackson, I wonder if there's a chance your project is pining a version that is older than the Vaadin supported one.

@gastendonk
Copy link
Author

I can't integrate 24.8.0.alpha7. I have to wait for the stable version. The Vaadin update will have to wait. We always have a lot of trouble with Gradle, and especially with Vaadin.

@mshabarov
Copy link
Contributor

@gastendonk thanks for the ticket and your feedback! Could you please share with us what are the main pain points for you when using Gradle with Vaadin, what could we improve?

@gastendonk
Copy link
Author

@mcollovati When will plugin 24.8 be released?

@mcollovati
Copy link
Collaborator

The first beta release is coming soon. GA is planned around the middle of June

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants