Skip to content

Commit 0a0bbed

Browse files
author
JiaYan Lin
committed
TEST ONLY
1 parent f49f2e3 commit 0a0bbed

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Android support in Bazel
2-
2+
#### test bazelci @HEAD
33
## Disclaimer
44

55
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.

rules/android_local_test/attrs.bzl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,10 @@ def make_attrs(additional_aspects = [], native_libs_transition = None):
175175
env = attr.string_dict(
176176
doc = "A dictionary of environment variables set for the execution of the test. Will be subject to make variable and $(location) expansion.",
177177
),
178-
robolectric_properties_file = attr.string(
178+
robolectric_properties_file = attr.label(
179179
doc = "The classpath to robolectric-deps.properties file.",
180-
default = "${JAVA_RUNFILES}/robolectric/bazel/robolectric-deps.properties",
180+
allow_single_file = True,
181+
default = "@robolectric//bazel:android-all",
181182
),
182183
test_class = attr.string(
183184
doc = """

rules/android_local_test/impl.bzl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ def _process_jvm(ctx, resources_ctx, **_unused_sub_ctxs):
169169
filter_jdeps(ctx, java_info.outputs.jdeps, filtered_jdeps, utils.only(resources_ctx.r_java.compile_jars.to_list()))
170170
providers.append(AndroidFilteredJdepsInfo(jdeps = filtered_jdeps))
171171
runfiles.append(filtered_jdeps)
172+
file = ctx.file.robolectric_properties_file
173+
properties = '${JAVA_RUNFILES}/' + '/'.join(file.short_path.split('/')[1:-1]) + '/robolectric-deps.properties'
174+
print(">>>>>>>>>>>> ", properties)
172175

173176
return ProviderInfo(
174177
name = "jvm_ctx",
@@ -178,7 +181,7 @@ def _process_jvm(ctx, resources_ctx, **_unused_sub_ctxs):
178181
deps = deps,
179182
java_start_class = java_start_class,
180183
coverage_start_class = coverage_start_class,
181-
android_properties_file = ctx.attr.robolectric_properties_file,
184+
android_properties_file = properties,
182185
additional_jvm_flags = [],
183186
),
184187
runfiles = ctx.runfiles(files = runfiles),

test/rules/android_binary_internal/r8_integration/r8_integration_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
import sys
1818
import unittest
1919
import zipfile
20+
import sys
21+
2022

2123

2224
class R8IntegrationTest(unittest.TestCase):

0 commit comments

Comments
 (0)