-
Notifications
You must be signed in to change notification settings - Fork 48
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/JVM - expose constantController #489
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sugarmanz
reviewed
Aug 14, 2024
jvm/core/src/main/kotlin/com/intuit/playerui/core/constants/ConstantsController.kt
Outdated
Show resolved
Hide resolved
jvm/core/src/main/kotlin/com/intuit/playerui/core/player/HeadlessPlayer.kt
Outdated
Show resolved
Hide resolved
jvm/core/src/test/kotlin/com/intuit/playerui/core/player/HeadlessPlayerTest.kt
Outdated
Show resolved
Hide resolved
android/player/src/main/java/com/intuit/playerui/android/AndroidPlayer.kt
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #489 +/- ##
==========================================
- Coverage 91.97% 91.93% -0.04%
==========================================
Files 341 339 -2
Lines 26963 26831 -132
Branches 1946 1945 -1
==========================================
- Hits 24799 24668 -131
+ Misses 2150 2149 -1
Partials 14 14 ☔ View full report in Codecov by Sentry. |
/canary |
sugarmanz
approved these changes
Aug 14, 2024
brocollie08
approved these changes
Aug 14, 2024
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Android provide access to Player with AssetContext
Usage:
assetContext.player.constantsController.getConstants()
Change Type (required)
Indicate the type of change your pull request is:
patch
minor
major
Does your PR have any documentation updates?
📦 Published PR as canary version:
0.8.1--canary.489.16892
Try this version out locally by upgrading relevant packages to 0.8.1--canary.489.16892
Release Notes
Expose the core Player constantsController to Android/JVM consumers
AndroidPlayer provides top-level api and plugins access including
constantsController
with AssetContextSample usage:
assetContext.player.constantsController.getConstants(key, namespace)
Version
Published prerelease version:
0.9.0-next.6
Changelog
Release Notes
Android/JVM - expose constantController (#489)
Expose the core Player constantsController to Android/JVM consumers
AndroidPlayer provides top-level api and plugins access including
constantsController
with AssetContextSample usage:
assetContext.player.constantsController.getConstants(key, namespace)
Storybook Addon Fixes (#449)
[Hermes] Android integration (#410)
Initial integration with the Hermes JavaScript runtime. This shows a tremendous size improvement over the existing J2V8 integration of ~70% (7.6 MB -> 2.3 MB, architecture dependent).
Opt-in
For now, the default runtime integration provided by the Android Player will still be
com.intuit.playerui:j2v8-android
, but Hermes can be opted in manually by excluding the J2V8 transitive dependency and including the Hermes artifact:Most of the setup for this integration is done simply by including the right dependency (and excluding the wrong one), however, the
hermes-android
integration also relies on the SoLoader for loading the native libraries. All that's needed is to initialize theSoLoader
(should be on your classpath with thehermes-android
dependency) with an AndroidContext
somewhere before you use theAndroidPlayer
, potentially in your activitiesonCreate
:🚀 Enhancement
🐛 Bug Fix
config=ci
#482 (@sugarmanz)Authors: 6