1# Copyright 2022 Google LLC. All rights reserved. 2# 3# Licensed under the Apache License, Version 2.0 (the License); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15"""Stubs""" 16 17load("//:visibility.bzl", "RULES_KOTLIN") 18 19visibility(RULES_KOTLIN) 20 21def _empty_fn(*_args, **_kwargs): 22 pass 23 24register_extension_info = _empty_fn 25 26is_forbidden_dep = _empty_fn 27 28is_exempt_dep = _empty_fn 29 30is_android_lint_exempt = _empty_fn 31 32DEFAULT_BUILTIN_PROCESSORS = [ 33 "com.google.android.apps.play.store.plugins.injectionentrypoint.InjectionEntryPointProcessor", 34 "com.google.android.apps.play.store.plugins.interfaceaggregator.InterfaceAggregationProcessor", 35 "com.google.auto.factory.processor.AutoFactoryProcessor", 36 "dagger.android.processor.AndroidProcessor", 37 "dagger.internal.codegen.ComponentProcessor", 38] 39 40BASE_JVMOPTS = [] 41 42def select_java_language_level(**_kwargs): 43 return "11" 44 45registry_checks_for_package = _empty_fn 46 47LINT_REGISTRY = None # Only ever passed to registry_checks_for_package 48 49def _run_lint_on_library(ctx, output, *_args, **_kwargs): 50 ctx.actions.write(output, "Android Lint Disabled") 51 return output 52 53_AndroidLintRulesetInfo = provider() 54 55lint_actions = struct( 56 AndroidLintRulesetInfo = _AndroidLintRulesetInfo, 57 run_lint_on_library = _run_lint_on_library, 58 get_android_lint_baseline_file = _empty_fn, 59) 60 61def check_compiler_opt_allowlist(_label): 62 pass 63 64def jspecify_flags(_ctx): 65 # Trust JSpecify nullness annotations 66 # (see https://kotlinlang.org/docs/whatsnew1520.html#support-for-jspecify-nullness-annotations) 67 return ["-Xjspecify-annotations=strict"] 68 69integration_test_filegroup = _empty_fn 70