Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-6262

IDE shoulld print a warning if it chooses different Gradle distribution than configured

Agile BoardAttach filesAttach ScreenshotAdd voteVotersWatch issueWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments


    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • projects - Gradle
    • None


      The gradle implementation may choose a different Gradle than configure in the project's gradle-wrapper.properties in case the distribution is not compatible with the runtime JDK that should run the gradle daemon. 

      This may lead to unexpected situations, like version conflict between a gradle plugin and gradle core, such as this:

      FINE [org.netbeans.modules.gradle.loaders.LegacyProjectLoader]: Failed to retrieve project information for: /space/src/vscode/scratch/micronaut-jdbc-repository
      org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'micronautguide'.
          at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:75)
          at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:68)
          at org.gradle.configuration.project.LifecycleProjectEvaluator.access$400(LifecycleProjectEvaluator.java:51)
      Caused by: java.lang.IllegalStateException: The value for task ':test' property 'testFrameworkProperty' is final and cannot be changed any further.
          at org.gradle.api.internal.provider.AbstractProperty$FinalizedValue.beforeMutate(AbstractProperty.java:489)
          at org.gradle.api.internal.provider.AbstractProperty.assertCanMutate(AbstractProperty.java:263)
          at org.gradle.api.internal.provider.AbstractProperty.setSupplier(AbstractProperty.java:212)
          at org.gradle.api.internal.provider.DefaultProperty.set(DefaultProperty.java:71)
          at org.gradle.api.tasks.testing.Test.useTestFramework(Test.java:979)
          at org.gradle.api.tasks.testing.Test.useJUnitPlatform(Test.java:1049)
          at org.gradle.api.tasks.testing.Test.useJUnitPlatform(Test.java:1032)
          at io.micronaut.gradle.MicronautLibraryPlugin.lambda$null$1(MicronautLibraryPlugin.java:103)

      Apparently the plugin works OK with gradle 7.2 that the project uses, but fails with gradle 7.3 because of some incompatible change in gradle.

      The IDE should at least print a warning message. I would even recommend to provide a setting that would fail the build, if such incompatibility is found.




          This comment will be Viewable by All Users Viewable by All Users


            sdedic Svatopluk Dedic Assign to me
            sdedic Svatopluk Dedic




                Issue deployment