• 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
15load("//kotlin:rules.bzl", "kt_jvm_library")
16
17licenses(["notice"])
18
19package(default_testonly = 1)
20
21java_test(
22    name = "ijar",
23    main_class = "ijar.MainKt",
24    runtime_deps = [":main"],
25)
26
27java_test(
28    name = "suspense",
29    test_class = "ijar.SuspendTest",
30    runtime_deps = [":SuspendTest"],
31)
32
33kt_jvm_library(
34    name = "inline",
35    srcs = [
36        "InlineCapture.kt",
37        "InlineInnerClass.kt",
38        "ReifiedInline.kt",
39    ],
40)
41
42# Compiling this file by itself triggers synthetic methods needed when compiling
43# dependants.  These methods carry annotations.
44kt_jvm_library(
45    name = "statics",
46    srcs = ["JvmStatics.kt"],
47)
48
49kt_jvm_library(
50    name = "main",
51    srcs = ["Main.kt"],
52    deps = [
53        ":inline",
54        ":statics",
55    ],
56)
57
58kt_jvm_library(
59    name = "inlined_suspense",
60    srcs = ["DoubleInline.kt"],
61)
62
63kt_jvm_library(
64    name = "SuspendTest",
65    srcs = ["SuspendTest.kt"],
66    deps = [
67        ":inlined_suspense",
68        "@maven//:com_google_truth_truth",
69        "@maven//:junit_junit",
70    ],
71)
72
73java_library(
74    name = "SamInJava",
75    srcs = ["SamInJava.java"],
76)
77
78kt_jvm_library(
79    name = "SamExt",
80    srcs = ["SamExt.kt"],
81    deps = [
82        ":SamInJava",
83    ],
84)
85
86kt_jvm_library(
87    name = "SamExtUser",
88    srcs = ["SamExtUser.kt"],
89    deps = [
90        ":SamExt",
91        ":SamInJava",
92    ],
93)
94
95java_test(
96    name = "inlinedSamExt",
97    main_class = "ijar.SamExtUserKt",
98    runtime_deps = [
99        ":SamExtUser",
100    ],
101)
102
103kt_jvm_library(
104    name = "InlineWhenMapping",
105    srcs = ["InlineWhenMapping.kt"],
106)
107
108kt_jvm_library(
109    name = "InlineWhenMappingUser",
110    srcs = ["InlineWhenMappingUser.kt"],
111    deps = [":InlineWhenMapping"],
112)
113
114java_test(
115    name = "inlineWhenMapping",
116    main_class = "ijar.InlineWhenMappingUserKt",
117    runtime_deps = [
118        ":InlineWhenMappingUser",
119    ],
120)
121