-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup Android dependencies #77
Changes from all commits
877a0d2
e868ac7
84e2dbb
8f65e1f
c4e4be9
ea453fd
47ceb31
6636120
4f87612
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
load("//jvm/dependencies:versions.bzl", "versions") | ||
load("//android/player:deps.bzl", player = "maven") | ||
load("//android/demo:deps.bzl", demo = "maven") | ||
|
||
android = [ | ||
# Grab Databinding | ||
"androidx.databinding:databinding-adapters:%s" % versions.androidx.databinding, | ||
"androidx.databinding:databinding-common:%s" % versions.androidx.databinding, | ||
"androidx.databinding:databinding-runtime:%s" % versions.androidx.databinding, | ||
|
||
# Grab Dagger | ||
"com.google.dagger:dagger:%s" % versions.dagger, | ||
"com.google.dagger:dagger-compiler:%s" % versions.dagger, | ||
"javax.inject:javax.inject:%s" % versions.javax.inject, | ||
|
||
# AndroidX Resolutions | ||
"androidx.activity:activity-ktx:%s" % versions.androidx.activity, | ||
"androidx.fragment:fragment-ktx:%s" % versions.androidx.fragment, | ||
] | ||
|
||
maven = android + player + demo |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
load("@rules_player//javascript:utils.bzl", "remove_duplicates") | ||
load(":common.bzl", common = "maven") | ||
load("//android/player:deps.bzl", android = "maven") | ||
load("//android/demo:deps.bzl", demo = "maven") | ||
load("//android:deps.bzl", android = "maven") | ||
load("//jvm/core:deps.bzl", core = "maven") | ||
load("//jvm/graaljs:deps.bzl", graaljs = "maven") | ||
load("//jvm/j2v8:deps.bzl", j2v8 = "maven") | ||
|
@@ -13,4 +13,4 @@ load("@grab_bazel_common//:workspace_defs.bzl", grab = "GRAB_BAZEL_COMMON_ARTIFA | |
|
||
tooling = distribution + grab | ||
|
||
maven = common + core + graaljs + j2v8 + utils + testutils + perf + plugins + tooling + android + demo | ||
maven = remove_duplicates(common + core + graaljs + j2v8 + utils + testutils + perf + plugins + tooling + android) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔥 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,34 @@ versions = struct( | |
), | ||
hooks = "0.11.1", | ||
testing = struct( | ||
applitools = "4.7.6", | ||
junit = "4.12", | ||
jupiter = "5.6.0", | ||
kluent = "1.68", | ||
mockk = "1.9.3", | ||
robolectric = "4.8", | ||
), | ||
jmh = "1.21", | ||
androidx = struct( | ||
activity = "1.2.3", | ||
appcompat = "1.3.0", | ||
constraintlayout = "2.1.4", | ||
core = "1.6.0", | ||
databinding = "7.2.2", | ||
fragment = "1.3.4", | ||
lifecycle = "2.4.0", | ||
navigation = "2.3.3", | ||
test = struct( | ||
core = "1.4.0", | ||
espresso = "3.3.0", | ||
junit = "1.1.3", | ||
), | ||
transition = "1.4.1", | ||
), | ||
dagger = "2.35.1", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i recall you saying you needed to add this for some odd reason, do we still need this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dagger is needed to load the grab common repository -- at least it was when i initially integrated. it'd be cool to get off that repo eventually |
||
javax = struct( | ||
inject = "1", | ||
), | ||
material_dialogs = "3.3.0", | ||
material = "1.4.0", | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
load("//jvm/dependencies:versions.bzl", "versions") | ||
load("@rules_player//maven:parse_coordinates.bzl", "parse_coordinates") | ||
load("//plugins/reference-assets/android/src/androidTest/java/com/intuit/player/android/reference/assets/test:deps.bzl", maven_test = "maven") | ||
|
||
maven = [ | ||
"org.jetbrains.kotlinx:kotlinx-coroutines-android:%s" % versions.kotlin.coroutines, | ||
|
||
"androidx.appcompat:appcompat:1.2.0", | ||
"androidx.core:core-ktx:1.3.2", | ||
"androidx.constraintlayout:constraintlayout:2.0.4", | ||
] | ||
maven_main = [] | ||
|
||
main_exports = [ | ||
"//android/player", | ||
] | ||
|
||
main_deps = main_exports + parse_coordinates(maven) + [ | ||
main_deps = main_exports + parse_coordinates(maven_main) + [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is more for the patternization of If we remove the
manually, or reintroduce the |
||
"//jvm:kotlin_serialization", | ||
"//plugins/reference-assets/jvm:reference-assets", | ||
"//plugins/pending-transaction/jvm:pending-transaction", | ||
] | ||
|
||
maven = maven_main + maven_test |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
load("@io_bazel_rules_kotlin//kotlin:android.bzl", "kt_android_library") | ||
load("@rules_player//kotlin:lint.bzl", "lint") | ||
load(":deps.bzl", "main_deps") | ||
|
||
kt_android_library( | ||
name = "test", | ||
srcs = ["assertions.kt", "AssetTest.kt"], | ||
deps = main_deps, | ||
visibility = ["//plugins/reference-assets/android:__subpackages__"], | ||
) | ||
|
||
lint( | ||
name = "test", | ||
srcs = glob(["*.kt"]), | ||
lint_config = "//jvm:lint_config", | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
load("//jvm/dependencies:versions.bzl", "versions") | ||
load("@rules_player//maven:parse_coordinates.bzl", "parse_coordinates") | ||
|
||
maven = [ | ||
"androidx.test:core:%s" % versions.androidx.test.core, | ||
"androidx.test:runner:%s" % versions.androidx.test.core, | ||
"junit:junit:%s" % versions.testing.junit, | ||
"org.robolectric:robolectric:%s" % versions.testing.robolectric, | ||
] | ||
|
||
main_deps = parse_coordinates(maven) + [ | ||
"@robolectric//bazel:android-all", | ||
"//jvm/utils", | ||
"//plugins/common-types/jvm:common-types", | ||
"//plugins/pending-transaction/jvm:pending-transaction", | ||
"//plugins/reference-assets/android:assets", | ||
"//plugins/reference-assets/mocks:jar", | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's constraintlayout gotta do with default fallback? you mean the fallbackView? is that the only place we use it..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would love to not have a dependency on
constraintlayout
in the base android player dep, but we are using it to build the default fallback view:https://github.com/player-ui/player/blob/main/android/player/src/main/res/layout/default_fallback.xml#L2