Index: webrtc/build/webrtc.gni |
diff --git a/webrtc/build/webrtc.gni b/webrtc/build/webrtc.gni |
index d4caa9620182eb9700208e1d63a5b327de5c7680..45d2ec57129c2586ce2a12760904520a0fe5e418 100644 |
--- a/webrtc/build/webrtc.gni |
+++ b/webrtc/build/webrtc.gni |
@@ -327,3 +327,32 @@ |
} |
} |
} |
+ |
+# TODO(mbonadei): Merge this in android_library or create an |
+# rtc_android_library. Waiting for hints from chromium:648244. |
+if (is_android) { |
+ template("android_shared_srcjar") { |
+ action(target_name) { |
+ check_includes = false |
+ set_sources_assignment_filter([]) |
+ assert(defined(invoker.sources)) |
+ |
+ forward_variables_from(invoker, |
+ [ |
+ "sources", |
+ "testonly", |
+ "visibility", |
+ ]) |
+ script = "//webrtc/build/generate_srcjar.py" |
+ _srcjar_path = "${target_gen_dir}/${target_name}.srcjar" |
+ _rebased_srcjar_path = rebase_path(_srcjar_path, root_build_dir) |
+ _rebased_sources = rebase_path(invoker.sources, root_build_dir) |
+ |
+ args = [ "--srcjar=$_rebased_srcjar_path" ] + _rebased_sources |
+ |
+ outputs = [ |
+ _srcjar_path, |
+ ] |
+ } |
+ } |
+} |