1 # Copyright 2017 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6 import("//build/config/android/config.gni")
7 import("//build/config/android/rules.gni")
11 java_group("background_task_scheduler_java") {
13 "//components/background_task_scheduler:factory_java",
14 "//components/background_task_scheduler:public_java",
15 "//components/background_task_scheduler/internal:native_task_java",
20 group("background_task_scheduler") {
27 static_library("public") {
30 "background_task_scheduler.h",
40 "//components/keyed_service/core",
44 static_library("factory") {
46 "background_task_scheduler_factory.cc",
47 "background_task_scheduler_factory.h",
53 deps += [ "internal:native_task" ]
58 # This is shared between WebView and Chrome. We do not want to add GCM
59 # related permissions for WebView while still wanting to avoid collision
60 # between WebView and Chrome.
61 android_library("background_task_scheduler_task_ids_java") {
62 srcjar_deps = [ ":jni_enums" ]
63 deps = [ "//third_party/androidx:androidx_annotation_annotation_java" ]
66 java_cpp_enum("jni_enums") {
69 sources = [ "task_ids.h" ]
72 android_library("public_java") {
74 "android/java/src/org/chromium/components/background_task_scheduler/BackgroundTask.java",
75 "android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskFactory.java",
76 "android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskScheduler.java",
77 "android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerExternalUma.java",
78 "android/java/src/org/chromium/components/background_task_scheduler/NativeBackgroundTask.java",
79 "android/java/src/org/chromium/components/background_task_scheduler/NativeBackgroundTaskDelegate.java",
80 "android/java/src/org/chromium/components/background_task_scheduler/TaskInfo.java",
81 "android/java/src/org/chromium/components/background_task_scheduler/TaskParameters.java",
85 ":background_task_scheduler_task_ids_java",
87 "//content/public/android:content_main_dex_java",
88 "//third_party/androidx:androidx_annotation_annotation_java",
92 android_library("factory_java") {
93 sources = [ "android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerFactory.java" ]
97 "internal:internal_java",
99 "//third_party/androidx:androidx_annotation_annotation_java",
103 robolectric_library("components_background_task_scheduler_junit_tests") {
104 include_android_sdk = false
106 "internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BackgroundTaskSchedulerImplWithMockTest.java",
107 "internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BackgroundTaskSchedulerJobServiceTest.java",
108 "internal/android/java/src/org/chromium/components/background_task_scheduler/internal/MockBackgroundTaskSchedulerDelegate.java",
109 "internal/android/junit/src/org/chromium/components/background_task_scheduler/internal/BackgroundTaskJobServiceTest.java",
110 "internal/android/junit/src/org/chromium/components/background_task_scheduler/internal/BackgroundTaskSchedulerImplTest.java",
111 "internal/android/junit/src/org/chromium/components/background_task_scheduler/internal/BackgroundTaskSchedulerUmaTest.java",
112 "internal/android/junit/src/org/chromium/components/background_task_scheduler/internal/TaskInfoTest.java",
113 "internal/android/junit/src/org/chromium/components/background_task_scheduler/internal/TestBackgroundTask.java",
114 "internal/android/junit/src/org/chromium/components/background_task_scheduler/internal/TestBackgroundTaskFactory.java",
118 ":background_task_scheduler_task_ids_java",
119 "internal:internal_java",
121 "//base:base_java_test_support",
122 "//base:base_junit_test_support",
123 "//components/background_task_scheduler:public_java",
124 "//content/public/test/android:content_java_test_support",
125 "//third_party/android_deps:chromium_play_services_availability_shadows_java",
126 "//third_party/androidx:androidx_annotation_annotation_java",
127 "//third_party/junit",
128 "//third_party/mockito:mockito_java",