Wrichik Basu
Wrichik Basu

Reputation: 1363

How to deal with these deprecation warnings by Gradle v6.3?

I updated Android Gradle Plugin to v3.6.2 and Grade to v6.3 in Android Studio. When I run a build with the compiler option --warning-mode all, I get the following two deprecation warnings:

1:

Configure project :app
Internal API constructor DefaultDomainObjectSet(Class<T>) has been deprecated. This is scheduled to be removed in Gradle 7.0. Please use ObjectFactory.domainObjectSet(Class<T>) instead. See https://docs.gradle.org/6.3/userguide/custom_gradle_types.html#domainobjectset for more details.
    at build_gklh609eby8f87cnghyses56.run(E:\Mahalaya\app\build.gradle:1)
    (Run with --stacktrace to get the full stack trace of this deprecation warning.)

2:

Querying the mapped value of map(property(interface org.gradle.api.file.Directory, property(interface org.gradle.api.file.Directory, fixed(class org.gradle.api.internal.file.DefaultFilePropertyFactory$FixedDirectory, E:\Mahalaya\app\build\generated\ap_generated_sources\debug\out)))) before task ':app:compileDebugJavaWithJavac' has completed has been deprecated. This will fail with an error in Gradle 7.0. Consult the upgrading guide for further information: https://docs.gradle.org/6.3/userguide/upgrading_version_6.html#querying_a_mapped_output_property_of_a_task_before_the_task_has_completed

It hasn't been a long time since I have started programming in Android, and I have no idea about what to do about these warnings. I can't understand what is being said in the links. Any help is appreciated.

Update: Gradle v6.5 shows the same warnings.

Upvotes: 6

Views: 4270

Answers (1)

Numan Karaaslan
Numan Karaaslan

Reputation: 1645

I think it is caused by one of these plugins. I have it too:

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

And i also think they will update these plugins as well. So that the deprecation would not be a problem.

Upvotes: 3

Related Questions