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