Skip to content

Conversation

@brocollie08
Copy link
Contributor

@brocollie08 brocollie08 commented Feb 26, 2024

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

@brocollie08 brocollie08 changed the title Android MVVM Module [WIP] Android MVVM Module Feb 27, 2024
@brocollie08 brocollie08 marked this pull request as ready for review February 27, 2024 00:39
@brocollie08 brocollie08 added the minor Increment the minor version when merged label Feb 27, 2024
@brocollie08
Copy link
Contributor Author

/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"
Copy link
Contributor Author

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(
Copy link
Contributor Author

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

Copy link
Contributor Author

@brocollie08 brocollie08 Mar 4, 2024

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

@brocollie08 brocollie08 changed the title [WIP] Android MVVM Module Android MVVM Module + Android Player test package restructure Mar 4, 2024
@brocollie08 brocollie08 requested a review from sugarmanz March 4, 2024 22:40
@brocollie08 brocollie08 marked this pull request as draft March 20, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Increment the minor version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants