chromium/chrome/browser/ui/android/cars/BUILD.gn

# Copyright 2023 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/chrome/browser/ui/cars/DrivingRestrictionsManager.java" ]

  deps = [ "//base:base_java" ]

  public_deps = [ ":delegate_java" ]
}

android_library("delegate_java") {
  sources = [
    "java/src/org/chromium/chrome/browser/ui/cars/DrivingRestrictionsDelegate.java",
    "java/src/org/chromium/chrome/browser/ui/cars/DrivingRestrictionsDelegateImpl.java",
  ]

  deps = [ "//base:base_java" ]

  # Add the actual implementation where necessary so that downstream targets
  # can provide their own implementations.
  jar_excluded_patterns = [ "*/DrivingRestrictionsDelegateImpl.class" ]
}

android_library("delegate_public_impl_java") {
  sources = [ "java/src/org/chromium/chrome/browser/ui/cars/DrivingRestrictionsDelegateImpl.java" ]

  deps = [
    ":delegate_java",
    "//base:base_java",
  ]
}

robolectric_library("junit") {
  sources = [ "java/src/org/chromium/chrome/browser/ui/cars/DrivingRestrictionsManagerTest.java" ]

  deps = [
    ":java",
    "//base:base_java",
    "//base:base_junit_test_support",
    "//third_party/junit",
    "//third_party/mockito:mockito_java",
  ]
}