• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2016 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14apply plugin: 'com.android.library'
15apply from: '../../constants.gradle'
16
17android {
18    compileSdkVersion project.ext.compileSdkVersion
19
20    compileOptions {
21        sourceCompatibility JavaVersion.VERSION_1_8
22        targetCompatibility JavaVersion.VERSION_1_8
23    }
24
25    defaultConfig {
26        minSdkVersion project.ext.minSdkVersion
27        targetSdkVersion project.ext.targetSdkVersion
28        consumerProguardFiles 'proguard-rules.txt'
29
30        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
31
32        // The following argument makes the Android Test Orchestrator run its
33        // "pm clear" command after each test invocation. This command ensures
34        // that the app's state is completely cleared between tests.
35        testInstrumentationRunnerArguments clearPackageData: 'true'
36    }
37
38    buildTypes {
39        debug {
40            testCoverageEnabled = true
41        }
42    }
43
44    sourceSets {
45        androidTest.assets.srcDir '../../testdata/src/test/assets/'
46        test.assets.srcDir '../../testdata/src/test/assets/'
47    }
48
49    testOptions.unitTests.includeAndroidResources = true
50}
51
52dependencies {
53    api project(modulePrefix + 'library-common')
54    api project(modulePrefix + 'library-extractor')
55    implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
56    compileOnly 'com.google.code.findbugs:jsr305:' + jsr305Version
57    compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
58    compileOnly 'org.checkerframework:checker-compat-qual:' + checkerframeworkVersion
59    compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion
60    androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion
61    androidTestImplementation 'com.google.guava:guava:' + guavaVersion
62    androidTestImplementation 'com.linkedin.dexmaker:dexmaker:' + dexmakerVersion
63    androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:' + dexmakerVersion
64    androidTestImplementation(project(modulePrefix + 'testutils')) {
65        exclude module: modulePrefix.substring(1) + 'library-core'
66    }
67    testImplementation 'com.google.guava:guava:' + guavaVersion
68    testImplementation 'org.robolectric:robolectric:' + robolectricVersion
69    testImplementation project(modulePrefix + 'testutils')
70}
71
72ext {
73    javadocTitle = 'Core module'
74}
75apply from: '../../javadoc_library.gradle'
76
77ext {
78    releaseArtifact = 'exoplayer-core'
79    releaseDescription = 'The ExoPlayer library core module.'
80}
81apply from: '../../publish.gradle'
82