Index: sync/BUILD.gn |
diff --git a/sync/BUILD.gn b/sync/BUILD.gn |
index 9f064b5e5862890a10154a965e8a59670a574c74..34b1c53a4ca3359095426f6e98b6afc17b3ec9b7 100644 |
--- a/sync/BUILD.gn |
+++ b/sync/BUILD.gn |
@@ -3,6 +3,7 @@ |
# found in the LICENSE file. |
import("//build/config/features.gni") |
+import("//sync/protocol/protocol_sources.gni") |
import("//testing/test.gni") |
component("sync") { |
@@ -434,10 +435,10 @@ source_set("sync_core") { |
"//google_apis", |
"//net", |
"//sql", |
+ "//sync/protocol", |
"//third_party/leveldatabase", |
"//third_party/zlib", |
"//url", |
- "//sync/protocol", |
] |
if (is_android) { |
@@ -529,9 +530,9 @@ static_library("test_support_sync_core") { |
public_deps = [ |
"//base", |
+ "//sync", |
"//testing/gmock", |
"//testing/gtest", |
- "//sync", |
] |
defines = [ "SYNC_TEST" ] |
@@ -559,10 +560,10 @@ static_library("test_support_sync_internal_api") { |
] |
public_deps = [ |
+ ":test_support_sync_core", |
"//base", |
- "//testing/gtest", |
"//sync", |
- ":test_support_sync_core", |
+ "//testing/gtest", |
] |
defines = [ "SYNC_TEST" ] |
@@ -772,8 +773,8 @@ static_library("test_support_sync_fake_server") { |
deps = [ |
"//base", |
"//net", |
- "//testing/gtest", |
"//sync", |
+ "//testing/gtest", |
"//url", |
] |
@@ -836,14 +837,38 @@ if (is_android) { |
] |
} |
+ _test_support_sync_prepared_protos_dir = |
+ "$root_gen_dir/test_support_sync_proto_java_prepare/" |
+ action("test_support_sync_proto_java_prepare") { |
+ script = "//sync/protocol/prepare_protos_for_java_tests.py" |
+ inputs = sync_protocol_sources |
+ outputs = process_file_template( |
+ sync_protocol_sources, |
+ [ "$_test_support_sync_prepared_protos_dir/{{source_file_part}}" ]) |
+ args = [ |
+ "--output_dir", |
+ rebase_path(_test_support_sync_prepared_protos_dir, root_build_dir), |
+ ] |
+ args += rebase_path(sync_protocol_sources, root_build_dir) |
+ } |
+ |
+ # GYP: //sync/sync_tests.gypi:test_support_sync_proto_java |
+ proto_java_library("test_support_sync_proto_java") { |
+ proto_path = _test_support_sync_prepared_protos_dir |
+ sources = get_target_outputs(":test_support_sync_proto_java_prepare") |
+ deps = [ |
+ ":test_support_sync_proto_java_prepare", |
+ ] |
+ } |
+ |
# GYP: //sync/sync_tests.gypi:sync_java_test_support |
android_library("sync_java_test_support") { |
testonly = true |
deps = [ |
- "android:sync_java", |
"//base:base_java", |
"//base:base_java_test_support", |
"//third_party/jsr-305:jsr_305_javalib", |
+ "android:sync_java", |
] |
DEPRECATED_java_in_dir = "test/android/javatests/src" |
} |