chromium/components/url_formatter/android/BUILD.gn

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

import("//third_party/jni_zero/jni_zero.gni")

if (is_android) {
  import("//build/config/android/rules.gni")

  android_library("url_formatter_java") {
    deps = [
      "//build/android:build_java",
      "//third_party/androidx:androidx_annotation_annotation_java",
      "//third_party/jni_zero:jni_zero_java",
      "//url:gurl_java",
    ]

    srcjar_deps = [
      ":jni_headers",
      "//components/url_formatter:url_formatter_java_enums_srcjar",
    ]

    sources =
        [ "java/src/org/chromium/components/url_formatter/UrlFormatter.java" ]
  }

  android_library("unit_device_javatests") {
    testonly = true

    sources = [ "javatests/src/org/chromium/components/url_formatter/UrlFormatterUnitTest.java" ]
    deps = [
      ":url_formatter_java",
      "//base:base_java",
      "//base:base_java_test_support",
      "//content/public/test/android:content_java_test_support",
      "//third_party/androidx:androidx_core_core_java",
      "//third_party/androidx:androidx_test_runner_java",
      "//third_party/junit",
      "//url:android_test_helper_java",
      "//url:gurl_java",
    ]
  }
}

generate_jni("jni_headers") {
  sources =
      [ "java/src/org/chromium/components/url_formatter/UrlFormatter.java" ]
}