1 # Copyright 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
7 # This library should build cleanly with the extra warnings turned on
12 # The C++ files generated from the cache invalidation protocol buffers.
14 'target_name': 'cacheinvalidation_proto_cpp',
15 'type': 'static_library',
17 # The relative path of the cacheinvalidation proto files from this
19 # TODO(akalin): Add a RULE_INPUT_DIR predefined variable to gyp so
20 # we don't need this variable.
21 'proto_dir_relpath': 'google/cacheinvalidation',
22 # Where files generated from proto files are put.
23 'proto_in_dir': 'src/<(proto_dir_relpath)',
24 'proto_out_dir': '<(proto_dir_relpath)',
27 '<(proto_in_dir)/android_channel.proto',
28 '<(proto_in_dir)/channel_common.proto',
29 '<(proto_in_dir)/client.proto',
30 '<(proto_in_dir)/client_gateway.proto',
31 '<(proto_in_dir)/client_protocol.proto',
32 '<(proto_in_dir)/client_test_internal.proto',
33 '<(proto_in_dir)/types.proto',
35 'includes': [ '../../build/protoc.gypi' ],
36 'direct_dependent_settings': {
41 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
42 'msvs_disabled_warnings': [4267, ],
43 # channel_common.proto contains definition of ANDROID constant which on
44 # android build conflicts with compiler option -DANDROID. Remove protos
49 '<(proto_in_dir)/android_channel.proto',
50 '<(proto_in_dir)/channel_common.proto',
55 # The main cache invalidation library. External clients should depend
58 'target_name': 'cacheinvalidation',
59 'type': 'static_library',
61 'overrides/google/cacheinvalidation/deps/callback.h',
62 'overrides/google/cacheinvalidation/deps/gmock.h',
63 'overrides/google/cacheinvalidation/deps/googletest.h',
64 'overrides/google/cacheinvalidation/deps/logging.h',
65 'overrides/google/cacheinvalidation/deps/mutex.h',
66 'overrides/google/cacheinvalidation/deps/random.h',
67 'overrides/google/cacheinvalidation/deps/random.cc',
68 'overrides/google/cacheinvalidation/deps/sha1-digest-function.h',
69 'overrides/google/cacheinvalidation/deps/scoped_ptr.h',
70 'overrides/google/cacheinvalidation/deps/stl-namespace.h',
71 'overrides/google/cacheinvalidation/deps/string_util.h',
72 'overrides/google/cacheinvalidation/deps/time.h',
73 'src/google/cacheinvalidation/deps/digest-function.h',
74 'src/google/cacheinvalidation/impl/basic-system-resources.cc',
75 'src/google/cacheinvalidation/impl/basic-system-resources.h',
76 'src/google/cacheinvalidation/impl/checking-invalidation-listener.cc',
77 'src/google/cacheinvalidation/impl/checking-invalidation-listener.h',
78 'src/google/cacheinvalidation/impl/client-protocol-namespace-fix.h',
79 'src/google/cacheinvalidation/impl/constants.cc',
80 'src/google/cacheinvalidation/impl/constants.h',
81 'src/google/cacheinvalidation/impl/digest-store.h',
82 'src/google/cacheinvalidation/impl/exponential-backoff-delay-generator.cc',
83 'src/google/cacheinvalidation/impl/exponential-backoff-delay-generator.h',
84 'src/google/cacheinvalidation/impl/invalidation-client-core.cc',
85 'src/google/cacheinvalidation/impl/invalidation-client-core.h',
86 'src/google/cacheinvalidation/impl/invalidation-client-factory.cc',
87 'src/google/cacheinvalidation/impl/invalidation-client-impl.cc',
88 'src/google/cacheinvalidation/impl/invalidation-client-impl.h',
89 'src/google/cacheinvalidation/impl/invalidation-client-util.h',
90 'src/google/cacheinvalidation/impl/log-macro.h',
91 'src/google/cacheinvalidation/impl/object-id-digest-utils.cc',
92 'src/google/cacheinvalidation/impl/object-id-digest-utils.h',
93 'src/google/cacheinvalidation/impl/persistence-utils.cc',
94 'src/google/cacheinvalidation/impl/persistence-utils.h',
95 'src/google/cacheinvalidation/impl/proto-converter.cc',
96 'src/google/cacheinvalidation/impl/proto-converter.h',
97 'src/google/cacheinvalidation/impl/proto-helpers.h',
98 'src/google/cacheinvalidation/impl/proto-helpers.cc',
99 'src/google/cacheinvalidation/impl/protocol-handler.cc',
100 'src/google/cacheinvalidation/impl/protocol-handler.h',
101 'src/google/cacheinvalidation/impl/recurring-task.cc',
102 'src/google/cacheinvalidation/impl/recurring-task.h',
103 'src/google/cacheinvalidation/impl/registration-manager.cc',
104 'src/google/cacheinvalidation/impl/registration-manager.h',
105 'src/google/cacheinvalidation/impl/repeated-field-namespace-fix.h',
106 'src/google/cacheinvalidation/impl/run-state.h',
107 'src/google/cacheinvalidation/impl/safe-storage.cc',
108 'src/google/cacheinvalidation/impl/safe-storage.h',
109 'src/google/cacheinvalidation/impl/simple-registration-store.cc',
110 'src/google/cacheinvalidation/impl/simple-registration-store.h',
111 'src/google/cacheinvalidation/impl/smearer.h',
112 'src/google/cacheinvalidation/impl/statistics.cc',
113 'src/google/cacheinvalidation/impl/statistics.h',
114 'src/google/cacheinvalidation/impl/throttle.cc',
115 'src/google/cacheinvalidation/impl/throttle.h',
116 'src/google/cacheinvalidation/impl/ticl-message-validator.cc',
117 'src/google/cacheinvalidation/impl/ticl-message-validator.h',
118 'src/google/cacheinvalidation/include/invalidation-client.h',
119 'src/google/cacheinvalidation/include/invalidation-client-factory.h',
120 'src/google/cacheinvalidation/include/invalidation-listener.h',
121 'src/google/cacheinvalidation/include/system-resources.h',
122 'src/google/cacheinvalidation/include/types.h',
129 '../../base/base.gyp:base',
130 'cacheinvalidation_proto_cpp',
132 'direct_dependent_settings': {
138 # We avoid including header files from
139 # cacheinvalidation_proto_cpp in our public header files so we
140 # don't need to export its settings.
141 'export_dependent_settings': [
142 '../../base/base.gyp:base',
144 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
145 'msvs_disabled_warnings': [4267, ],
147 # Unittests for the cache invalidation library.
148 # TODO(ghc): Write native tests and include them here.
150 'target_name': 'cacheinvalidation_unittests',
151 'type': 'executable',
153 'src/google/cacheinvalidation/test/deterministic-scheduler.cc',
154 'src/google/cacheinvalidation/test/deterministic-scheduler.h',
155 'src/google/cacheinvalidation/test/test-logger.cc',
156 'src/google/cacheinvalidation/test/test-logger.h',
157 'src/google/cacheinvalidation/test/test-utils.cc',
158 'src/google/cacheinvalidation/test/test-utils.h',
159 'src/google/cacheinvalidation/impl/invalidation-client-impl_test.cc',
160 'src/google/cacheinvalidation/impl/protocol-handler_test.cc',
161 'src/google/cacheinvalidation/impl/recurring-task_test.cc',
162 'src/google/cacheinvalidation/impl/throttle_test.cc',
165 '../../base/base.gyp:base',
166 '../../base/base.gyp:run_all_unittests',
167 '../../testing/gmock.gyp:gmock',
168 '../../testing/gtest.gyp:gtest',
170 'cacheinvalidation_proto_cpp',
175 ['test_isolation_mode != "noop"', {
178 'target_name': 'cacheinvalidation_unittests_run',
181 'cacheinvalidation_unittests',
184 '../../build/isolate.gypi',
185 'cacheinvalidation_unittests.isolate',
188 'cacheinvalidation_unittests.isolate',
193 ['OS == "android"', {
195 'emma_never_instrument': 1,
199 'target_name': 'cacheinvalidation_proto_java',
202 'proto_in_dir': '../../third_party/cacheinvalidation/src/proto',
205 '<(proto_in_dir)/android_channel.proto',
206 '<(proto_in_dir)/android_listener.proto',
207 '<(proto_in_dir)/android_service.proto',
208 '<(proto_in_dir)/android_state.proto',
209 '<(proto_in_dir)/channel_common.proto',
210 '<(proto_in_dir)/client.proto',
211 '<(proto_in_dir)/client_protocol.proto',
212 '<(proto_in_dir)/java_client.proto',
213 '<(proto_in_dir)/types.proto',
215 'includes': [ '../../build/protoc_java.gypi' ],
218 'target_name': 'cacheinvalidation_example_proto_java',
221 'cacheinvalidation_in_dir': '../../third_party/cacheinvalidation/src',
222 'proto_in_dir' : '<(cacheinvalidation_in_dir)/java/com/google/ipc/invalidation/examples/android2',
225 '<(proto_in_dir)/example_listener.proto',
227 'includes': [ '../../build/protoc_java.gypi' ],
230 'target_name': 'cacheinvalidation_javalib',
233 '../../third_party/android_tools/android_tools.gyp:android_gcm',
234 '../../third_party/guava/guava.gyp:guava_javalib',
235 'cacheinvalidation_aidl_javalib',
236 'cacheinvalidation_example_proto_java',
237 'cacheinvalidation_proto_java',
240 'java_in_dir': '../../build/android/empty',
241 'additional_src_dirs': [ 'src/java/' ],
243 'includes': [ '../../build/java.gypi' ],
246 'target_name': 'cacheinvalidation_aidl_javalib',
249 # TODO(shashishekhar): aidl_interface_file should be made optional.
250 'aidl_interface_file':'<(android_sdk)/framework.aidl'
253 'src/java/com/google/ipc/invalidation/external/client/android/service/InvalidationService.aidl',
254 'src/java/com/google/ipc/invalidation/external/client/android/service/ListenerService.aidl',
255 'src/java/com/google/ipc/invalidation/testing/android/InvalidationTest.aidl',
257 'includes': [ '../../build/java_aidl.gypi' ],