1// 2// Copyright (C) 2019 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17// Exposes ExoPlayer classes required for implementing the MediaParser API. 18package { 19 default_applicable_licenses: ["external_exoplayer_license"], 20} 21 22// Added automatically by a large-scale-change 23// See: http://go/android-license-faq 24license { 25 name: "external_exoplayer_license", 26 visibility: [":__subpackages__"], 27 license_kinds: [ 28 "SPDX-license-identifier-Apache-2.0", 29 ], 30 license_text: [ 31 "LICENSE", 32 ], 33} 34 35java_library { 36 name: "exoplayer2-extractor", 37 srcs: [ 38 "tree/library/extractor/src/main/java/**/*.java", 39 "tree/library/common/src/main/java/**/*.java", 40 ], 41 sdk_version: "29", // Needs to be a prebuilt, so not "current". 42 apex_available: [ 43 "com.android.media", 44 ], 45 min_sdk_version: "16", // match with tree/constants.gradle 46 static_libs: [ 47 "exoplayer2-extractor-annotation-stubs", 48 "androidx.annotation_annotation", 49 "jsr305", 50 ], 51 jarjar_rules: "exoplayer2-extractor-jarjar-rules.txt", 52 visibility: ["//frameworks/base:__subpackages__"], 53 notice: "LICENSE", 54} 55 56// Compile dummy implementations of annotations used by exoplayer but not 57// present in the Android tree. 58java_library { 59 name: "exoplayer2-extractor-annotation-stubs", 60 host_supported: true, 61 sdk_version: "core_current", 62 apex_available: [ 63 "com.android.media", 64 ], 65 min_sdk_version: "16", 66 srcs: ["annotation-stubs/src/**/*.java"], 67 static_libs: ["jsr305"], 68 visibility: ["//visibility:private"], 69} 70 71// Exposes util classes for testing MediaParser. 72android_library { 73 name: "exoplayer2-extractor-test-utils", 74 manifest: "tree/library/extractor/src/test/AndroidManifest.xml", 75 srcs: [ 76 "tree/testutils/src/main/java/com/google/android/exoplayer2/testutil/Dumper.java", 77 "tree/testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeExtractorInput.java", 78 "tree/testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeExtractorOutput.java", 79 "tree/testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeTrackOutput.java", 80 "tree/testutils/src/main/java/com/google/android/exoplayer2/testutil/TestUtil.java", 81 "tree/library/core/src/main/java/com/google/android/exoplayer2/database/DatabaseProvider.java", 82 "tree/library/core/src/main/java/com/google/android/exoplayer2/database/DefaultDatabaseProvider.java", 83 ], 84 sdk_version: "29", 85 static_libs: [ 86 "exoplayer2-extractor", 87 "exoplayer2-extractor-annotation-stubs", 88 "androidx.annotation_annotation", 89 "truth-prebuilt", 90 "junit", 91 "androidx.test.core", 92 ], 93 jarjar_rules: "exoplayer2-extractor-jarjar-rules.txt", 94 visibility: ["//cts/tests/tests/mediaparser:__subpackages__"], 95 notice: "LICENSE", 96} 97 98// Exposes the assets for testing MediaParser. 99android_library { 100 name: "exoplayer2-extractor-tests-assets", 101 manifest: "tree/library/extractor/src/main/AndroidManifest.xml", 102 srcs: [], 103 sdk_version: "29", 104 visibility: ["//cts/tests/tests/mediaparser:__subpackages__"], 105 asset_dirs: ["tree/testdata/src/test/assets/"], 106 // Do not compress media files. 107 aaptflags: [ 108 "-0 .ac3", 109 "-0 .ac4", 110 "-0 .adts", 111 "-0 .amr", 112 "-0 .eac3", 113 "-0 .flac", 114 "-0 .flv", 115 "-0 .id3", 116 "-0 .mkv", 117 "-0 .mp3", 118 "-0 .mp4", 119 "-0 .mpg", 120 "-0 .ogg", 121 "-0 .opus", 122 "-0 .ps", 123 "-0 .rawcc", 124 "-0 .ts", 125 "-0 .wav", 126 "-0 .webm", 127 ], 128} 129