summaryrefslogtreecommitdiff
path: root/chromium/components/background_task_scheduler/BUILD.gn
blob: e23f4837d71c066b466273c81ee88650a6650e0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Copyright 2017 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.

if (is_android) {
  import("//build/config/android/config.gni")
  import("//build/config/android/rules.gni")
}

# Convenience target for developers to build prod and test code.
group("background_task_scheduler") {
  testonly = true

  if (is_android) {
    deps = [
      ":background_task_scheduler_java",
      ":background_task_scheduler_javatests",
    ]
  }
}

if (is_android) {
  android_library("background_task_scheduler_java") {
    java_files = [
      "android/java/src/org/chromium/components/background_task_scheduler/BackgroundTask.java",
      "android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskGcmTaskService.java",
      "android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskJobService.java",
      "android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskScheduler.java",
      "android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerDelegate.java",
      "android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerFactory.java",
      "android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerGcmNetworkManager.java",
      "android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerJobService.java",
      "android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerPrefs.java",
      "android/java/src/org/chromium/components/background_task_scheduler/BundleToPersistableBundleConverter.java",
      "android/java/src/org/chromium/components/background_task_scheduler/TaskIds.java",
      "android/java/src/org/chromium/components/background_task_scheduler/TaskInfo.java",
      "android/java/src/org/chromium/components/background_task_scheduler/TaskParameters.java",
    ]

    deps = [
      "//base:base_java",
      "//third_party/android_tools:android_support_annotations_java",
      google_play_services_library,
    ]
  }

  android_library("background_task_scheduler_javatests") {
    testonly = true

    java_files = [
      "android/javatests/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerJobServiceTest.java",
      "android/javatests/src/org/chromium/components/background_task_scheduler/BundleToPersistableBundleConverterTest.java",
    ]

    deps = [
      ":background_task_scheduler_java",
      "//base:base_java",
      "//base:base_java_test_support",
      "//third_party/android_support_test_runner:runner_java",
      "//third_party/junit",
      google_play_services_library,
    ]
  }

  junit_binary("components_background_task_scheduler_junit_tests") {
    java_files = [
      "android/junit/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerGcmNetworkManagerTest.java",
      "android/junit/src/org/chromium/components/background_task_scheduler/BackgroundTaskGcmTaskServiceTest.java",
      "android/junit/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerPrefsTest.java",
      "android/junit/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerTest.java",
      "android/junit/src/org/chromium/components/background_task_scheduler/ShadowGcmNetworkManager.java",
      "android/junit/src/org/chromium/components/background_task_scheduler/TestBackgroundTask.java",
    ]

    deps = [
      ":background_task_scheduler_java",
      "//base:base_java",
      "//base:base_java_test_support",
      "//third_party/junit",
      google_play_services_library,
    ]
    srcjar_deps = [ "//base:base_build_config_gen" ]
  }
}