• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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"""Rules for test."""
16
17load("//kotlin:jvm_library.bzl", "kt_jvm_library")
18load("//tests/analysis:util.bzl", "ONLY_FOR_ANALYSIS_TEST_TAGS")
19load("//:visibility.bzl", "RULES_KOTLIN")
20
21def _kt_jvm_library_for_test(name, **kwargs):
22    kt_jvm_library(
23        name = name,
24        tags = ONLY_FOR_ANALYSIS_TEST_TAGS,
25        **kwargs
26    )
27    return name
28
29def _java_library_for_test(name, **kwargs):
30    native.java_library(
31        name = name,
32        tags = ONLY_FOR_ANALYSIS_TEST_TAGS,
33        **kwargs
34    )
35    return name
36
37rules_for_test = struct(
38    kt_jvm_library = _kt_jvm_library_for_test,
39    java_library = _java_library_for_test,
40)
41