I receive following warning while executing gradle in android:
Configuration 'compile' in project ':app' is deprecated.
But all my dependencies included via implementation configuration. (And modules too) Are there any "invisible" dependencies in gradle?
Here is my main build gradle file: https://pastebin.com/ZJe7zrwn
Fortunately, the implementation dependency configuration provides the same functionality as compile. You should always use implementation rather than compile for dependencies, as compile is now deprecated or removed in the case of Gradle 7+.
compileOnly is the replacement — the equivalent configuration that is being deprecated is provided .
The compileOnly configuration is used to itemize a dependency that you need to compile your code, same as compile above. The difference is that packages your java code use from a compileOnly dependency will not be listed as Import-Package manifest entries.
I found this working solution while compiling my code today. (When everything is implementation
and nothing is compile
in your build.gradle
)
Errors:
1. Configuration 'compile' in project ':app' is deprecated
2. registerResGeneratingTask is deprecated, use registerGeneratedFolders (FileCollection)
Solution:
I needed to update my Project: build.gradle
from
classpath 'com.google.gms:google-services:3.1.0'
to
classpath 'com.google.gms:google-services:3.2.0'
Are there any "invisible" dependencies in gradle?
I don't know whether it's responsible for this problem, but plugins can add dependencies, and in particular com.google.gms.google-services
does:
The google-services plugin has two main functions: ...
- Add dependencies for basic libraries required for the services you have enabled.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With