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

Unified 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: Address Ben's comments. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mojo/services/network/android_hooks.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/network/BUILD.gn
diff --git a/mojo/services/network/BUILD.gn b/mojo/services/network/BUILD.gn
index 0e55291152912de68b96adcf6882c02ff98060ea..270672e49b003e250da3de566248faa6761abaed 100644
--- a/mojo/services/network/BUILD.gn
+++ b/mojo/services/network/BUILD.gn
@@ -4,19 +4,42 @@
import("//mojo/public/mojo_application.gni")
-mojo_native_application("network") {
- output_name = "network_service"
- sources = [
- "main.cc",
- ]
- deps = [
- ":lib",
- "//base",
- "//mojo/application",
- "//mojo/public/cpp/bindings:bindings",
- "//mojo/services/public/cpp/network",
- "//mojo/services/public/interfaces/network",
- ]
+if (is_android) {
+ import("//build/config/android/rules.gni")
+
+ java_library_path = "$target_out_dir/java_library.dex.jar"
qsr 2014/12/05 15:31:16 Could you add a blank line between this and next l
ppi 2014/12/05 17:17:43 Done.
+ mojo_android_application("network") {
+ output_name = "network_service"
+ input_so = "$root_out_dir/lib.stripped/libnetwork_service.so"
+ input_dex_jar = java_library_path
+ }
+
+ shared_library("native_library") {
+ output_name = "network_service"
+
+ deps = [
+ ":sources",
+ ]
+
+ sources = [
qsr 2014/12/05 15:31:16 sources before deps -> https://code.google.com/p/c
ppi 2014/12/05 17:17:43 Done.
+ "android_hooks.cc",
+ ]
+ }
+
+ android_standalone_library("java_library") {
+ deps = [
qsr 2014/12/05 15:31:16 Same thing, deps is the last thing there.
ppi 2014/12/05 17:17:43 Done.
+ "//net/android:net_java",
+ ]
+
+ standalone_dex_path = java_library_path
+ }
+} else {
+ mojo_native_application("network") {
+ output_name = "network_service"
+ deps = [
+ ":sources",
+ ]
+ }
}
source_set("lib") {
@@ -58,6 +81,24 @@ source_set("lib") {
]
}
+source_set("sources") {
+ visibility = [ ":*" ]
qsr 2014/12/05 15:31:16 Do you need to use this because gn will complain i
ppi 2014/12/05 17:17:43 ERROR at //mojo/public/mojo_application.gni:30:3:
qsr 2014/12/08 14:27:07 That doesn't feel right. There might be something
+
+ sources = [
+ "main.cc",
+ ]
+
+ deps = [
+ ":lib",
+ "//base",
+ "//mojo/application",
+ "//mojo/public/c/system:for_shared_library",
+ "//mojo/public/cpp/bindings:bindings",
+ "//mojo/services/public/cpp/network",
+ "//mojo/services/public/interfaces/network",
+ ]
+}
+
mojo_native_application("apptests") {
output_name = "network_service_apptests"
testonly = true
« 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