Android MVVM Module + Android Player test package restructure#307
Android MVVM Module + Android Player test package restructure#307brocollie08 wants to merge 17 commits intomainfrom
Conversation
Co-authored-by: Harris Borawski <harrisborawski@gmail.com>
…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.
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.
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.
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:
patchminormajor📦 Published PR as canary version:
0.8.0--canary.307.9645Try this version out locally by upgrading relevant packages to 0.8.0--canary.307.9645