perwendel / perwendel.github.io

The http://sparkjava.com web page
8 stars 8 forks source link

Avoid using `compile` configuration for Gradle #22

Open sigv opened 4 years ago

sigv commented 4 years ago

The existing suggestion for using compile dependencies has been discouraged with Gradle 3.4 way way back.

> instead of compile, you should use one of implementation or api The Java Library plugin (Gradle 3.4 Release Notes)

On a recent Gradle version you will see a scary deprecation warning.

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

Upon turning on --warning-mode all you will discover it is exactly about that compile declaration that is suggested.

The compile configuration has been deprecated for dependency declaration. This will fail with an error in Gradle 7.0.

This PR simply swaps the compile out for an implementation.

The Java Library plugin configurations (The Java Library Plugin - Gradle 6.6 User Manual)


If there is a script which writes that file, I wasn't able to find it linked, and that should be updated as well to use implementation instead of compile.