Skip to content

Commit 540893a

Browse files
authored
Add bzl_library targets to released artifacts (bazelbuild#1093)
This doesn't include android related .bzl files because rules_android doesn't provide bzl_library targets. Closes bazelbuild#572
1 parent 2a67a50 commit 540893a

12 files changed

+173
-0
lines changed

kotlin/BUILD.release.bazel

+17
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,20 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
15+
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
16+
17+
bzl_library(
18+
name = "kotlin",
19+
srcs = glob(
20+
["*.bzl"],
21+
exclude = [
22+
"android.bzl",
23+
"kotlin.bzl",
24+
],
25+
),
26+
visibility = ["//visibility:public"],
27+
deps = [
28+
"//kotlin/internal",
29+
],
30+
)

kotlin/compiler/BUILD.release.bazel

+10
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
15+
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
1416
load(":compiler.bzl", "kt_configure_compiler")
1517
load(":ksp.bzl", "kt_configure_ksp")
1618

@@ -21,3 +23,11 @@ kt_configure_compiler()
2123

2224
# Configures the KSP plugins
2325
kt_configure_ksp()
26+
27+
bzl_library(
28+
name = "compiler",
29+
srcs = glob(["*.bzl"]),
30+
deps = [
31+
"@rules_proto//proto:repositories",
32+
],
33+
)

kotlin/internal/BUILD.release.bazel

+14
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
1516
load("//kotlin/internal:toolchains.bzl", "kt_configure_toolchains")
1617

1718
kt_configure_toolchains()
19+
20+
bzl_library(
21+
name = "internal",
22+
srcs = glob(["*.bzl"]),
23+
visibility = ["//visibility:public"],
24+
deps = [
25+
"//kotlin/internal/js",
26+
"//kotlin/internal/jvm",
27+
"//kotlin/internal/lint",
28+
"//kotlin/internal/utils",
29+
"//src/main/starlark",
30+
],
31+
)

kotlin/internal/js/BUILD.release.bazel

+7
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,17 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
1516
load("@rules_python//python:defs.bzl", "py_binary")
1617

1718
py_binary(
1819
name = "importer",
1920
srcs = ["importer.py"],
2021
visibility = ["//visibility:public"],
2122
)
23+
24+
bzl_library(
25+
name = "js",
26+
srcs = glob(["*.bzl"]),
27+
visibility = ["//visibility:public"],
28+
)

kotlin/internal/jvm/BUILD.release.bazel

+15
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,19 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
16+
1517
exports_files(["jetbrains-deshade.jarjar"])
18+
19+
bzl_library(
20+
name = "jvm",
21+
srcs = glob(
22+
["*.bzl"],
23+
exclude = ["android.bzl"],
24+
),
25+
visibility = ["//visibility:public"],
26+
deps = [
27+
"//third_party:bzl",
28+
"@bazel_skylib//rules:common_settings",
29+
],
30+
)

kotlin/internal/lint/BUILD.release.bazel

+8
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,11 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
15+
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
16+
17+
bzl_library(
18+
name = "lint",
19+
srcs = glob(["*.bzl"]),
20+
visibility = ["//visibility:public"],
21+
)

kotlin/internal/utils/BUILD.release.bazel

+8
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,11 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
15+
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
16+
17+
bzl_library(
18+
name = "utils",
19+
srcs = glob(["*.bzl"]),
20+
visibility = ["//visibility:public"],
21+
)

src/main/starlark/BUILD.release.bazel

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright 2020 The Bazel Authors. 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+
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
16+
17+
bzl_library(
18+
name = "starlark",
19+
srcs = glob(["*.bzl"]),
20+
visibility = ["//visibility:public"],
21+
deps = [
22+
"//src/main/starlark/core",
23+
],
24+
)
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright 2020 The Bazel Authors. 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+
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
16+
17+
bzl_library(
18+
name = "core",
19+
srcs = glob(["*.bzl"]),
20+
visibility = ["//visibility:public"],
21+
deps = [
22+
"//src/main/starlark/core/options",
23+
"//src/main/starlark/core/repositories",
24+
],
25+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright 2020 The Bazel Authors. 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+
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
16+
17+
bzl_library(
18+
name = "options",
19+
srcs = glob(["*.bzl"]),
20+
visibility = ["//visibility:public"],
21+
deps = [
22+
"@com_github_jetbrains_kotlin//:capabilities.bzl",
23+
],
24+
)

src/main/starlark/core/repositories/BUILD.release.bazel

+11
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,14 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
15+
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
16+
17+
bzl_library(
18+
name = "repositories",
19+
srcs = glob(["*.bzl"]),
20+
visibility = ["//visibility:public"],
21+
deps = [
22+
"@rules_proto//proto:repositories",
23+
],
24+
)

third_party/BUILD.release.bazel

+10
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
1516
load("@rules_java//java:defs.bzl", "java_binary", "java_import")
1617

1718
exports_files([
@@ -32,3 +33,12 @@ java_import(
3233
neverlink = True,
3334
visibility = ["//visibility:public"],
3435
)
36+
37+
bzl_library(
38+
name = "bzl",
39+
srcs = [
40+
"jarjar.bzl",
41+
"@bazel_tools//tools:bzl_srcs",
42+
],
43+
visibility = ["//visibility:public"],
44+
)

0 commit comments

Comments
 (0)