blob: 213b8fc91db8c4e1147b24eeb3ba14ffbc3b9868 [file] [log] [blame]
# Copyright 2015 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")
import("//testing/test.gni")
assert(is_android)
component("android") {
output_name = "ui_android"
sources = [
"resources/resource_manager.cc",
"resources/resource_manager.h",
"resources/resource_manager_impl.cc",
"resources/resource_manager_impl.h",
"resources/ui_resource_android.cc",
"resources/ui_resource_android.h",
"resources/ui_resource_client_android.h",
"resources/ui_resource_provider.cc",
"resources/ui_resource_provider.h",
"ui_android_export.h",
"ui_android_jni_registrar.cc",
"ui_android_jni_registrar.h",
"view_android.cc",
"view_android.h",
"window_android.cc",
"window_android.h",
"window_android_compositor.h",
"window_android_observer.h",
]
defines = [ "UI_ANDROID_IMPLEMENTATION" ]
deps = [
"//base",
"//cc",
"//skia",
"//ui/gfx",
"//ui/gfx/geometry",
":ui_android_jni_headers",
]
}
generate_jni("ui_android_jni_headers") {
sources = [
"java/src/org/chromium/ui/base/ViewAndroid.java",
"java/src/org/chromium/ui/base/WindowAndroid.java",
"java/src/org/chromium/ui/resources/ResourceManager.java",
]
jni_package = "ui_android"
}
java_cpp_enum("java_enums_srcjar") {
sources = [
"../base/ime/text_input_type.h",
"../base/page_transition_types.h",
"../base/touch/touch_device.h",
"../base/window_open_disposition.h",
"../gfx/android/java_bitmap.h",
"resources/resource_manager.h",
"resources/system_ui_resource_type.h",
]
outputs = [
"org/chromium/ui/WindowOpenDisposition.java",
"org/chromium/ui/base/PageTransition.java",
"org/chromium/ui/base/HoverType.java",
"org/chromium/ui/base/PointerType.java",
"org/chromium/ui/base/ime/TextInputType.java",
"org/chromium/ui/gfx/BitmapFormat.java",
"org/chromium/ui/resources/AndroidResourceType.java",
"org/chromium/ui/resources/SystemUIResourceType.java",
]
}
java_strings_grd("ui_strings_grd") {
grd_file = "java/strings/android_ui_strings.grd"
outputs = [
"values-am/android_ui_strings.xml",
"values-ar/android_ui_strings.xml",
"values-bg/android_ui_strings.xml",
"values-ca/android_ui_strings.xml",
"values-cs/android_ui_strings.xml",
"values-da/android_ui_strings.xml",
"values-de/android_ui_strings.xml",
"values-el/android_ui_strings.xml",
"values/android_ui_strings.xml",
"values-en-rGB/android_ui_strings.xml",
"values-es/android_ui_strings.xml",
"values-es-rUS/android_ui_strings.xml",
"values-fa/android_ui_strings.xml",
"values-fi/android_ui_strings.xml",
"values-tl/android_ui_strings.xml",
"values-fr/android_ui_strings.xml",
"values-hi/android_ui_strings.xml",
"values-hr/android_ui_strings.xml",
"values-hu/android_ui_strings.xml",
"values-in/android_ui_strings.xml",
"values-it/android_ui_strings.xml",
"values-iw/android_ui_strings.xml",
"values-ja/android_ui_strings.xml",
"values-ko/android_ui_strings.xml",
"values-lt/android_ui_strings.xml",
"values-lv/android_ui_strings.xml",
"values-nl/android_ui_strings.xml",
"values-nb/android_ui_strings.xml",
"values-pl/android_ui_strings.xml",
"values-pt-rBR/android_ui_strings.xml",
"values-pt-rPT/android_ui_strings.xml",
"values-ro/android_ui_strings.xml",
"values-ru/android_ui_strings.xml",
"values-sk/android_ui_strings.xml",
"values-sl/android_ui_strings.xml",
"values-sr/android_ui_strings.xml",
"values-sv/android_ui_strings.xml",
"values-sw/android_ui_strings.xml",
"values-th/android_ui_strings.xml",
"values-tr/android_ui_strings.xml",
"values-uk/android_ui_strings.xml",
"values-vi/android_ui_strings.xml",
"values-zh-rCN/android_ui_strings.xml",
"values-zh-rTW/android_ui_strings.xml",
]
}
android_resources("ui_java_resources") {
custom_package = "org.chromium.ui"
resource_dirs = [ "java/res" ]
deps = [
":ui_strings_grd",
]
}
android_library("ui_java") {
DEPRECATED_java_in_dir = "java/src"
deps = [
":ui_java_resources",
"//base:base_java",
]
srcjar_deps = [ ":java_enums_srcjar" ]
}
android_library("ui_javatests") {
DEPRECATED_java_in_dir = "javatests/src"
testonly = true
deps = [
":ui_java_resources",
":ui_java",
"//base:base_java",
"//base:base_java_test_support",
]
}
test("ui_android_unittests") {
sources = [
"resources/resource_manager_impl_unittest.cc",
"run_all_unittests.cc",
]
deps = [
":android",
"//base",
"//base/test:test_support",
"//cc",
"//skia",
"//testing/gtest",
"//ui/base",
"//ui/gfx",
"//ui/resources:ui_test_pak",
]
apk_deps = [ ":ui_java" ]
}