blob: 6891b6d6aa7bfc3de39bf6e294fa4d866db93b15 [file] [log] [blame]
# Copyright 2017 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("//build/config/android/rules.gni")
_jni_sources = [
"java/src/org/chromium/components/crash/CrashKeys.java",
"java/src/org/chromium/components/crash/browser/ChildProcessCrashObserver.java",
"java/src/org/chromium/components/crash/browser/PackagePaths.java",
]
generate_jni("jni_headers") {
sources = _jni_sources
}
java_cpp_enum("java_enums_srcjar") {
sources = [ "crash_keys_android.h" ]
}
android_library("java") {
deps = [
"//base:base_java",
"//base:jni_java",
]
annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
srcjar_deps = [ ":java_enums_srcjar" ]
sources = _jni_sources
}
source_set("crash_android") {
sources = [
"crash_keys_android.cc",
"crash_keys_android.h",
]
deps = [
":jni_headers",
"//base",
"//components/crash/core/common:crash_key",
]
}
source_set("unit_tests") {
testonly = true
sources = [ "crash_keys_android_unittest.cc" ]
deps = [
":crash_android",
"//components/crash/core/common:crash_key",
"//testing/gtest",
]
}
_java_handler_jni_sources =
[ "java/src/org/chromium/components/crash/browser/CrashpadMain.java" ]
generate_jni("java_handler_jni_headers") {
sources = _java_handler_jni_sources
}
android_library("handler_java") {
deps = [
"//base:base_java",
"//base:jni_java",
]
annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
sources = _java_handler_jni_sources
}
static_library("crashpad_main") {
sources = [ "crashpad_main.cc" ]
deps = [
":java_handler_jni_headers",
"//base",
"//third_party/crashpad/crashpad/client",
"//third_party/crashpad/crashpad/handler",
]
}