1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
# 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("//base/android/jni_generator/jni_exception_list.gni")
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
import("//remoting/android/client_java_tmpl.gni")
import("//remoting/android/remoting_apk_tmpl.gni")
import("//remoting/credits/credits.gni")
import("//remoting/remoting_options.gni")
import("//remoting/tools/build/remoting_localize.gni")
generate_jni("jni_headers") {
sources = [
"java/src/org/chromium/chromoting/jni/Client.java",
"java/src/org/chromium/chromoting/jni/GlDisplay.java",
"java/src/org/chromium/chromoting/jni/JniInterface.java",
"java/src/org/chromium/chromoting/jni/JniOAuthTokenGetter.java",
"java/src/org/chromium/chromoting/jni/TouchEventData.java",
]
jni_package = "remoting"
}
generate_jni_registration("remoting_jni_registration") {
target = ":remoting_apk"
output = "$root_gen_dir/remoting/client/${target_name}.h"
exception_files = jni_exception_files
}
_raw_resources_base_dir = "$target_gen_dir/credits_resources_raw/res"
# The target is named this way, instead of "..._raw_resources", specifically
# to avoid matching any of the _java_target_whitelist items in
# build/config/android/internal_rules.gni
remoting_credits("credits_resources_raw") {
credits_gen_dir = "$_raw_resources_base_dir/raw"
gn_target = "//remoting/android:remoting_apk"
}
remoting_localize("remoting_apk_manifest") {
sources = [
"java/AndroidManifest.xml.jinja2",
]
locales = [ "en" ]
variables = [ rebase_path(branding_path) ]
output = "$root_gen_dir/remoting/android/{{source_name_part}}"
}
android_resources("remoting_android_client_java_resources") {
custom_package = "org.chromium.chromoting"
resource_dirs = [ "java/res" ]
generated_resource_dirs = [ _raw_resources_base_dir ]
generated_resource_files = get_target_outputs(":credits_resources_raw")
deps = [
":credits_resources_raw",
"//remoting/resources:strings_java",
"//third_party/android_deps:android_support_v7_appcompat_java",
]
}
remoting_android_client_java_tmpl("remoting_android_client_java") {
# This should always be the public play services libraries since it is only
# used by non-_google apks. Explicitly use the string literal rather than
# google_play_services_package to ensure this.
play_services_package = "//third_party/android_deps"
}
remoting_apk_tmpl("remoting_apk") {
apk_name = "Chromoting"
java_files = [ "//remoting/android/apk/src/org/chromium/chromoting/RemotingApplication.java" ]
deps = [
":remoting_android_client_java",
"//base:base_java",
"//net/android:net_java",
]
}
remoting_localize("remoting_test_apk_manifest") {
sources = [
"javatests/AndroidManifest.xml.jinja2",
]
locales = [ "en" ]
variables = [ rebase_path(branding_path) ]
output = "$root_gen_dir/remoting/android_test/{{source_name_part}}"
}
instrumentation_test_apk("remoting_test_apk") {
android_manifest = "$root_gen_dir/remoting/android_test/AndroidManifest.xml"
android_manifest_dep = ":remoting_test_apk_manifest"
apk_name = "ChromotingTest"
apk_under_test = ":remoting_apk"
java_files = [
"javatests/src/org/chromium/chromoting/EventTest.java",
"javatests/src/org/chromium/chromoting/MockInputStub.java",
"javatests/src/org/chromium/chromoting/SwipePinchDetectorTest.java",
"javatests/src/org/chromium/chromoting/TapGestureDetectorTest.java",
"javatests/src/org/chromium/chromoting/TouchEventBuilder.java",
"javatests/src/org/chromium/chromoting/TouchEventGenerator.java",
"javatests/src/org/chromium/chromoting/TouchInputStrategyTest.java",
"javatests/src/org/chromium/chromoting/test/util/MutableReference.java",
]
deps = [
":remoting_android_client_java",
"//base:base_java",
"//base:base_java_test_support",
"//third_party/android_support_test_runner:runner_java",
"//third_party/junit:junit",
]
}
|