Skip to content

Commit

Permalink
remove grab db
Browse files Browse the repository at this point in the history
  • Loading branch information
brocollie08 committed Jul 8, 2024
1 parent cf46da3 commit be1b030
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
15 changes: 6 additions & 9 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,6 @@ use_repo(android_ndk_repository_extension, "androidndk")

register_toolchains("@androidndk//:all")

# Databinding
bazel_dep(name = "grab_bazel_common")
git_override(
module_name = "grab_bazel_common",
# bazel-6 branch
commit = "75e9fd4d280329d3b13fc6f6bde1ab0f05fd2e86",
remote = "https://github.com/sugarmanz/grab-bazel-common.git",
)

remote_android_extensions = use_extension("@bazel_tools//tools/android:android_extensions.bzl", "remote_android_tools_extensions")
use_repo(remote_android_extensions, "android_gmaven_r8")

Expand Down Expand Up @@ -211,6 +202,12 @@ maven.install(
"org.slf4j:slf4j-api:1.7.36",
"ch.qos.logback:logback-classic:1.2.10",

"androidx.annotation:annotation:1.5.0",
"androidx.databinding:databinding-adapters:7.2.2",
"androidx.databinding:databinding-common:7.2.2",
"androidx.databinding:databinding-runtime:7.2.2",
"androidx.databinding:viewbinding:7.2.2",

# Junit5
"org.junit.platform:junit-platform-commons:1.7.2",
"org.junit.platform:junit-platform-console:1.7.2",
Expand Down
6 changes: 4 additions & 2 deletions android/player/BUILD
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
load(":defs.bzl", "main_deps", "main_exports", "main_resources", "test_deps")
load("@build_constants//:constants.bzl", "VERSION")
load("@rules_kotlin//kotlin:core.bzl", "kt_kotlinc_options")
load("@rules_kotlin//kotlin:android.bzl", "kt_android_library")
load("//jvm:defs.bzl", "distribution")
load("@grab_bazel_common//tools/databinding:databinding.bzl", "kt_db_android_library")
load("@rules_player//kotlin:defs.bzl", "kt_jvm_junit5_test", "lint")

kt_db_android_library(
kt_android_library(
name = "player",
srcs = glob(["src/main/java/**/*.kt"]),
custom_package = "com.intuit.playerui.android",
manifest = ":src/main/AndroidManifest.xml",
resource_files = glob(["src/main/res/**"]),
enable_data_binding = True,
resources = main_resources,
tags = ["maven_coordinates=com.intuit.playerui:android:aar:%s" % VERSION],
visibility = ["//visibility:public"],
Expand All @@ -19,7 +21,7 @@ kt_db_android_library(

distribution(
name = "player",
lib_name = "player-databinding",
lib_name = "player-no-db",
maven_coordinates = "com.intuit.playerui:android:%s" % VERSION,
)

Expand Down
5 changes: 5 additions & 0 deletions android/player/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ main_deps = main_exports + [
"@maven//:androidx_lifecycle_lifecycle_runtime_ktx",
"@maven//:androidx_lifecycle_lifecycle_viewmodel_ktx",
"@maven//:androidx_constraintlayout_constraintlayout",
"@maven//:androidx_databinding_databinding_adapters",
"@maven//:androidx_databinding_databinding_common",
"@maven//:androidx_databinding_databinding_runtime",
"@maven//:androidx_annotation_annotation",
"@maven//:androidx_databinding_viewbinding",
# JVM plugin deps
"//plugins/beacon/jvm:beacon",
"//plugins/pubsub/jvm:pubsub",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import androidx.transition.Transition
import com.intuit.playerui.android.AndroidPlayer
import com.intuit.playerui.android.asset.RenderableAsset
import com.intuit.playerui.android.asset.SuspendableAsset
import com.intuit.playerui.android.databinding.FallbackViewBinding
import com.intuit.playerui.android.databinding.PlayerFragmentBinding
import com.intuit.playerui.android.extensions.into
import com.intuit.playerui.android.extensions.transitionInto
import com.intuit.playerui.android.lifecycle.ManagedPlayerState
Expand Down Expand Up @@ -78,7 +76,7 @@ public abstract class PlayerFragment : Fragment(), ManagedPlayerState.Listener {
private var _binding: PlayerBinding? = null

/**
* [PlayerFragmentBinding] instance
* [PlayerBinding] instance
* This property is only valid between onCreateView and onDestroyView.
* Will throw a NPE if called out of turn.
*/
Expand Down Expand Up @@ -204,7 +202,7 @@ public abstract class PlayerFragment : Fragment(), ManagedPlayerState.Listener {
* [PlayerViewModel] encounters an [exception]. Defaults to an instance of [FallbackViewBinding].
*/
public open fun buildFallbackView(exception: Exception): View? =
FallbackViewBinding.inflate(layoutInflater).apply {
FallbackBinding.inflate(layoutInflater).apply {
this.error.text = exception.localizedMessage

retry.setOnClickListener {
Expand Down

0 comments on commit be1b030

Please sign in to comment.