Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(943)

Side by Side Diff: mandoline/app/android/BUILD.gn

Issue 1492963004: GN: asset_location -> android_assets() for mandoline_apk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@build_config_java_binary
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/html_viewer/BUILD.gn ('k') | mojo/generate_mojo_shell_assets_list.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 assert(is_android) 5 assert(is_android)
6 6
7 import("//build/config/android/config.gni") 7 import("//build/config/android/config.gni")
8 import("//build/config/android/rules.gni") 8 import("//build/config/android/rules.gni")
9 import("//mojo/generate_mojo_shell_assets_list.gni")
10
11 mandoline_assets_dir = "$root_build_dir/mandoline_assets"
12 9
13 group("android") { 10 group("android") {
14 deps = [ 11 deps = [
15 ":mandoline_apk", 12 ":mandoline_apk",
16 ] 13 ]
17 } 14 }
18 15
19 executable("mandoline_runner") { 16 executable("mandoline_runner") {
20 deps = [ 17 deps = [
21 ":jni_headers", 18 ":jni_headers",
(...skipping 25 matching lines...) Expand all
47 ":mandoline_runner", 44 ":mandoline_runner",
48 ] 45 ]
49 sources = [ 46 sources = [
50 "$root_out_dir/mandoline_runner", 47 "$root_out_dir/mandoline_runner",
51 ] 48 ]
52 outputs = [ 49 outputs = [
53 "$root_shlib_dir/${shlib_prefix}mandoline_runner$shlib_extension", 50 "$root_shlib_dir/${shlib_prefix}mandoline_runner$shlib_extension",
54 ] 51 ]
55 } 52 }
56 53
57 copy_ex("copy_mandoline_assets") { 54 android_assets("mandoline_assets") {
58 clear_dir = true
59 dest = mandoline_assets_dir
60 deps = [ 55 deps = [
61 "//components/devtools_service", 56 "//components/devtools_service:devtools_service_assets",
62 "//components/html_viewer", 57 "//components/html_viewer:html_viewer_assets",
63 "//components/resource_provider", 58 "//components/resource_provider:resource_provider_assets",
64 "//mandoline/services/core_services", 59 "//mandoline/services/core_services:core_services_assets",
65 "//mojo/runner:bootstrap", 60 "//mojo/runner:android_assets",
66 "//mojo/runner:bootstrap_java", 61 "//mojo/services/network:network_assets",
67 "//mojo/services/network",
68 ]
69 sources = [
70 "$root_out_dir/obj/mojo/runner/bootstrap_java.dex.jar",
71 "$root_shlib_dir/${shlib_prefix}bootstrap$shlib_extension",
72 ]
73
74 # Directories can't be specified as sources so pass manually to the script.
75 args = [
76 "--files=" + rebase_path("$root_out_dir/core_services", root_build_dir),
77 "--files=" + rebase_path("$root_out_dir/network_service", root_build_dir),
78 "--files=" + rebase_path("$root_out_dir/resource_provider", root_build_dir),
79 "--files=" + rebase_path("$root_out_dir/devtools_service", root_build_dir),
80 "--files=" + rebase_path("$root_out_dir/html_viewer", root_build_dir),
81 ] 62 ]
82 63
83 if (use_aura) { 64 if (use_aura) {
84 deps += [ "//mandoline/ui" ] 65 deps += [
85 66 "//mandoline/ui/desktop_ui:desktop_ui_assets",
86 args += [ 67 "//mandoline/ui/omnibox:omnibox_assets",
87 "--files=" + rebase_path("$root_out_dir/omnibox", root_build_dir),
88 "--files=" + rebase_path("$root_out_dir/phone_ui", root_build_dir),
89 ] 68 ]
90 } 69 }
91 } 70 }
92 71
93 generate_mojo_shell_assets_list("build_mandoline_assets") {
94 deps = [
95 ":copy_mandoline_assets",
96 ]
97 dir = mandoline_assets_dir
98 }
99
100 android_library("java") { 72 android_library("java") {
101 java_files = [ "apk/src/org/chromium/mandoline/MandolineActivity.java" ] 73 java_files = [ "apk/src/org/chromium/mandoline/MandolineActivity.java" ]
102 74
103 deps = [ 75 deps = [
104 "//base:base_java", 76 "//base:base_java",
105 "//mojo/runner:java", 77 "//mojo/runner:java",
106 ] 78 ]
107 } 79 }
108 80
109 generate_jni("jni_headers") { 81 generate_jni("jni_headers") {
110 sources = [ 82 sources = [
111 "apk/src/org/chromium/mandoline/MandolineActivity.java", 83 "apk/src/org/chromium/mandoline/MandolineActivity.java",
112 ] 84 ]
113 jni_package = "mandoline" 85 jni_package = "mandoline"
114 } 86 }
115 87
116 android_resources("mandoline_apk_resources") { 88 android_resources("mandoline_apk_resources") {
117 custom_package = "org.chromium.mandoline" 89 custom_package = "org.chromium.mandoline"
118 resource_dirs = [ "apk/res" ] 90 resource_dirs = [ "apk/res" ]
119 } 91 }
120 92
121 android_apk("mandoline_apk") { 93 android_apk("mandoline_apk") {
122 apk_name = "Mandoline" 94 apk_name = "Mandoline"
123 95
124 android_manifest = "apk/AndroidManifest.xml" 96 android_manifest = "apk/AndroidManifest.xml"
125
126 native_libs = [ "${shlib_prefix}mandoline_runner$shlib_extension" ] 97 native_libs = [ "${shlib_prefix}mandoline_runner$shlib_extension" ]
127 98 write_asset_list = true
128 asset_location = mandoline_assets_dir
129 99
130 deps = [ 100 deps = [
131 ":build_mandoline_assets",
132 ":copy_mandoline_runner", 101 ":copy_mandoline_runner",
133 ":java", 102 ":java",
134 ":mandoline_apk_resources", 103 ":mandoline_apk_resources",
104 ":mandoline_assets",
135 "//base:base_java", 105 "//base:base_java",
136 "//mojo/runner:java", 106 "//mojo/runner:java",
137 "//mojo/runner:resources", 107 "//mojo/runner:resources",
138 "//ui/platform_window/android:platform_window_java", 108 "//ui/platform_window/android:platform_window_java",
139 google_play_services_resources, 109 google_play_services_resources,
140 ] 110 ]
141 } 111 }
OLDNEW
« no previous file with comments | « components/html_viewer/BUILD.gn ('k') | mojo/generate_mojo_shell_assets_list.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698