blob: 407e4131615c162244c708ba5956f0946a630cbb [file] [edit]
//
// Copyright (C) 2015 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.
//
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
android_library {
name: "car-media-app-source",
srcs: ["src/**/*.java"],
resource_dirs: ["res"],
min_sdk_version: "30", // Media requires apis that became public in R.
target_sdk_version: "34",
sdk_version: "system_current",
optimize: {
enabled: false,
},
dex_preopt: {
enabled: false,
},
static_libs: [
"androidx.legacy_legacy-support-v4",
"androidx.recyclerview_recyclerview",
"androidx.media3.media3-session",
"androidx-constraintlayout_constraintlayout-solver",
"androidx-constraintlayout_constraintlayout",
"androidx.lifecycle_lifecycle-common-java8",
"androidx.lifecycle_lifecycle-extensions",
"car-apps-common-prebuilt",
"car-media-common-prebuilt",
"car-media-extensions-prebuilt",
"car-ui-lib-prebuilt",
"car-uxr-client-lib-prebuilt",
"oem-token-lib"
],
libs: [
"android.car-system-stubs",
"token-shared-lib",
]
}
android_app {
name: "CarMediaApp",
required: ["allowed_privapp_com.android.car.media"],
certificate: "platform",
// Keep this commented out until enough apps stop requiring a system signature.
// certificate: ":com-android-car-apps-test",
privileged: true,
min_sdk_version: "30", // Media requires apis that became public in R.
target_sdk_version: "34",
sdk_version: "system_current",
optimize: {
enabled: false,
},
dex_preopt: {
enabled: false,
},
static_libs: [
"car-media-app-source"
],
libs: [
"android.car-system-stubs",
"token-shared-lib",
]
}
//############################################################
// Car Media App unit test target, run with:
// mmma -j64 packages/apps/Car/Media/
// atest CarMediaAppTests
//############################################################
android_test {
name: "CarMediaAppTests",
certificate: ":com-android-car-apps-test",
privileged: true,
min_sdk_version: "30",
target_sdk_version: "34",
sdk_version: "system_current",
manifest: "tests/AndroidManifest.xml",
srcs: ["tests/unittests/src/**/*.java"],
exclude_srcs: ["tests/unittests/src/com/android/car/media/MediaDispatcherActivityTests.java"],
resource_dirs: ["res"],
libs: [
"android.test.runner.stubs.system",
"android.test.base.stubs.system",
"android.car-stubs",
"android.car-system-stubs",
"android.test.mock.stubs",
"token-shared-lib",
],
// Include the testing libraries
static_libs: [
"androidx.test.core",
"androidx.test.rules",
"androidx.test.runner",
"androidx.test.ext.junit",
"androidx.test.espresso.core",
"androidx.test.espresso.contrib",
"androidx.test.espresso.intents",
"hamcrest-library",
"mockito-target-inline-minus-junit4",
"platform-test-annotations",
"truth",
"car-media-app-source",
"oem-token-lib"
],
jni_libs: [
// For mockito extended
"libdexmakerjvmtiagent",
"libstaticjvmtiagent",
],
platform_apis: true,
test_suites: ["device-tests"],
// Enforce the jni libraries to be grouped into the APK file.
use_embedded_native_libs: true,
}