| # Copyright 2015 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # TODO(mpcomplete): move this to a separate repo. Doesn't belong in the main |
| # Flutter repo. |
| |
| import("//mojo/public/tools/bindings/mojom.gni") |
| |
| group("gcm") { |
| deps = [ |
| ":interfaces", |
| ] |
| |
| if (is_android || is_ios) { |
| deps += [ ":gcm_lib" ] |
| } |
| } |
| |
| mojom("interfaces") { |
| sources = [ |
| "gcm.mojom", |
| ] |
| } |
| |
| if (is_android) { |
| import("//build/config/android/config.gni") |
| import("//build/config/android/rules.gni") |
| |
| android_library("gcm_lib") { |
| java_files = [ |
| "src/org/domokit/gcm/GcmListenerService.java", |
| "src/org/domokit/gcm/InstanceIDListenerService.java", |
| "src/org/domokit/gcm/RegistrationIntentService.java", |
| ] |
| |
| deps = [ |
| "//mojo/java", |
| "//mojo/public/java:bindings", |
| "//mojo/public/java:system", |
| ":interfaces_java", |
| google_play_services_library, |
| ] |
| } |
| } |
| |
| if (is_ios) { |
| shared_library("gcm_lib") { |
| output_name = "gcm" |
| |
| libs = [ |
| "UIKit.framework", |
| ] |
| |
| sources = [ |
| "src/ios/gcm_impl.cc", |
| "src/ios/gcm_impl.h", |
| ] |
| deps = [ |
| "//base:base", # for LOG |
| "//sky/services/dynamic:dylib", |
| ":interfaces", |
| ] |
| } |
| } |