Skip to content
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

Adding support for Robolectric 4.7.3 and preinstrumented jars #958

Merged
merged 1 commit into from
Feb 25, 2022

Conversation

tyvsmith
Copy link
Member

Master is currently not in state to release a new version of OKbuck without reverting the work towards upgrading Gradle.

I've created a release branch off of the last tag (v0.52.3) and this is a pull request against that branch. We can cut this release build 0.52.4 from the release branch, then separately patch this diff against master which will require some rebase conflict changes.

This was tested locally against the Uber Android monorepo.

-4.7.3 is needed to address ARM compatibility on m1, as it carries a patch for sqlite4java.
-They also introduced preinstrumented jars which should save 10-12 seconds per test process instantiation.

@@ -115,9 +118,10 @@ public void finalizeDependencies(OkBuckExtension okBuckExtension) {
API_25("7.1.0_r7", "r1"),
API_26("8.0.0_r4", "r1"),
API_27("8.1.0", "4611349"),
API_P("P", "4651975"),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String getCoordinates() {
return "org.robolectric:android-all:"
String getCoordinates(String preinstrumentedVersion) {
return "org.robolectric:android-all-instrumented:"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can return the old format and new preinstrumentedVersion based on if preinstrumentedVersion is null or not.
This will keep it backward compatible.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can, but this is now hardcoded in robolectric 4.7 so there's also a reason to require it and default to i3 (the default version checked in at this time). Thoughts on keeping backwards compatibility with older robo versions instead of a sane default?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good then. We can ask users to upgrade to latest robolectric in the release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants