mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 14:26:09 +03:00
69 lines
1.4 KiB
Plaintext
69 lines
1.4 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",
|
|
]
|
|
}
|
|
|
|
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",
|
|
]
|
|
}
|