chromium/android_webview/js_sandbox/BUILD.gn

# Copyright 2022 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")
import("//third_party/jni_zero/jni_zero.gni")

generate_jni("js_sandbox_jni_headers") {
  sources = [
    "java/src/org/chromium/android_webview/js_sandbox/service/JsSandboxIsolate.java",
    "java/src/org/chromium/android_webview/js_sandbox/service/JsSandboxIsolateCallback.java",
    "java/src/org/chromium/android_webview/js_sandbox/service/JsSandboxIsolateFdCallback.java",
  ]
}

android_library("js_sandbox_service_java") {
  srcjar_deps = [ ":js_sandbox_jni_headers" ]
  sources = [
    "java/src/org/chromium/android_webview/js_sandbox/service/JsSandboxIsolate.java",
    "java/src/org/chromium/android_webview/js_sandbox/service/JsSandboxIsolateCallback.java",
    "java/src/org/chromium/android_webview/js_sandbox/service/JsSandboxIsolateFdCallback.java",
    "java/src/org/chromium/android_webview/js_sandbox/service/JsSandboxService.java",
    "java/src/org/chromium/android_webview/js_sandbox/service/JsSandboxService0.java",
  ]

  deps = [
    ":js_sandbox_jni_headers",
    "//base:base_java",
    "//build/android:build_java",
    "//third_party/android_deps:com_google_code_findbugs_jsr305_java",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx_javascriptengine:javascriptengine_common_java",
    "//third_party/androidx_javascriptengine:js_sandbox_aidl_java",
    "//third_party/jni_zero:jni_zero_java",
  ]
}