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

Side by Side Diff: mojo/services/network/BUILD.gn

Issue 780043002: Build standalone network service on Android. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Use android_standalone_library rule. Created 6 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 | « no previous file | mojo/services/network/android_hooks.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import("//mojo/public/mojo_application.gni") 5 import("//mojo/public/mojo_application.gni")
6 6
7 mojo_native_application("network") { 7 if (is_android) {
8 output_name = "network_service" 8 import("//build/config/android/rules.gni")
9 sources = [ 9
10 "main.cc", 10 java_library_path = "$target_out_dir/java_library.dex.jar"
11 ] 11 mojo_android_application("network") {
12 deps = [ 12 output_name = "network_service"
13 ":lib", 13 input_so = "$root_out_dir/lib.stripped/libnetwork_service.so"
14 "//base", 14 input_dex_jar = java_library_path
15 "//mojo/application", 15 }
16 "//mojo/public/cpp/bindings:bindings", 16
17 "//mojo/services/public/cpp/network", 17 shared_library("native_library") {
18 "//mojo/services/public/interfaces/network", 18 output_name = "network_service"
19 ] 19
20 deps = [
21 ":common_deps",
22 "//mojo/public/c/system:for_shared_library"
qsr 2014/12/05 13:43:42 Why is this dep needed here? I would expect that i
ppi 2014/12/05 14:49:54 It *is* needed by both linux and android, it's jus
23 ]
24
25 sources = [
26 "android_hooks.cc",
27 "main.cc",
28 ]
29 }
30
31 android_standalone_library("java_library") {
32 deps = [
33 "//net/android:net_java",
34 ]
35
36 standalone_dex_path = java_library_path
37 }
38 } else {
39 mojo_native_application("network") {
40 output_name = "network_service"
41 sources = [
42 "main.cc",
43 ]
44 deps = [
45 ":common_deps",
46 ]
47 }
20 } 48 }
21 49
22 source_set("lib") { 50 source_set("lib") {
23 sources = [ 51 sources = [
24 "cookie_store_impl.cc", 52 "cookie_store_impl.cc",
25 "cookie_store_impl.h", 53 "cookie_store_impl.h",
26 "net_adapters.cc", 54 "net_adapters.cc",
27 "net_adapters.h", 55 "net_adapters.h",
28 "net_address_type_converters.cc", 56 "net_address_type_converters.cc",
29 "net_address_type_converters.h", 57 "net_address_type_converters.h",
(...skipping 21 matching lines...) Expand all
51 "//mojo/common", 79 "//mojo/common",
52 "//mojo/environment:chromium", 80 "//mojo/environment:chromium",
53 "//mojo/public/cpp/bindings", 81 "//mojo/public/cpp/bindings",
54 "//mojo/services/public/cpp/network", 82 "//mojo/services/public/cpp/network",
55 "//mojo/services/public/interfaces/network", 83 "//mojo/services/public/interfaces/network",
56 "//net", 84 "//net",
57 "//url", 85 "//url",
58 ] 86 ]
59 } 87 }
60 88
89 # shared_library dependencies for both native and Android network_service.mojo.
90 group("common_deps") {
qsr 2014/12/05 13:43:42 Could you use source_set instead and put main.cc t
ppi 2014/12/05 14:49:54 Done. Once we drop the shell dependency on :lib, w
91 deps = [
92 ":lib",
93 "//base",
94 "//mojo/application",
95 "//mojo/public/cpp/bindings:bindings",
96 "//mojo/services/public/cpp/network",
97 "//mojo/services/public/interfaces/network",
98 ]
99 }
100
61 mojo_native_application("apptests") { 101 mojo_native_application("apptests") {
62 output_name = "network_service_apptests" 102 output_name = "network_service_apptests"
63 testonly = true 103 testonly = true
64 104
65 sources = [ 105 sources = [
66 "udp_socket_apptest.cc", 106 "udp_socket_apptest.cc",
67 ] 107 ]
68 108
69 deps = [ 109 deps = [
70 ":network", 110 ":network",
71 "//base", 111 "//base",
72 "//mojo/application", 112 "//mojo/application",
73 "//mojo/application:test_support", 113 "//mojo/application:test_support",
74 "//mojo/public/cpp/bindings", 114 "//mojo/public/cpp/bindings",
75 "//mojo/public/cpp/bindings:callback", 115 "//mojo/public/cpp/bindings:callback",
76 "//mojo/services/public/cpp/network", 116 "//mojo/services/public/cpp/network",
77 "//mojo/services/public/interfaces/network", 117 "//mojo/services/public/interfaces/network",
78 "//net", 118 "//net",
79 "//testing/gtest", 119 "//testing/gtest",
80 ] 120 ]
81 } 121 }
OLDNEW
« no previous file with comments | « no previous file | mojo/services/network/android_hooks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698