Skip to content
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

Avoid using compile configuration for Gradle #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sigv
Copy link

@sigv sigv commented Aug 11, 2020

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.

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
@sigv sigv force-pushed the gradle-compile-implementation branch from 686f200 to 34ad30d Compare May 20, 2023 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant