-
Notifications
You must be signed in to change notification settings - Fork 17
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
Make robolectric-deps.properties public #92
Conversation
Seems this properties files contain essential information that need to be passed from users if they don't have their custom properties files. Make it public so users can declare dependency on it.
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 seems fine although i'm curious what information you need from the property.
To launch robolectric, android_local_test in rules_android project needs to pass robolectric-deps.properties so robolectric knows where needed jar file is located. Not passing jar location mapping would cause an error like Users can override the location of properties file used in android_local_test with their own, but by default android_local_test will pass the one embedded in |
@jylinv0 Thanks for your contribution. |
Here's an example of where it's being used https://github.com/bazelbuild/rules_android/pull/200/files#diff-dd8fdb04166b7ed1296b63b21ebc3ad01b0f5ebf71c0919aae354eb6c73581b4R178 @utzcoz this use case seems specific to @jylinv0 you can find the properties file in the runfiles like this https://github.com/Bencodes/rules_kotlin/blob/blee/fork/master-napt-1.8-rules-android-pre-alpha/kotlin/internal/jvm/kt_android_local_test_impl.bzl#L178-L183 without needing to depend on the properties file directly. |
@Bencodes Thanks for clarifying it. The run file looks great enough to customize it. |
I'd be curious to see how the approach in kt_android_local_test (that Ben linked) scales. It does a linear search of all runfiles until it finds the properties file. If you have a really big app where the test has a lot of runfiles, it might take a long time, and you're essentially at the mercy of your persistent storage I/O speed and latency. Is it possible to get a new rules_robolectric release with this PR included? |
@ted-xie Sorry, robolectric-bazel keeps the same release cycle with robolectric/robolectric. So this robolectric-bazel version will be released after robolectric/robolectric new version release, maybe 4.12. |
We could follow a release versioning strategy like KSP for cases like these https://github.com/google/ksp. A simplified version could look like |
It looks great to me. What do you think about it @hoisie @brettchabot ? |
Seems this properties file contains essential information that need to be passed from users if they don't have their custom properties files. Make it public so users can declare dependency on it.