From 34ad30d8bedb7887939186a30e18179c5d7f3848 Mon Sep 17 00:00:00 2001 From: Valters Jansons Date: Tue, 11 Aug 2020 12:31:37 +0300 Subject: [PATCH] Avoid using `compile` configuration for Gradle 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 https://docs.gradle.org/3.4/release-notes.html#the-java-library-plugin 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 commit simply swaps the `compile` out for an `implementation`. https://docs.gradle.org/6.6/userguide/java_library_plugin.html#sec:java_library_configurations_graph --- _includes/macros/mavenDep.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/macros/mavenDep.md b/_includes/macros/mavenDep.md index edc1941..6b1a6e1 100644 --- a/_includes/macros/mavenDep.md +++ b/_includes/macros/mavenDep.md @@ -20,8 +20,8 @@ ### Other dependency managers:
~~~java -Gradle : compile "com.sparkjava:spark-core:2.9.4" // add to build.gradle (for Java users) -Gradle : compile "com.sparkjava:spark-kotlin:1.0.0-alpha" // add to build.gradle (for Kotlin users) +Gradle : implementation "com.sparkjava:spark-core:2.9.4" // add to build.gradle (for Java users) +Gradle : implementation "com.sparkjava:spark-kotlin:1.0.0-alpha" // add to build.gradle (for Kotlin users) Ivy : // ivy.xml SBT : libraryDependencies += "com.sparkjava" % "spark-core" % "2.9.4" // build.sbt ~~~