Skip to content

Commit

Permalink
fix properties file's path in android_local_test
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaYan Lin committed Feb 1, 2024
1 parent 1af51cc commit 5abd169
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
10 changes: 10 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,13 @@ use_repo(bazel_binaries, "bazel_binaries")
# extension for apksignerextensions
apksig_extension = use_extension("//bzlmod_extensions:apksig.bzl", "apksig_extension")
use_repo(apksig_extension, "apksig")

# rules_robolectric > 4.11.1
RULES_ROBOLECTRIC_COMMIT = "a5b25a8c27cc6add74bb01e62cd0dc72df8933ff"
RULES_ROBOLECTRIC_SHA = "wErQv8LAP50nd8+P4IkYczddtsi+/56ntxuy/Qp5+0c="
archive_override(
module_name = "rules_robolectric",
urls = ["https://github.com/robolectric/robolectric-bazel/archive/%s.zip" % RULES_ROBOLECTRIC_COMMIT],
integrity = "sha256-%s" % RULES_ROBOLECTRIC_SHA,
strip_prefix = "robolectric-bazel-%s" % RULES_ROBOLECTRIC_COMMIT
)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Android support in Bazel
#### test bazelci @HEAD

## Disclaimer

NOTE: This branch is a development preview of the Starlark implementation of Android rules for Bazel. This code is incomplete and may not function as-is.
Expand Down
6 changes: 3 additions & 3 deletions prereqs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ def rules_android_prereqs(dev_mode = False):
maybe(
http_archive,
name = "robolectric",
urls = ["https://github.com/robolectric/robolectric-bazel/archive/4.10.3.tar.gz"],
strip_prefix = "robolectric-bazel-4.10.3",
sha256 = "1b199a932cbde4af728dd8275937091adbb89a4bf63d326de49e6d0a42e723bf",
urls = ["https://github.com/robolectric/robolectric-bazel/archive/a5b25a8c27cc6add74bb01e62cd0dc72df8933ff.zip"],
strip_prefix = "robolectric-bazel-a5b25a8c27cc6add74bb01e62cd0dc72df8933ff",
sha256 = "c04ad0bfc2c03f9d2777cf8fe0891873375db6c8beff9ea7b71bb2fd0a79fb47",
)

maybe(
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 @@ -178,7 +178,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,
default = "@robolectric//bazel:android-all",
default = '@robolectric//bazel:properties',
),
test_class = attr.string(
doc = """
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
properties = '${JAVA_RUNFILES}/' + '/'.join(file.short_path.split('/')[1:-1]) + '/robolectric-deps.properties'
print(">>>>>>>>>>>> ", properties)
properties = '${JAVA_RUNFILES}/' + '/'.join(file.short_path.split('/')[1:])

return ProviderInfo(
name = "jvm_ctx",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
import sys
import unittest
import zipfile
import sys



class R8IntegrationTest(unittest.TestCase):
Expand Down

0 comments on commit 5abd169

Please sign in to comment.