From 87df372535cb8bb71111ca9303208f97c5d9a3e8 Mon Sep 17 00:00:00 2001 From: Chalard Jean Date: Fri, 9 May 2025 13:19:11 +0900 Subject: [PATCH] Don't warn in tests for deprecation This change removes hundreds of lines of useless warnings, since tests must check the continued working of old and deprecated methods. Test: build manually and observe the warnings are gone Flag: EXEMPT test-only Change-Id: Ie50b2f35b09041e8e201b30b1e575e66e045bc44 --- tests/common/Android.bp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/common/Android.bp b/tests/common/Android.bp index 60a02fb7be..1600a6a0ec 100644 --- a/tests/common/Android.bp +++ b/tests/common/Android.bp @@ -155,6 +155,9 @@ java_defaults { // if sdk_version="" this gets automatically included, but here we need to add manually. "framework-res", ], + // Tests must check a large number of deprecated methods and warning about it + // sends hundreds of warning lines flooding the useful warnings. + kotlincflags: ["-Xsuppress-warning=DEPRECATION"], } // defaults for tests that need to build against framework-connectivity's @hide APIs, but also @@ -178,6 +181,9 @@ java_defaults { // if sdk_version="" this gets automatically included, but here we need to add manually. "framework-res", ], + // Tests must check a large number of deprecated methods and warning about it + // sends hundreds of warning lines flooding the useful warnings. + kotlincflags: ["-Xsuppress-warning=DEPRECATION"], defaults_visibility: ["//packages/modules/Connectivity/tests:__subpackages__"], }