-
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
Android MVVM Module + Android Player test package restructure #307
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Harris Borawski <[email protected]>
…ayer into android-mvvm-module
/canary |
srcs = [ | ||
"src/test/java/com/intuit/playerui/android/AndroidPlayerTest.kt", | ||
"src/test/java/com/intuit/playerui/android/AssetContextTest.kt", | ||
"src/test/java/com/intuit/playerui/android/BrokenAssetTest.kt" |
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.
the first two are not great because the test target should really be in the test package, but it's moved here because of the associates line below, allowing the tests to access internal player API.
the BrokenAssetTest
is really bad since i had to move it out of the original package, otherwise i couldn't reference it as a source. It's really the same problem trying to access internal API
the main problem here is :player-kotlin
target is created as an intermediate target by the db android macro, and the visibility isn't marked as public so it can only be used from this package. The end result target does not meet the requirements to be used as an associate
I could either modify the grab rules or we need to write some hack, maybe wrapper library to expose :player-kotlin
? Is there a better way
visibility = ["//visibility:public"] | ||
) | ||
|
||
kt_jvm_library( |
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.
this is a terrible workaround for internals in Constants.kt
. Since the vals are internal but they're used for the test utils in utils/BUILD
, we make this target to use as a publicly visible associate
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.
in this commit this actually encapsulates everything, so then i can move BrokenAssetTest.kt
file back to where it belongs and get rid of this test target above and place it into the test package. I just don't know if this is the way we want to go
Change Type (required)
Indicate the type of change your pull request is:
patch
minor
major
📦 Published PR as canary version:
0.8.0--canary.307.9645
Try this version out locally by upgrading relevant packages to 0.8.0--canary.307.9645