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

DO NOT SUBMIT -- PR to run BazelCI on ACL deletion #186

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions rules/acls.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ load("//rules/acls:android_binary_resource_name_obfuscation_opt_out_allowlist.bz
load("//rules/acls:android_binary_starlark_dex_desugar_proguard.bzl", "ANDROID_BINARY_STARLARK_DEX_DESUGAR_PROGUARD_FALLBACK", "ANDROID_BINARY_STARLARK_DEX_DESUGAR_PROGUARD_ROLLOUT")
load("//rules/acls:android_binary_starlark_javac.bzl", "ANDROID_BINARY_STARLARK_JAVAC_FALLBACK", "ANDROID_BINARY_STARLARK_JAVAC_ROLLOUT")
load("//rules/acls:android_binary_starlark_rollout.bzl", "ANDROID_BINARY_STARLARK_FALLBACK", "ANDROID_BINARY_STARLARK_ROLLOUT")
load("//rules/acls:android_binary_starlark_split_transition.bzl", "ANDROID_BINARY_STARLARK_SPLIT_TRANSITION_FALLBACK", "ANDROID_BINARY_STARLARK_SPLIT_TRANSITION_ROLLOUT")
load("//rules/acls:android_binary_with_sandboxed_sdks_allowlist.bzl", "ANDROID_BINARY_WITH_SANDBOXED_SDKS_ALLOWLIST")
load("//rules/acls:android_build_stamping_rollout.bzl", "ANDROID_BUILD_STAMPING_FALLBACK", "ANDROID_BUILD_STAMPING_ROLLOUT")
load("//rules/acls:android_device_plugin_rollout.bzl", "ANDROID_DEVICE_PLUGIN_FALLBACK", "ANDROID_DEVICE_PLUGIN_ROLLOUT")
load("//rules/acls:android_feature_splits_dogfood.bzl", "ANDROID_FEATURE_SPLITS_DOGFOOD")
load("//rules/acls:android_instrumentation_test_manifest_check_rollout.bzl", "ANDROID_INSTRUMENTATION_TEST_MANIFEST_CHECK_FALLBACK", "ANDROID_INSTRUMENTATION_TEST_MANIFEST_CHECK_ROLLOUT")
load("//rules/acls:android_instrumentation_test_prebuilt_test_apk.bzl", "ANDROID_INSTRUMENTATION_TEST_PREBUILT_TEST_APK_FALLBACK", "ANDROID_INSTRUMENTATION_TEST_PREBUILT_TEST_APK_ROLLOUT")
Expand All @@ -59,7 +57,6 @@ load("//rules/acls:android_lint_rollout.bzl", "ANDROID_LINT_FALLBACK", "ANDROID_
load("//rules/acls:android_local_test_jdk_sts_rollout.bzl", "ANDROID_LOCAL_TEST_JDK_STS_FALLBACK", "ANDROID_LOCAL_TEST_JDK_STS_ROLLOUT")
load("//rules/acls:android_multidex_native_min_sdk_allowlist.bzl", "ANDROID_MULTIDEX_NATIVE_MIN_SDK_ALLOWLIST")
load("//rules/acls:android_test_lockdown.bzl", "ANDROID_TEST_LOCKDOWN_GENERATOR_FUNCTIONS", "ANDROID_TEST_LOCKDOWN_TARGETS")
load("//rules/acls:b122039567.bzl", "B122039567")
load("//rules/acls:baseline_profiles_optimizer_integration.bzl", "BASELINE_PROFILES_OPTIMIZER_INTEGRATION")
load("//rules/acls:baseline_profiles_rollout.bzl", "BASELINE_PROFILES_ROLLOUT")
load("//rules/acls:databinding.bzl", "DATABINDING_ALLOWED", "DATABINDING_DISALLOWED")
Expand Down Expand Up @@ -106,15 +103,9 @@ def _in_android_archive_dogfood(fqn):
def _in_android_archive_excluded_deps_denylist(fqn):
return matches(fqn, ANDROID_ARCHIVE_EXCLUDED_DEPS_DENYLIST_DICT)

def _in_android_device_plugin_rollout(fqn):
return not matches(fqn, ANDROID_DEVICE_PLUGIN_FALLBACK_DICT) and matches(fqn, ANDROID_DEVICE_PLUGIN_ROLLOUT_DICT)

def _in_android_binary_starlark_javac(fqn):
return not matches(fqn, ANDROID_BINARY_STARLARK_JAVAC_FALLBACK_DICT) and matches(fqn, ANDROID_BINARY_STARLARK_JAVAC_ROLLOUT_DICT)

def _in_android_binary_starlark_split_transition(fqn):
return not matches(fqn, ANDROID_BINARY_STARLARK_SPLIT_TRANSITION_FALLBACK_DICT) and matches(fqn, ANDROID_BINARY_STARLARK_SPLIT_TRANSITION_ROLLOUT_DICT)

def _in_android_binary_with_sandboxed_sdks_allowlist(fqn):
return matches(fqn, ANDROID_BINARY_WITH_SANDBOXED_SDKS_ALLOWLIST_DICT)

Expand All @@ -138,9 +129,6 @@ def _in_android_test_lockdown_allowlist(fqn, generator):
return matches(fqn, ANDROID_TEST_LOCKDOWN_TARGETS)
return generator in ANDROID_TEST_LOCKDOWN_GENERATOR_FUNCTIONS_DICT

def _in_b122039567(fqn):
return matches(fqn, B122039567_DICT)

def _in_android_library_resources_without_srcs(fqn):
return matches(fqn, ANDROID_LIBRARY_RESOURCES_WITHOUT_SRCS_DICT)

Expand Down Expand Up @@ -247,12 +235,8 @@ AAR_PROPAGATE_RESOURCES_ROLLOUT_DICT = make_dict(AAR_PROPAGATE_RESOURCES_ROLLOUT
ANDROID_APPLICATION_WITH_SANDBOXED_SDKS_ALLOWLIST_DICT = make_dict(ANDROID_APPLICATION_WITH_SANDBOXED_SDKS_ALLOWLIST)
ANDROID_ARCHIVE_DOGFOOD_DICT = make_dict(ANDROID_ARCHIVE_DOGFOOD)
ANDROID_ARCHIVE_EXCLUDED_DEPS_DENYLIST_DICT = make_dict(ANDROID_ARCHIVE_EXCLUDED_DEPS_DENYLIST)
ANDROID_DEVICE_PLUGIN_ROLLOUT_DICT = make_dict(ANDROID_DEVICE_PLUGIN_ROLLOUT)
ANDROID_DEVICE_PLUGIN_FALLBACK_DICT = make_dict(ANDROID_DEVICE_PLUGIN_FALLBACK)
ANDROID_BINARY_STARLARK_JAVAC_ROLLOUT_DICT = make_dict(ANDROID_BINARY_STARLARK_JAVAC_ROLLOUT)
ANDROID_BINARY_STARLARK_JAVAC_FALLBACK_DICT = make_dict(ANDROID_BINARY_STARLARK_JAVAC_FALLBACK)
ANDROID_BINARY_STARLARK_SPLIT_TRANSITION_ROLLOUT_DICT = make_dict(ANDROID_BINARY_STARLARK_SPLIT_TRANSITION_ROLLOUT)
ANDROID_BINARY_STARLARK_SPLIT_TRANSITION_FALLBACK_DICT = make_dict(ANDROID_BINARY_STARLARK_SPLIT_TRANSITION_FALLBACK)
ANDROID_BINARY_WITH_SANDBOXED_SDKS_ALLOWLIST_DICT = make_dict(ANDROID_BINARY_WITH_SANDBOXED_SDKS_ALLOWLIST)
ANDROID_FEATURE_SPLITS_DOGFOOD_DICT = make_dict(ANDROID_FEATURE_SPLITS_DOGFOOD)
ANDROID_LIBRARY_RESOURCES_WITHOUT_SRCS_DICT = make_dict(ANDROID_LIBRARY_RESOURCES_WITHOUT_SRCS)
Expand All @@ -270,7 +254,6 @@ ANDROID_BUILD_STAMPING_ROLLOUT_DICT = make_dict(ANDROID_BUILD_STAMPING_ROLLOUT)
ANDROID_BUILD_STAMPING_FALLBACK_DICT = make_dict(ANDROID_BUILD_STAMPING_FALLBACK)
ANDROID_TEST_LOCKDOWN_GENERATOR_FUNCTIONS_DICT = make_dict(ANDROID_TEST_LOCKDOWN_GENERATOR_FUNCTIONS)
ANDROID_TEST_LOCKDOWN_TARGETS_DICT = make_dict(ANDROID_TEST_LOCKDOWN_TARGETS)
B122039567_DICT = make_dict(B122039567)
CAN_USE_DEX2OAT_OPTIONS_DICT = make_dict(CAN_USE_DEX2OAT_OPTIONS)
FIX_EXPORT_EXPORTING_FALLBACK_DICT = make_dict(FIX_EXPORT_EXPORTING_FALLBACK)
FIX_EXPORT_EXPORTING_ROLLOUT_DICT = make_dict(FIX_EXPORT_EXPORTING_ROLLOUT)
Expand Down Expand Up @@ -359,13 +342,10 @@ acls = struct(
in_aar_import_explicit_exports_manifest = _in_aar_import_explicit_exports_manifest,
in_aar_import_exports_r_java = _in_aar_import_exports_r_java,
in_aar_propagate_resources = _in_aar_propagate_resources,
in_b122039567 = _in_b122039567,
in_android_application_with_sandboxed_sdks_allowlist_dict = _in_android_application_with_sandboxed_sdks_allowlist_dict,
in_android_archive_dogfood = _in_android_archive_dogfood,
in_android_archive_excluded_deps_denylist = _in_android_archive_excluded_deps_denylist,
in_android_device_plugin_rollout = _in_android_device_plugin_rollout,
in_android_binary_starlark_javac = _in_android_binary_starlark_javac,
in_android_binary_starlark_split_transition = _in_android_binary_starlark_split_transition,
in_android_binary_with_sandboxed_sdks_allowlist = _in_android_binary_with_sandboxed_sdks_allowlist,
in_android_feature_splits_dogfood = _in_android_feature_splits_dogfood,
in_android_library_starlark_resource_outputs_rollout = _in_android_library_starlark_resource_outputs_rollout,
Expand Down
9 changes: 4 additions & 5 deletions rules/android_binary_internal/impl.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,10 @@ def _validate_manifest(ctx, packaged_resources_ctx, **unused_ctxs):

def _process_native_libs(ctx, **_unusued_ctxs):
providers = []
if acls.in_android_binary_starlark_split_transition(str(ctx.label)):
providers.append(_process_native_deps(
ctx,
filename = "nativedeps",
))
providers.append(_process_native_deps(
ctx,
filename = "nativedeps",
))
return ProviderInfo(
name = "native_libs_ctx",
value = struct(providers = providers),
Expand Down
18 changes: 0 additions & 18 deletions test/rules/android_local_test/java/com/starlark_resources/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,6 @@ android_local_test(
],
)

android_local_test(
name = "environment",
srcs = ["SampleTestWithEnvSetting.java"],
data = ["env_location_data.txt"],
env = {
"android_local_test_test_env": "peekaboo",
"android_local_test_loc_env": "$(location :env_location_data.txt)",
},
manifest = "AndroidManifest.xml",
test_class = "com.starlark_resources.SampleTestWithEnvSetting",
deps = [
"//java/com/google/thirdparty/robolectric",
"//third_party/java/hamcrest:android",
"//third_party/java/robolectric",
"@rules_android_maven//:junit_junit",
],
)

rule_test(
name = "no_deps_with_resources_rule_test",
target_under_test = ":no_deps_with_resources",
Expand Down