From 286273c10efbb406201190528aa7f838faced31a Mon Sep 17 00:00:00 2001 From: ibaker Date: Tue, 5 Nov 2024 05:37:16 -0800 Subject: [PATCH] Enable lint in tests for modules that require no fixes PiperOrigin-RevId: 693313908 --- common_library_config.gradle | 4 ++++ libraries/common/build.gradle | 5 ----- libraries/database/build.gradle | 5 +++++ libraries/datasource/build.gradle | 5 +++++ libraries/decoder_iamf/build.gradle | 5 +++++ libraries/effect/build.gradle | 5 +++++ libraries/exoplayer/build.gradle | 6 ------ libraries/exoplayer_rtsp/build.gradle | 5 +++++ libraries/extractor/build.gradle | 5 +++++ libraries/muxer/build.gradle | 5 +++++ libraries/session/build.gradle | 5 ----- libraries/test_exoplayer_playback/build.gradle | 9 ++++++++- libraries/test_session_current/build.gradle | 5 +++++ libraries/transformer/build.gradle | 5 +++++ libraries/ui_compose/build.gradle | 4 ++++ 15 files changed, 61 insertions(+), 17 deletions(-) diff --git a/common_library_config.gradle b/common_library_config.gradle index c54e686f53..9c357a6381 100644 --- a/common_library_config.gradle +++ b/common_library_config.gradle @@ -29,6 +29,10 @@ android { } } + lintOptions { + checkTestSources true + } + compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 diff --git a/libraries/common/build.gradle b/libraries/common/build.gradle index 3842e8f02f..71184f5da1 100644 --- a/libraries/common/build.gradle +++ b/libraries/common/build.gradle @@ -35,11 +35,6 @@ android { lint { baseline = file("lint-baseline.xml") } - lintOptions { - // TODO: b/353490583 - Move this to common_library_config.gradle once it's enabled for all - // libraries. - checkTestSources true - } publishing { singleVariant('release') { withSourcesJar() diff --git a/libraries/database/build.gradle b/libraries/database/build.gradle index 367ffb4c2f..35cca6a5dd 100644 --- a/libraries/database/build.gradle +++ b/libraries/database/build.gradle @@ -22,6 +22,11 @@ android { } } + lintOptions { + // TODO: b/353490583 - Enable this once the violations are fixed. + checkTestSources false + } + publishing { singleVariant('release') { withSourcesJar() diff --git a/libraries/datasource/build.gradle b/libraries/datasource/build.gradle index 9fd2da4f81..c40c24cd45 100644 --- a/libraries/datasource/build.gradle +++ b/libraries/datasource/build.gradle @@ -27,6 +27,11 @@ android { test.assets.srcDir '../test_data/src/test/assets' } + lintOptions { + // TODO: b/353490583 - Enable this once the violations are fixed. + checkTestSources false + } + publishing { singleVariant('release') { withSourcesJar() diff --git a/libraries/decoder_iamf/build.gradle b/libraries/decoder_iamf/build.gradle index 17970629bc..5892316db9 100644 --- a/libraries/decoder_iamf/build.gradle +++ b/libraries/decoder_iamf/build.gradle @@ -28,6 +28,11 @@ android { } } + lintOptions { + // TODO: b/353490583 - Enable this once the violations are fixed. + checkTestSources false + } + // TODO(Internal: b/372449691): Remove packagingOptions once AGP is updated // to version 8.5.1 or higher. packagingOptions { diff --git a/libraries/effect/build.gradle b/libraries/effect/build.gradle index c9b4bf865d..52a1afb37e 100644 --- a/libraries/effect/build.gradle +++ b/libraries/effect/build.gradle @@ -33,6 +33,11 @@ android { test.assets.srcDir '../test_data/src/test/assets/' } + lintOptions { + // TODO: b/353490583 - Enable this once the violations are fixed. + checkTestSources false + } + publishing { singleVariant('release') { withSourcesJar() diff --git a/libraries/exoplayer/build.gradle b/libraries/exoplayer/build.gradle index da7417cfd3..fecd9bcbf9 100644 --- a/libraries/exoplayer/build.gradle +++ b/libraries/exoplayer/build.gradle @@ -34,12 +34,6 @@ android { test.assets.srcDir '../test_data/src/test/assets/' } - lintOptions { - // TODO: b/353490583 - Move this to common_library_config.gradle once it's enabled for all - // libraries. - checkTestSources true - } - publishing { singleVariant('release') { withSourcesJar() diff --git a/libraries/exoplayer_rtsp/build.gradle b/libraries/exoplayer_rtsp/build.gradle index e53de0c751..313f504bb6 100644 --- a/libraries/exoplayer_rtsp/build.gradle +++ b/libraries/exoplayer_rtsp/build.gradle @@ -24,6 +24,11 @@ android { sourceSets.test.assets.srcDir '../test_data/src/test/assets/' + lintOptions { + // TODO: b/353490583 - Enable this once the violations are fixed. + checkTestSources false + } + publishing { singleVariant('release') { withSourcesJar() diff --git a/libraries/extractor/build.gradle b/libraries/extractor/build.gradle index e4dad3c42a..53451ca205 100644 --- a/libraries/extractor/build.gradle +++ b/libraries/extractor/build.gradle @@ -27,6 +27,11 @@ android { test.assets.srcDir '../test_data/src/test/assets/' } + lintOptions { + // TODO: b/353490583 - Enable this once the violations are fixed. + checkTestSources false + } + publishing { singleVariant('release') { withSourcesJar() diff --git a/libraries/muxer/build.gradle b/libraries/muxer/build.gradle index c81260d4d9..5a03e258ca 100644 --- a/libraries/muxer/build.gradle +++ b/libraries/muxer/build.gradle @@ -34,6 +34,11 @@ android { test.assets.srcDir '../test_data/src/test/assets/' } + lintOptions { + // TODO: b/353490583 - Enable this once the violations are fixed. + checkTestSources false + } + publishing { singleVariant('release') { withSourcesJar() diff --git a/libraries/session/build.gradle b/libraries/session/build.gradle index d174081fe8..8642e06022 100644 --- a/libraries/session/build.gradle +++ b/libraries/session/build.gradle @@ -33,11 +33,6 @@ android { buildFeatures { aidl true } - lintOptions { - // TODO: b/353490583 - Move this to common_library_config.gradle once it's enabled for all - // libraries. - checkTestSources true - } } dependencies { api project(modulePrefix + 'lib-common') diff --git a/libraries/test_exoplayer_playback/build.gradle b/libraries/test_exoplayer_playback/build.gradle index 85b533380c..3ba8bd3d35 100644 --- a/libraries/test_exoplayer_playback/build.gradle +++ b/libraries/test_exoplayer_playback/build.gradle @@ -13,7 +13,14 @@ // limitations under the License. apply from: "$gradle.ext.androidxMediaSettingsDir/common_library_config.gradle" -android.namespace 'androidx.media3.test.exoplayer.playback' +android { + namespace 'androidx.media3.test.exoplayer.playback' + + lintOptions { + // TODO: b/353490583 - Enable this once the violations are fixed. + checkTestSources false + } +} dependencies { androidTestImplementation 'androidx.test:rules:' + androidxTestRulesVersion diff --git a/libraries/test_session_current/build.gradle b/libraries/test_session_current/build.gradle index 9feae32e90..00bcbcce08 100644 --- a/libraries/test_session_current/build.gradle +++ b/libraries/test_session_current/build.gradle @@ -33,6 +33,11 @@ android { } sourceSets.main.assets.srcDir '../test_data/src/test/assets/' + + lintOptions { + // TODO: b/353490583 - Enable this once the violations are fixed. + checkTestSources false + } } dependencies { diff --git a/libraries/transformer/build.gradle b/libraries/transformer/build.gradle index 39bec76b94..9be3574310 100644 --- a/libraries/transformer/build.gradle +++ b/libraries/transformer/build.gradle @@ -34,6 +34,11 @@ android { test.assets.srcDir '../test_data/src/test/assets/' } + lintOptions { + // TODO: b/353490583 - Enable this once the violations are fixed. + checkTestSources false + } + publishing { singleVariant('release') { withSourcesJar() diff --git a/libraries/ui_compose/build.gradle b/libraries/ui_compose/build.gradle index a551722825..525922462b 100644 --- a/libraries/ui_compose/build.gradle +++ b/libraries/ui_compose/build.gradle @@ -26,6 +26,10 @@ android { buildFeatures { compose true } + lintOptions { + // TODO: b/353490583 - Enable this once the violations are fixed. + checkTestSources false + } publishing { singleVariant('release') { withSourcesJar()