xref: /aosp_15_r20/external/bazelbuild-kotlin-rules/bazel/kotlinc.BUILD (revision 3a22c0a33dd99bcca39a024d43e6fbcc55c2806e)
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
15package(default_visibility = ["//visibility:public"])
16
17java_import(
18    name = "annotations",
19    jars = ["lib/annotations-13.0.jar"],
20)
21
22java_import(
23    name = "jvm_abi_gen_plugin",
24    jars = ["lib/jvm-abi-gen.jar"],
25)
26
27java_import(
28    name = "kotlin_annotation_processing",
29    jars = ["lib/kotlin-annotation-processing.jar"],
30)
31
32sh_binary(
33    name = "kotlin_compiler",
34    srcs = ["bin/kotlinc"],
35    data = glob(["lib/**"]),
36)
37
38# java_binary(
39#     name = "kotlin_compiler",
40#     main_class = "org.jetbrains.kotlin.cli.jvm.K2JVMCompiler",
41#     runtime_deps = [":kotlin_compiler_lib"],
42# )
43
44# java_import(
45#     name = "kotlin_compiler_lib",
46#     jars = ["lib/kotlin-compiler.jar"]
47#     srcjar = "lib/kotlin-compiler-sources.jar",
48# )
49
50java_import(
51    name = "kotlin_reflect",
52    jars = ["lib/kotlin-reflect.jar"],
53    srcjar = "lib/kotlin-reflect-sources.jar",
54)
55
56java_import(
57    name = "kotlin_stdlib",
58    jars = ["lib/kotlin-stdlib.jar"],
59    srcjar = "lib/kotlin-stdlib-sources.jar",
60)
61
62java_import(
63    name = "kotlin_stdlib_jdk7",
64    jars = ["lib/kotlin-stdlib-jdk7.jar"],
65    srcjar = "lib/kotlin-stdlib-jdk7-sources.jar",
66)
67
68java_import(
69    name = "kotlin_stdlib_jdk8",
70    jars = ["lib/kotlin-stdlib-jdk8.jar"],
71    srcjar = "lib/kotlin-stdlib-jdk8-sources.jar",
72)
73
74java_import(
75    name = "kotlin_test",
76    jars = ["lib/kotlin-test.jar"],
77    srcjar = "lib/kotlin-test-sources.jar",
78)
79
80alias(
81    name = "kotlin_test_not_testonly",
82    actual = ":kotlin_test",
83)
84