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. 4 5{ 6 'variables': { 7 # This library should build cleanly with the extra warnings turned on 8 # for Chromium. 9 'chromium_code': 1, 10 }, 11 'targets': [ 12 # The C++ files generated from the cache invalidation protocol buffers. 13 { 14 'target_name': 'cacheinvalidation_proto_cpp', 15 'type': 'static_library', 16 'variables': { 17 # The relative path of the cacheinvalidation proto files from this 18 # gyp-file. 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)', 25 }, 26 'sources': [ 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', 32 ], 33 'includes': [ '../../build/protoc.gypi' ], 34 'direct_dependent_settings': { 35 'include_dirs': [ 36 '<(proto_out_dir)', 37 ], 38 }, 39 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 40 'msvs_disabled_warnings': [4267, ], 41 }, 42 # The main cache invalidation library. External clients should depend 43 # only on this. 44 { 45 'target_name': 'cacheinvalidation', 46 'type': 'static_library', 47 'sources': [ 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/random.cc', 55 'overrides/google/cacheinvalidation/deps/sha1-digest-function.h', 56 'overrides/google/cacheinvalidation/deps/scoped_ptr.h', 57 'overrides/google/cacheinvalidation/deps/stl-namespace.h', 58 'overrides/google/cacheinvalidation/deps/string_util.h', 59 'overrides/google/cacheinvalidation/deps/time.h', 60 'src/google/cacheinvalidation/deps/digest-function.h', 61 'src/google/cacheinvalidation/impl/basic-system-resources.cc', 62 'src/google/cacheinvalidation/impl/basic-system-resources.h', 63 'src/google/cacheinvalidation/impl/checking-invalidation-listener.cc', 64 'src/google/cacheinvalidation/impl/checking-invalidation-listener.h', 65 'src/google/cacheinvalidation/impl/client-protocol-namespace-fix.h', 66 'src/google/cacheinvalidation/impl/constants.cc', 67 'src/google/cacheinvalidation/impl/constants.h', 68 'src/google/cacheinvalidation/impl/digest-store.h', 69 'src/google/cacheinvalidation/impl/exponential-backoff-delay-generator.cc', 70 'src/google/cacheinvalidation/impl/exponential-backoff-delay-generator.h', 71 'src/google/cacheinvalidation/impl/invalidation-client-core.cc', 72 'src/google/cacheinvalidation/impl/invalidation-client-core.h', 73 'src/google/cacheinvalidation/impl/invalidation-client-factory.cc', 74 'src/google/cacheinvalidation/impl/invalidation-client-impl.cc', 75 'src/google/cacheinvalidation/impl/invalidation-client-impl.h', 76 'src/google/cacheinvalidation/impl/invalidation-client-util.h', 77 'src/google/cacheinvalidation/impl/log-macro.h', 78 'src/google/cacheinvalidation/impl/object-id-digest-utils.cc', 79 'src/google/cacheinvalidation/impl/object-id-digest-utils.h', 80 'src/google/cacheinvalidation/impl/persistence-utils.cc', 81 'src/google/cacheinvalidation/impl/persistence-utils.h', 82 'src/google/cacheinvalidation/impl/proto-converter.cc', 83 'src/google/cacheinvalidation/impl/proto-converter.h', 84 'src/google/cacheinvalidation/impl/proto-helpers.h', 85 'src/google/cacheinvalidation/impl/proto-helpers.cc', 86 'src/google/cacheinvalidation/impl/protocol-handler.cc', 87 'src/google/cacheinvalidation/impl/protocol-handler.h', 88 'src/google/cacheinvalidation/impl/recurring-task.cc', 89 'src/google/cacheinvalidation/impl/recurring-task.h', 90 'src/google/cacheinvalidation/impl/registration-manager.cc', 91 'src/google/cacheinvalidation/impl/registration-manager.h', 92 'src/google/cacheinvalidation/impl/repeated-field-namespace-fix.h', 93 'src/google/cacheinvalidation/impl/run-state.h', 94 'src/google/cacheinvalidation/impl/safe-storage.cc', 95 'src/google/cacheinvalidation/impl/safe-storage.h', 96 'src/google/cacheinvalidation/impl/simple-registration-store.cc', 97 'src/google/cacheinvalidation/impl/simple-registration-store.h', 98 'src/google/cacheinvalidation/impl/smearer.h', 99 'src/google/cacheinvalidation/impl/statistics.cc', 100 'src/google/cacheinvalidation/impl/statistics.h', 101 'src/google/cacheinvalidation/impl/throttle.cc', 102 'src/google/cacheinvalidation/impl/throttle.h', 103 'src/google/cacheinvalidation/impl/ticl-message-validator.cc', 104 'src/google/cacheinvalidation/impl/ticl-message-validator.h', 105 'src/google/cacheinvalidation/include/invalidation-client.h', 106 'src/google/cacheinvalidation/include/invalidation-client-factory.h', 107 'src/google/cacheinvalidation/include/invalidation-listener.h', 108 'src/google/cacheinvalidation/include/system-resources.h', 109 'src/google/cacheinvalidation/include/types.h', 110 ], 111 'include_dirs': [ 112 './overrides', 113 './src', 114 ], 115 'dependencies': [ 116 '../../base/base.gyp:base', 117 'cacheinvalidation_proto_cpp', 118 ], 119 'direct_dependent_settings': { 120 'include_dirs': [ 121 './overrides', 122 './src', 123 ], 124 }, 125 # We avoid including header files from 126 # cacheinvalidation_proto_cpp in our public header files so we 127 # don't need to export its settings. 128 'export_dependent_settings': [ 129 '../../base/base.gyp:base', 130 ], 131 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 132 'msvs_disabled_warnings': [4267, ], 133 }, 134 # Unittests for the cache invalidation library. 135 # TODO(ghc): Write native tests and include them here. 136 { 137 'target_name': 'cacheinvalidation_unittests', 138 'type': 'executable', 139 'sources': [ 140 'src/google/cacheinvalidation/test/deterministic-scheduler.cc', 141 'src/google/cacheinvalidation/test/deterministic-scheduler.h', 142 'src/google/cacheinvalidation/test/test-logger.cc', 143 'src/google/cacheinvalidation/test/test-logger.h', 144 'src/google/cacheinvalidation/test/test-utils.cc', 145 'src/google/cacheinvalidation/test/test-utils.h', 146 'src/google/cacheinvalidation/impl/invalidation-client-impl_test.cc', 147 'src/google/cacheinvalidation/impl/protocol-handler_test.cc', 148 'src/google/cacheinvalidation/impl/recurring-task_test.cc', 149 'src/google/cacheinvalidation/impl/throttle_test.cc', 150 ], 151 'dependencies': [ 152 '../../base/base.gyp:base', 153 '../../base/base.gyp:run_all_unittests', 154 '../../testing/gmock.gyp:gmock', 155 '../../testing/gtest.gyp:gtest', 156 'cacheinvalidation', 157 'cacheinvalidation_proto_cpp', 158 ], 159 }, 160 ], 161 'conditions': [ 162 ['test_isolation_mode != "noop"', { 163 'targets': [ 164 { 165 'target_name': 'cacheinvalidation_unittests_run', 166 'type': 'none', 167 'dependencies': [ 168 'cacheinvalidation_unittests', 169 ], 170 'includes': [ 171 '../../build/isolate.gypi', 172 'cacheinvalidation_unittests.isolate', 173 ], 174 'sources': [ 175 'cacheinvalidation_unittests.isolate', 176 ], 177 }, 178 ], 179 }], 180 ['OS == "android"', { 181 'variables': { 182 'emma_never_instrument': 1, 183 }, 184 'targets': [ 185 { 186 'target_name': 'cacheinvalidation_proto_java', 187 'type': 'none', 188 'variables': { 189 'proto_in_dir': '../../third_party/cacheinvalidation/src/proto', 190 }, 191 'sources': [ 192 '<(proto_in_dir)/android_channel.proto', 193 '<(proto_in_dir)/android_listener.proto', 194 '<(proto_in_dir)/android_service.proto', 195 '<(proto_in_dir)/android_state.proto', 196 '<(proto_in_dir)/channel.proto', 197 '<(proto_in_dir)/channel_common.proto', 198 '<(proto_in_dir)/client.proto', 199 '<(proto_in_dir)/client_protocol.proto', 200 '<(proto_in_dir)/java_client.proto', 201 '<(proto_in_dir)/types.proto', 202 ], 203 'includes': [ '../../build/protoc_java.gypi' ], 204 }, 205 { 206 'target_name': 'cacheinvalidation_javalib', 207 'type': 'none', 208 'dependencies': [ 209 '../../third_party/android_tools/android_tools.gyp:android_gcm', 210 '../../third_party/guava/guava.gyp:guava_javalib', 211 'cacheinvalidation_aidl_javalib', 212 'cacheinvalidation_proto_java', 213 ], 214 'variables': { 215 'java_in_dir': '../../build/android/empty', 216 'additional_src_dirs': [ 'src/java/' ], 217 }, 218 'includes': [ '../../build/java.gypi' ], 219 }, 220 { 221 'target_name': 'cacheinvalidation_aidl_javalib', 222 'type': 'none', 223 'variables': { 224 # TODO(shashishekhar): aidl_interface_file should be made optional. 225 'aidl_interface_file':'<(android_sdk)/framework.aidl' 226 }, 227 'sources': [ 228 'src/java/com/google/ipc/invalidation/external/client/android/service/InvalidationService.aidl', 229 'src/java/com/google/ipc/invalidation/external/client/android/service/ListenerService.aidl', 230 'src/java/com/google/ipc/invalidation/testing/android/InvalidationTest.aidl', 231 ], 232 'includes': [ '../../build/java_aidl.gypi' ], 233 }, 234 ], 235 }], 236 ], 237} 238