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)/client.proto',
28 '<(proto_in_dir)/client_gateway.proto',
29 '<(proto_in_dir)/client_protocol.proto',
30 '<(proto_in_dir)/client_test_internal.proto',
31 '<(proto_in_dir)/types.proto',
33 'includes': [ '../../build/protoc.gypi' ],
34 'direct_dependent_settings': {
39 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
40 'msvs_disabled_warnings': [4267, ],
42 # The main cache invalidation library. External clients should depend
45 'target_name': 'cacheinvalidation',
46 'type': 'static_library',
48 'overrides/google/cacheinvalidation/deps/callback.h',
49 'overrides/google/cacheinvalidation/deps/gmock.h',
50 'overrides/google/cacheinvalidation/deps/googletest.h',
51 'overrides/google/cacheinvalidation/deps/logging.h',
52 'overrides/google/cacheinvalidation/deps/mutex.h',
53 'overrides/google/cacheinvalidation/deps/random.h',
54 'overrides/google/cacheinvalidation/deps/sha1-digest-function.h',
55 'overrides/google/cacheinvalidation/deps/scoped_ptr.h',
56 'overrides/google/cacheinvalidation/deps/stl-namespace.h',
57 'overrides/google/cacheinvalidation/deps/string_util.h',
58 'overrides/google/cacheinvalidation/deps/time.h',
59 'src/google/cacheinvalidation/deps/digest-function.h',
60 'src/google/cacheinvalidation/impl/basic-system-resources.cc',
61 'src/google/cacheinvalidation/impl/basic-system-resources.h',
62 'src/google/cacheinvalidation/impl/checking-invalidation-listener.cc',
63 'src/google/cacheinvalidation/impl/checking-invalidation-listener.h',
64 'src/google/cacheinvalidation/impl/client-protocol-namespace-fix.h',
65 'src/google/cacheinvalidation/impl/constants.cc',
66 'src/google/cacheinvalidation/impl/constants.h',
67 'src/google/cacheinvalidation/impl/digest-store.h',
68 'src/google/cacheinvalidation/impl/exponential-backoff-delay-generator.cc',
69 'src/google/cacheinvalidation/impl/exponential-backoff-delay-generator.h',
70 'src/google/cacheinvalidation/impl/invalidation-client-core.cc',
71 'src/google/cacheinvalidation/impl/invalidation-client-core.h',
72 'src/google/cacheinvalidation/impl/invalidation-client-factory.cc',
73 'src/google/cacheinvalidation/impl/invalidation-client-impl.cc',
74 'src/google/cacheinvalidation/impl/invalidation-client-impl.h',
75 'src/google/cacheinvalidation/impl/invalidation-client-util.h',
76 'src/google/cacheinvalidation/impl/log-macro.h',
77 'src/google/cacheinvalidation/impl/object-id-digest-utils.cc',
78 'src/google/cacheinvalidation/impl/object-id-digest-utils.h',
79 'src/google/cacheinvalidation/impl/persistence-utils.cc',
80 'src/google/cacheinvalidation/impl/persistence-utils.h',
81 'src/google/cacheinvalidation/impl/proto-converter.cc',
82 'src/google/cacheinvalidation/impl/proto-converter.h',
83 'src/google/cacheinvalidation/impl/proto-helpers.h',
84 'src/google/cacheinvalidation/impl/proto-helpers.cc',
85 'src/google/cacheinvalidation/impl/protocol-handler.cc',
86 'src/google/cacheinvalidation/impl/protocol-handler.h',
87 'src/google/cacheinvalidation/impl/recurring-task.cc',
88 'src/google/cacheinvalidation/impl/recurring-task.h',
89 'src/google/cacheinvalidation/impl/registration-manager.cc',
90 'src/google/cacheinvalidation/impl/registration-manager.h',
91 'src/google/cacheinvalidation/impl/run-state.h',
92 'src/google/cacheinvalidation/impl/safe-storage.cc',
93 'src/google/cacheinvalidation/impl/safe-storage.h',
94 'src/google/cacheinvalidation/impl/simple-registration-store.cc',
95 'src/google/cacheinvalidation/impl/simple-registration-store.h',
96 'src/google/cacheinvalidation/impl/smearer.h',
97 'src/google/cacheinvalidation/impl/statistics.cc',
98 'src/google/cacheinvalidation/impl/statistics.h',
99 'src/google/cacheinvalidation/impl/throttle.cc',
100 'src/google/cacheinvalidation/impl/throttle.h',
101 'src/google/cacheinvalidation/impl/ticl-message-validator.cc',
102 'src/google/cacheinvalidation/impl/ticl-message-validator.h',
103 'src/google/cacheinvalidation/include/invalidation-client.h',
104 'src/google/cacheinvalidation/include/invalidation-client-factory.h',
105 'src/google/cacheinvalidation/include/invalidation-listener.h',
106 'src/google/cacheinvalidation/include/system-resources.h',
107 'src/google/cacheinvalidation/include/types.h',
114 '../../base/base.gyp:base',
115 'cacheinvalidation_proto_cpp',
117 'direct_dependent_settings': {
123 # We avoid including header files from
124 # cacheinvalidation_proto_cpp in our public header files so we
125 # don't need to export its settings.
126 'export_dependent_settings': [
127 '../../base/base.gyp:base',
129 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
130 'msvs_disabled_warnings': [4267, ],
132 # Unittests for the cache invalidation library.
133 # TODO(ghc): Write native tests and include them here.
135 'target_name': 'cacheinvalidation_unittests',
136 'type': 'executable',
138 'src/google/cacheinvalidation/test/deterministic-scheduler.cc',
139 'src/google/cacheinvalidation/test/deterministic-scheduler.h',
140 'src/google/cacheinvalidation/test/test-logger.cc',
141 'src/google/cacheinvalidation/test/test-logger.h',
142 'src/google/cacheinvalidation/test/test-utils.cc',
143 'src/google/cacheinvalidation/test/test-utils.h',
144 'src/google/cacheinvalidation/impl/invalidation-client-impl_test.cc',
145 'src/google/cacheinvalidation/impl/protocol-handler_test.cc',
146 'src/google/cacheinvalidation/impl/recurring-task_test.cc',
147 'src/google/cacheinvalidation/impl/throttle_test.cc',
150 '../../base/base.gyp:base',
151 '../../base/base.gyp:run_all_unittests',
152 '../../testing/gmock.gyp:gmock',
153 '../../testing/gtest.gyp:gtest',
155 'cacheinvalidation_proto_cpp',
160 ['test_isolation_mode != "noop"', {
163 'target_name': 'cacheinvalidation_unittests_run',
166 'cacheinvalidation_unittests',
169 '../../build/isolate.gypi',
170 'cacheinvalidation_unittests.isolate',
173 'cacheinvalidation_unittests.isolate',
178 ['OS == "android"', {
181 'target_name': 'cacheinvalidation_proto_java',
184 'proto_in_dir': '../../third_party/cacheinvalidation/src/proto',
187 '<(proto_in_dir)/android_channel.proto',
188 '<(proto_in_dir)/android_listener.proto',
189 '<(proto_in_dir)/android_service.proto',
190 '<(proto_in_dir)/android_state.proto',
191 '<(proto_in_dir)/channel.proto',
192 '<(proto_in_dir)/channel_common.proto',
193 '<(proto_in_dir)/client.proto',
194 '<(proto_in_dir)/client_protocol.proto',
195 '<(proto_in_dir)/java_client.proto',
196 '<(proto_in_dir)/types.proto',
198 'includes': [ '../../build/protoc_java.gypi' ],
201 'target_name': 'cacheinvalidation_javalib',
204 '../../third_party/android_tools/android_tools.gyp:android_gcm',
205 '../../third_party/guava/guava.gyp:guava_javalib',
206 'cacheinvalidation_aidl_javalib',
207 'cacheinvalidation_proto_java',
210 'java_in_dir': '../../build/android/empty',
211 'additional_src_dirs': [ 'src/java/' ],
213 'includes': [ '../../build/java.gypi' ],
216 'target_name': 'cacheinvalidation_aidl_javalib',
219 # TODO(shashishekhar): aidl_interface_file should be made optional.
220 'aidl_interface_file':'<(android_sdk)/framework.aidl'
223 'src/java/com/google/ipc/invalidation/external/client/android/service/InvalidationService.aidl',
224 'src/java/com/google/ipc/invalidation/external/client/android/service/ListenerService.aidl',
225 'src/java/com/google/ipc/invalidation/testing/android/InvalidationTest.aidl',
227 'includes': [ '../../build/java_aidl.gypi' ],