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

TEST ONLY #200

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

TEST ONLY #200

wants to merge 1 commit into from

Conversation

jylinv0
Copy link

@jylinv0 jylinv0 commented Jan 23, 2024

TEST bazelci @Head

@@ -175,9 +175,10 @@ def make_attrs(additional_aspects = [], native_libs_transition = None):
env = attr.string_dict(
doc = "A dictionary of environment variables set for the execution of the test. Will be subject to make variable and $(location) expansion.",
),
robolectric_properties_file = attr.string(
robolectric_properties_file = attr.label(
Copy link
Contributor

@Bencodes Bencodes Jan 26, 2024

Choose a reason for hiding this comment

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

You can also just look up the properties file in the runfiles and error out if they aren't found. I believe this is how the native Android rules handle this use case already.

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

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the example. But if user have the option to use their own properties file, would this look-up approach work? On the other hand, I'm not sure if users ever want to use their own properties files.

Copy link
Contributor

Choose a reason for hiding this comment

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

It should as long as you are writing the file to the expected location. Probably isn't really a major use case that people will have though.

One use case that comes to mind would be stripping out old Android versions that you no longer want to support from Robolectric. If there is a need to customize the properties file we can always build out support for that in rules_robolectric.

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.

2 participants