Reputation: 1172
I am getting a warning about the usage of deprecated features in my build.
Is there a way to list all the deprecated features so that I may go through and update my code?
*clarification
I know I can go to the Gradle documentation and see what is now deprecated, what I would specifically like is a way to go through MY code and list MY deprecated features.
Upvotes: 28
Views: 35264
Reputation: 675
In order to change the warning verbosity level in the Android Studio IDE, you can add the option org.gradle.warning.mode=(all,none,summary)
to the gradle.properties file, which can be found in the root directory of your project.
Add following line to set the warning mode to all
:
...
org.gradle.warning.mode=all
...
Upvotes: 19
Reputation: 1432
I just faced the exact same problem and running the Gradle build task every time through the command line wasn't the best option for me because, during development, I usually just use the built-in Gradle build task run, so:
I know I can go to the Gradle documentation and see what is now deprecated, what I would specifically like is a way to go through MY code and list out MY deprecated features.
You can do this by adding the mentioned --warning-mode=all
flag to your gradle command line options in your Android Studio settings:
This will print the proper warnings for you to be aware of what are the specific deprecated features your app is using.
Also, I know you asked this near a year ago, but, it might be useful for other people facing the same issue.
Upvotes: 40
Reputation: 821
Upvotes: 0
Reputation: 1167
Use Gradle option -Dorg.gradle.warning.mode=(all,none,summary)
to control verbosity, for example, mode all
will log all warnings with detailed descriptions:
./gradlew build -Dorg.gradle.warning.mode=all
More details can be found in the official documentation: Showing or hiding warnings
Upvotes: 12