chromium/android_webview/support_library/boundary_interfaces/BUILD.gn

# Copyright 2017 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/config.gni")
import("//build/config/android/rules.gni")

android_library("boundary_interface_java") {
  sources = [
    "src/org/chromium/support_lib_boundary/DropDataContentProviderBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/FeatureFlagHolderBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/IsomorphicObjectBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/JsReplyProxyBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/PrefetchCallbackBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/ProcessGlobalConfigConstants.java",
    "src/org/chromium/support_lib_boundary/ProfileBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/ProfileStoreBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/ProxyControllerBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/SafeBrowsingResponseBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/ScriptHandlerBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/ServiceWorkerClientBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/ServiceWorkerControllerBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/ServiceWorkerWebSettingsBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/TracingControllerBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/VisualStateCallbackBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/WebMessageBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/WebMessageCallbackBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/WebMessageListenerBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/WebMessagePayloadBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/WebMessagePortBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/WebResourceErrorBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/WebResourceRequestBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/WebViewClientBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/WebViewCookieManagerBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/WebViewRendererBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/WebViewRendererClientBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/WebkitToCompatConverterBoundaryInterface.java",
    "src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java",
    "src/org/chromium/support_lib_boundary/util/Features.java",
  ]

  proguard_configs = [ "proguard.flags" ]

  # Our choice of deps is limited, because boundary_interfaces/ must continue to
  # build when we mirror this into AndroidX. We are only permitted to depend on
  # core Android classes and other AndroidX classes (must be in the androidx.*
  # package name).
  deps = [ "//third_party/androidx:androidx_annotation_annotation_java" ]
}

android_apk("boundary_interface_example_apk") {
  apk_name = "BoundaryInterfaceExample"

  # Use a placeholder android manifest since this code is copied to androidx.
  android_manifest = "//build/android/AndroidManifest.xml"

  # This is to verify that the boundary interfaces compile and lint correctly
  # against the minSdkVersion of the webkit support library module. As the
  # minSdkVersion of the support library increases, so should this value. See
  # http://crbug.com/828184 for more details.
  lint_min_sdk_version = 21

  # Explicitly enable lint for this apk.
  enable_lint = true

  deps = [ ":boundary_interface_java" ]
}