media3/libraries/session/build.gradle
ibaker 76db936d68 Enable lint errors in session tests
Also resolve some failures.

Lint checks [aren't enabled in tests by default](http://groups.google.com/g/lint-dev/c/rtjVpqHmY0Y).

This change suppresses `NewApi` failures in Robolectric tests because
these tests only run at 'target SDK' by default (currently 30), but the
lint doesn't understand this and so flags spurious issues with API
usages below this.

PiperOrigin-RevId: 653172059
2024-07-17 03:50:05 -07:00

63 lines
2.3 KiB
Groovy

// Copyright 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
apply from: "$gradle.ext.androidxMediaSettingsDir/common_library_config.gradle"
android {
namespace 'androidx.media3.session'
buildTypes {
debug {
testCoverageEnabled = true
}
}
sourceSets.test.assets.srcDir '../test_data/src/test/assets/'
lint {
baseline = file("lint-baseline.xml")
}
publishing {
singleVariant('release') {
withSourcesJar()
}
}
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')
compileOnly 'com.google.errorprone:error_prone_annotations:' + errorProneVersion
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
implementation project(modulePrefix + 'lib-datasource')
implementation 'androidx.collection:collection:' + androidxCollectionVersion
implementation 'androidx.media:media:' + androidxMediaVersion
implementation 'androidx.core:core:' + androidxCoreVersion
testImplementation 'com.squareup.okhttp3:mockwebserver:' + okhttpVersion
testImplementation project(modulePrefix + 'test-data')
testImplementation project(modulePrefix + 'test-utils')
testImplementation project(modulePrefix + 'test-utils-robolectric')
testImplementation project(modulePrefix + 'lib-exoplayer')
testImplementation 'org.robolectric:robolectric:' + robolectricVersion
}
ext {
releaseArtifactId = 'media3-session'
releaseName = 'Media3 Session module'
}
apply from: '../../publish.gradle'