-
Notifications
You must be signed in to change notification settings - Fork 526
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…3739) * made build bazel files * created build bazel files * Update BUILD.bazel * Update BUILD.bazel * Update BUILD.bazel * changed visibility * revert changes * add deps * change deps * add deps * done changes * Update domain/src/main/java/org/oppia/android/domain/oppialogger/analytics/BUILD.bazel Co-authored-by: Ben Henning <[email protected]> * Update domain/src/main/java/org/oppia/android/domain/oppialogger/exceptions/BUILD.bazel Co-authored-by: Ben Henning <[email protected]> Co-authored-by: Ben Henning <[email protected]>
- Loading branch information
1 parent
baf7fd2
commit 15a7772
Showing
6 changed files
with
188 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
domain/src/main/java/org/oppia/android/domain/oppialogger/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
""" | ||
Package for providing logging support. | ||
""" | ||
|
||
load("@dagger//:workspace_defs.bzl", "dagger_rules") | ||
load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_android_library") | ||
|
||
kt_android_library( | ||
name = "oppia_logger", | ||
srcs = [ | ||
"OppiaLogger.kt", | ||
], | ||
visibility = ["//domain:__pkg__"], | ||
deps = [ | ||
"//domain/src/main/java/org/oppia/android/domain/oppialogger/analytics:controller", | ||
"//model:event_logger_java_proto_lite", | ||
"//utility/src/main/java/org/oppia/android/util/logging:console_logger", | ||
], | ||
) | ||
|
||
kt_android_library( | ||
name = "startup_listener", | ||
srcs = [ | ||
"ApplicationStartupListener.kt", | ||
], | ||
visibility = ["//:oppia_api_visibility"], | ||
) | ||
|
||
kt_android_library( | ||
name = "storage_module", | ||
srcs = [ | ||
"LogStorageModule.kt", | ||
], | ||
visibility = ["//domain/src/main/java/org/oppia/android/domain/oppialogger:__subpackages__"], | ||
deps = [ | ||
":dagger", | ||
], | ||
) | ||
|
||
dagger_rules() |
23 changes: 23 additions & 0 deletions
23
domain/src/main/java/org/oppia/android/domain/oppialogger/analytics/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
""" | ||
Package for providing logging support for analytics events. | ||
""" | ||
|
||
load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_android_library") | ||
|
||
kt_android_library( | ||
name = "controller", | ||
srcs = [ | ||
"AnalyticsController.kt", | ||
], | ||
visibility = ["//domain/src/main/java/org/oppia/android/domain/oppialogger:__subpackages__"], | ||
deps = [ | ||
"//data/src/main/java/org/oppia/android/data/persistence:cache_store", | ||
"//domain/src/main/java/org/oppia/android/domain/oppialogger:storage_module", | ||
"//model:event_logger_java_proto_lite", | ||
"//utility/src/main/java/org/oppia/android/util/data:data_provider", | ||
"//utility/src/main/java/org/oppia/android/util/logging:console_logger", | ||
"//utility/src/main/java/org/oppia/android/util/logging:event_logger", | ||
"//utility/src/main/java/org/oppia/android/util/logging:exception_logger", | ||
"//utility/src/main/java/org/oppia/android/util/networking:network_connection_util", | ||
], | ||
) |
52 changes: 52 additions & 0 deletions
52
domain/src/main/java/org/oppia/android/domain/oppialogger/exceptions/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
""" | ||
Package for providing logging support for exceptions. | ||
""" | ||
|
||
load("@dagger//:workspace_defs.bzl", "dagger_rules") | ||
load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_android_library") | ||
|
||
kt_android_library( | ||
name = "controller", | ||
srcs = [ | ||
"ExceptionsController.kt", | ||
], | ||
visibility = ["//domain:__subpackages__"], | ||
deps = [ | ||
"//data/src/main/java/org/oppia/android/data/persistence:cache_store", | ||
"//domain/src/main/java/org/oppia/android/domain/oppialogger:storage_module", | ||
"//model:event_logger_java_proto_lite", | ||
"//utility/src/main/java/org/oppia/android/util/data:data_provider", | ||
"//utility/src/main/java/org/oppia/android/util/logging:console_logger", | ||
"//utility/src/main/java/org/oppia/android/util/logging:exception_logger", | ||
"//utility/src/main/java/org/oppia/android/util/networking:network_connection_util", | ||
"//utility/src/main/java/org/oppia/android/util/system:oppia_clock", | ||
], | ||
) | ||
|
||
kt_android_library( | ||
name = "logger_module", | ||
srcs = [ | ||
"UncaughtExceptionLoggerModule.kt", | ||
], | ||
visibility = ["//:oppia_api_visibility"], | ||
deps = [ | ||
":dagger", | ||
":startup_listener", | ||
"//domain/src/main/java/org/oppia/android/domain/oppialogger:startup_listener", | ||
], | ||
) | ||
|
||
kt_android_library( | ||
name = "startup_listener", | ||
srcs = [ | ||
"UncaughtExceptionLoggerStartupListener.kt", | ||
], | ||
visibility = ["//:oppia_testing_visibility"], | ||
deps = [ | ||
":controller", | ||
"//domain/src/main/java/org/oppia/android/domain/oppialogger:startup_listener", | ||
"//utility/src/main/java/org/oppia/android/util/logging:console_logger", | ||
], | ||
) | ||
|
||
dagger_rules() |
62 changes: 62 additions & 0 deletions
62
domain/src/main/java/org/oppia/android/domain/oppialogger/loguploader/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
""" | ||
Package for providing log uploading functionality. | ||
""" | ||
|
||
load("@dagger//:workspace_defs.bzl", "dagger_rules") | ||
load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_android_library") | ||
|
||
kt_android_library( | ||
name = "initializer", | ||
srcs = [ | ||
"LogUploadWorkManagerInitializer.kt", | ||
], | ||
deps = [ | ||
":worker", | ||
"//domain/src/main/java/org/oppia/android/domain/oppialogger:startup_listener", | ||
"//third_party:androidx_work_work-runtime-ktx", | ||
"//utility/src/main/java/org/oppia/android/util/logging:log_uploader", | ||
], | ||
) | ||
|
||
kt_android_library( | ||
name = "worker", | ||
srcs = [ | ||
"LogUploadWorker.kt", | ||
], | ||
deps = [ | ||
"//domain/src/main/java/org/oppia/android/domain/oppialogger/analytics:controller", | ||
"//domain/src/main/java/org/oppia/android/domain/oppialogger/exceptions:controller", | ||
"//third_party:androidx_work_work-runtime-ktx", | ||
"//utility/src/main/java/org/oppia/android/util/logging:console_logger", | ||
"//utility/src/main/java/org/oppia/android/util/logging:event_logger", | ||
"//utility/src/main/java/org/oppia/android/util/logging:exception_logger", | ||
"//utility/src/main/java/org/oppia/android/util/threading:annotations", | ||
], | ||
) | ||
|
||
kt_android_library( | ||
name = "worker_factory", | ||
srcs = [ | ||
"LogUploadWorkerFactory.kt", | ||
], | ||
visibility = ["//domain:__pkg__"], | ||
deps = [ | ||
":worker", | ||
"//third_party:androidx_work_work-runtime-ktx", | ||
], | ||
) | ||
|
||
kt_android_library( | ||
name = "worker_module", | ||
srcs = [ | ||
"LogUploadWorkerModule.kt", | ||
], | ||
visibility = ["//:oppia_api_visibility"], | ||
deps = [ | ||
":dagger", | ||
":initializer", | ||
"//domain/src/main/java/org/oppia/android/domain/oppialogger:startup_listener", | ||
], | ||
) | ||
|
||
dagger_rules() |