Skip to content

Commit

Permalink
fix android_local_test
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaYan Lin committed Jan 25, 2024
1 parent 1b01367 commit 9fb2a26
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use_repo(rules_java_toolchains, "remote_java_tools")
bazel_dep(name = "protobuf", version = "3.19.0", repo_name = "com_google_protobuf")
bazel_dep(name = "rules_jvm_external", version = "4.5")
bazel_dep(name = "bazel_skylib", version = "1.0.3")
bazel_dep(name = "rules_robolectric", version = "4.10", repo_name = "robolectric")
bazel_dep(name = "rules_robolectric", version = "4.11.1", repo_name = "robolectric")

register_toolchains("//toolchains/android:all")

Expand Down
2 changes: 1 addition & 1 deletion rules/android_local_test/attrs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def make_attrs(additional_aspects = [], native_libs_transition = None):
),
robolectric_properties_file = attr.label(
doc = "The classpath to robolectric-deps.properties file.",
allow_single_file = True,
allow_single_file = True,
default = "@robolectric//bazel:android-all",
),
test_class = attr.string(
Expand Down
3 changes: 1 addition & 2 deletions rules/android_local_test/impl.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@ def _process_jvm(ctx, resources_ctx, **_unused_sub_ctxs):
providers.append(AndroidFilteredJdepsInfo(jdeps = filtered_jdeps))
runfiles.append(filtered_jdeps)
file = ctx.file.robolectric_properties_file
print(">>>>>>>>>> ", file, ctx.file.robolectric_properties_file)
properties = '${JAVA_RUNFILES}/' + '/'.join(file.path.split('/')[:-1]) + '/' + 'robolectric-deps.properties'
properties = '${JAVA_RUNFILES}/' + '/'.join(file.short_path.split('/')[1:-1]) + '/robolectric-deps.properties'
print(">>>>>>>>>>>> ", properties)

return ProviderInfo(
Expand Down

0 comments on commit 9fb2a26

Please sign in to comment.