chromium/components/browser_ui/media/android/BUILD.gn

# Copyright 2020 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/android/rules.gni")

android_library("java") {
  sources = [
    "java/src/org/chromium/components/browser_ui/media/MediaImageCallback.java",
    "java/src/org/chromium/components/browser_ui/media/MediaImageManager.java",
    "java/src/org/chromium/components/browser_ui/media/MediaNotificationController.java",
    "java/src/org/chromium/components/browser_ui/media/MediaNotificationImageUtils.java",
    "java/src/org/chromium/components/browser_ui/media/MediaNotificationInfo.java",
    "java/src/org/chromium/components/browser_ui/media/MediaNotificationListener.java",
    "java/src/org/chromium/components/browser_ui/media/MediaNotificationManager.java",
    "java/src/org/chromium/components/browser_ui/media/MediaSessionHelper.java",
    "java/src/org/chromium/components/browser_ui/media/MediaSessionUma.java",
  ]

  deps = [
    ":java_resources",
    "//base:base_java",
    "//components/browser_ui/notifications/android:java",
    "//components/favicon/android:java",
    "//components/url_formatter/android:url_formatter_java",
    "//content/public/android:content_java",
    "//services/media_session/public/cpp/android:media_session_java",
    "//services/media_session/public/mojom:mojom_java",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_core_core_java",
    "//third_party/androidx:androidx_media_media_java",
    "//ui/android:ui_full_java",
    "//url:gurl_java",
  ]
  resources_package = "org.chromium.components.browser_ui.media"
}

android_resources("java_resources") {
  sources = [
    "java/res/drawable-hdpi/audio_playing.png",
    "java/res/drawable-hdpi/audio_playing_square.png",
    "java/res/drawable-mdpi/audio_playing.png",
    "java/res/drawable-mdpi/audio_playing_square.png",
    "java/res/drawable-xhdpi/audio_playing.png",
    "java/res/drawable-xhdpi/audio_playing_square.png",
    "java/res/drawable-xxhdpi/audio_playing.png",
    "java/res/drawable-xxhdpi/audio_playing_square.png",
    "java/res/drawable-xxxhdpi/audio_playing.png",
    "java/res/drawable-xxxhdpi/audio_playing_square.png",
  ]
  deps = [
    "//components/browser_ui/strings/android:browser_ui_strings_grd",
    "//components/browser_ui/styles/android:java_resources",
  ]
}

robolectric_library("junit") {
  sources = [
    "java/src/org/chromium/components/browser_ui/media/MediaImageManagerTest.java",
    "java/src/org/chromium/components/browser_ui/media/MediaNotificationButtonComputationTest.java",
    "java/src/org/chromium/components/browser_ui/media/MediaNotificationInfoTest.java",
  ]
  deps = [
    ":java",
    "//base:base_java_test_support",
    "//base:base_junit_test_support",
    "//base/test:test_support_java",
    "//content/public/android:content_java",
    "//services/media_session/public/cpp/android:media_session_java",
    "//services/media_session/public/mojom:mojom_java",
    "//third_party/junit",
    "//third_party/mockito:mockito_java",
    "//url:gurl_java",
    "//url:gurl_junit_test_support",
  ]
}