naiveproxy/base/android/jni_generator/BUILD.gn
2018-08-11 05:35:24 +00:00

70 lines
1.5 KiB
Plaintext

# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//base/android/jni_generator/jni_exception_list.gni")
import("//build/config/android/rules.gni")
import("//testing/test.gni")
generate_jni("jni_sample_header") {
sources = [
"java/src/org/chromium/example/jni_generator/SampleForTests.java",
]
jni_package = "example"
}
android_library("jni_sample_java") {
java_files =
[ "java/src/org/chromium/example/jni_generator/SampleForTests.java" ]
deps = [
"//base:base_java",
]
}
source_set("jni_sample_native_side") {
deps = [
":jni_sample_header",
"//base",
]
sources = [
"sample_for_tests.cc",
"sample_for_tests.h",
]
}
shared_library("jni_sample_lib") {
sources = [
"sample_entry_point.cc",
]
deps = [
":jni_sample_native_side",
":sample_jni_registration",
"//base",
"//build/config:exe_and_shlib_deps",
]
}
android_apk("sample_jni_apk") {
apk_name = "SampleJni"
android_manifest = "AndroidManifest.xml"
deps = [
":jni_sample_java",
"//base:base_java",
]
shared_libraries = [ ":jni_sample_lib" ]
}
generate_jni_registration("sample_jni_registration") {
target = ":sample_jni_apk"
output = "$target_gen_dir/${target_name}.h"
exception_files = jni_exception_files
}
# Serves to test that generated bindings compile properly.
group("jni_generator_tests") {
deps = [
":sample_jni_apk",
]
}