How to set warning level when compiling

I’m getting a warning message on my sketch, but it doesn’t say what line is getting the warning (!).

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

Is there a setting in preferences.txt I can use to set ‘–warning-mode’ to ‘all’?

Thanks.