chromium/chrome/android/modules/test_dummy/internal/BUILD.gn

# Copyright 2019 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("//chrome/android/modules/buildflags.gni")
import("//third_party/jni_zero/jni_zero.gni")

android_library("java") {
  sources = [ "java/src/org/chromium/chrome/modules/test_dummy/TestDummyProviderImpl.java" ]
  deps = [
    "//chrome/android/modules/test_dummy/public:java",
    "//chrome/browser/test_dummy:java",
    "//chrome/browser/test_dummy/internal:java",
  ]
}

# This group is effectively alias representing the module's native code,
# allowing it to be named "native" for clarity in module descriptors. The
# component target must be named according to the feature, so that the component
# build's .cr.co library is named properly (ie. libtest_dummy.cr.so).
group("native") {
  deps = [ ":test_dummy" ]
}

component_with_jni("test_dummy") {
  java_targets = [ ":java" ]
  sources = [ "entrypoints.cc" ]
  deps = [
    "//base",
    "//chrome/browser/test_dummy/internal:native",
    "//third_party/jni_zero",
  ]

  # Test dummy native entrypoints belong in the partition.
  if (use_native_partitions) {
    cflags = [ "-fsymbol-partition=test_dummy_partition" ]
  }
  manual_jni_registration = true
  namespace = "test_dummy"
  module_name = "test_dummy"
}