Page 1 of 1

Deprecated Gradle

Posted: Wed Feb 28, 2024 4:39 pm
by lnszmjhe
When compiling the .JAR in Intellij IDEA this message appears.
How to resolve this?


Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.3/userguide/c ... e_warnings in the Gradle documentation.
 

Re: Deprecated Gradle

Posted: Wed Feb 28, 2024 5:12 pm
by Andry API support
Hi, please follow the steps in this answer. You will need to run gradle outside IDEA to figure what is wrong
https://stackoverflow.com/a/70120647/15539205

Re: Deprecated Gradle

Posted: Thu Feb 29, 2024 9:29 pm
by lnszmjhe
I don't think it's the same case as mine.
But I'm looking for a solution on the Gradle forums.
Thanks

Re: Deprecated Gradle

Posted: Fri Mar 01, 2024 10:47 am
by Svyatoslav
Hi. It is just saying that there is a feature being used that *will* become deprecated in 9.0. By itself - this is not harmful, it will just prevent project from being upgraded to newer gradle. If gradle wrapper is used - it will just keep using older gradle and be ok until it is manually updated. Preferably the authors of the project should replace soon-to-be-obsolete feature with a new alternative.

I suspect that relates to one of our demo projects?) If yes - could you please send a link?

Re: Deprecated Gradle

Posted: Sat Mar 02, 2024 10:42 am
by lnszmjhe
The problem was in the lines:

sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

in the build.gradle settings file.

I commented these lines and everything went back to normal

07:57:44: Executing 'build --warning-mode=all'...

> Task :compileJava UP-TO-DATE
> Task :processResources NO-SOURCE
> Task :classes UP-TO-DATE
> Task :jar UP-TO-DATE
> Task :assemble UP-TO-DATE
> Task :compileTestJava NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test NO-SOURCE
> Task :check UP-TO-DATE
> Task :build UP-TO-DATE

BUILD SUCCESSFUL in 891ms
2 actionable tasks: 2 up-to-date
07:57:45: Execution finished 'build --warning-mode=all'.