Skip to content

Commit

Permalink
Fix oppia#2917, oppia#2969: Build bazel for util/extensions and fix t…
Browse files Browse the repository at this point in the history
…ypo in versions.bzl (oppia#2955)

* Added protbuf-lite dependency to versions.bzl, made the necessary changes to utility/BUILD.bazel to accomodate the new extensions/BUILD.bazel file created

* Converted the '.'s and ':'s to '_' in the dependencies in the extensions/BUILD.bazel file and added the bundle_extensions library to app/BUILD.bazel

* Reverted accidental changes to .idea/misc.xml

* Removed visibility and dependency from the live_data_ext library as it isn't being used anywhere

* Added back lifecycle dependency to live_data_ext library

* Fixed type in versions.bzl

* Renamed LiveDataExt.kt to Extensions.kt and made corresponding changes to its library

* Removed Extensions.kt and it's corresponding library
  • Loading branch information
Victor-Titan authored Mar 31, 2021
1 parent 239ab72 commit 2b8c66b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
1 change: 1 addition & 0 deletions app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,7 @@ kt_android_library(
"//third_party:javax_annotation_javax_annotation-api_jar",
"//utility",
"//utility/src/main/java/org/oppia/android/util/accessibility:prod_module",
"//utility/src/main/java/org/oppia/android/util/extensions:bundle_extensions",
],
)

Expand Down
3 changes: 2 additions & 1 deletion third_party/versions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dependency elsewhere in the app.
Note that dependencies can only be represented once in the list--that's by design to protect against
one-version violations. See https://docs.bazel.build/versions/master/best-practices.html#versioning
for more information on mutli-version violations.
for more information on multi-version violations.
Note that each of the dependencies will have all ':'s & '.'s replaced with underscores. For example,
the dependency "android.arch.core:core-testing": "1.1.1" will be referencable with the following:
Expand Down Expand Up @@ -53,6 +53,7 @@ MAVEN_PRODUCTION_DEPENDENCY_VERSIONS = {
"com.google.firebase:firebase-crashlytics": "17.1.1",
"com.google.gms:google-services": "4.3.3",
"com.google.guava:guava": "28.1-android",
"com.google.protobuf:protobuf-lite": "3.0.0",
"com.squareup.retrofit2:converter-gson": "2.5.0",
"com.squareup.retrofit2:retrofit": "2.9.0",
"de.hdodenhof:circleimageview": "3.0.1",
Expand Down
1 change: 1 addition & 0 deletions utility/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ MIGRATED_PROD_FILES = glob([
"src/main/java/org/oppia/android/util/accessibility/*.kt",
"src/main/java/org/oppia/android/util/profile/*.kt",
"src/main/java/org/oppia/android/util/datetime/*.kt",
"src/main/java/org/oppia/android/util/extensions/*.kt",
"src/main/java/org/oppia/android/util/system/*.kt",
"src/main/java/org/oppia/android/util/networking/*.kt",
"src/main/java/org/oppia/android/util/threading/*.kt",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
General purposes utilities to manage extensions
"""

load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_android_library")

kt_android_library(
name = "bundle_extensions",
srcs = [
"BundleExtensions.kt",
],
visibility = ["//:oppia_api_visibility"],
deps = [
"//third_party:com_google_protobuf_protobuf-lite",
],
)

This file was deleted.

0 comments on commit 2b8c66b

Please sign in to comment.