Skip to content

Commit

Permalink
Add bzl_library targets to released artifacts (#1093)
Browse files Browse the repository at this point in the history
This doesn't include android related .bzl files because rules_android doesn't provide bzl_library targets.

Closes #572
  • Loading branch information
stevebarrau committed Jan 26, 2024
1 parent 2a67a50 commit 540893a
Show file tree
Hide file tree
Showing 12 changed files with 173 additions and 0 deletions.
17 changes: 17 additions & 0 deletions kotlin/BUILD.release.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,20 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

bzl_library(
name = "kotlin",
srcs = glob(
["*.bzl"],
exclude = [
"android.bzl",
"kotlin.bzl",
],
),
visibility = ["//visibility:public"],
deps = [
"//kotlin/internal",
],
)
10 changes: 10 additions & 0 deletions kotlin/compiler/BUILD.release.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load(":compiler.bzl", "kt_configure_compiler")
load(":ksp.bzl", "kt_configure_ksp")

Expand All @@ -21,3 +23,11 @@ kt_configure_compiler()

# Configures the KSP plugins
kt_configure_ksp()

bzl_library(
name = "compiler",
srcs = glob(["*.bzl"]),
deps = [
"@rules_proto//proto:repositories",
],
)
14 changes: 14 additions & 0 deletions kotlin/internal/BUILD.release.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

kt_configure_toolchains()

bzl_library(
name = "internal",
srcs = glob(["*.bzl"]),
visibility = ["//visibility:public"],
deps = [
"//kotlin/internal/js",
"//kotlin/internal/jvm",
"//kotlin/internal/lint",
"//kotlin/internal/utils",
"//src/main/starlark",
],
)
7 changes: 7 additions & 0 deletions kotlin/internal/js/BUILD.release.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

py_binary(
name = "importer",
srcs = ["importer.py"],
visibility = ["//visibility:public"],
)

bzl_library(
name = "js",
srcs = glob(["*.bzl"]),
visibility = ["//visibility:public"],
)
15 changes: 15 additions & 0 deletions kotlin/internal/jvm/BUILD.release.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

exports_files(["jetbrains-deshade.jarjar"])

bzl_library(
name = "jvm",
srcs = glob(
["*.bzl"],
exclude = ["android.bzl"],
),
visibility = ["//visibility:public"],
deps = [
"//third_party:bzl",
"@bazel_skylib//rules:common_settings",
],
)
8 changes: 8 additions & 0 deletions kotlin/internal/lint/BUILD.release.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

bzl_library(
name = "lint",
srcs = glob(["*.bzl"]),
visibility = ["//visibility:public"],
)
8 changes: 8 additions & 0 deletions kotlin/internal/utils/BUILD.release.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

bzl_library(
name = "utils",
srcs = glob(["*.bzl"]),
visibility = ["//visibility:public"],
)
24 changes: 24 additions & 0 deletions src/main/starlark/BUILD.release.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2020 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

bzl_library(
name = "starlark",
srcs = glob(["*.bzl"]),
visibility = ["//visibility:public"],
deps = [
"//src/main/starlark/core",
],
)
25 changes: 25 additions & 0 deletions src/main/starlark/core/BUILD.release.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2020 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

bzl_library(
name = "core",
srcs = glob(["*.bzl"]),
visibility = ["//visibility:public"],
deps = [
"//src/main/starlark/core/options",
"//src/main/starlark/core/repositories",
],
)
24 changes: 24 additions & 0 deletions src/main/starlark/core/options/BUILD.release.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2020 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

bzl_library(
name = "options",
srcs = glob(["*.bzl"]),
visibility = ["//visibility:public"],
deps = [
"@com_github_jetbrains_kotlin//:capabilities.bzl",
],
)
11 changes: 11 additions & 0 deletions src/main/starlark/core/repositories/BUILD.release.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,14 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

bzl_library(
name = "repositories",
srcs = glob(["*.bzl"]),
visibility = ["//visibility:public"],
deps = [
"@rules_proto//proto:repositories",
],
)
10 changes: 10 additions & 0 deletions third_party/BUILD.release.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

exports_files([
Expand All @@ -32,3 +33,12 @@ java_import(
neverlink = True,
visibility = ["//visibility:public"],
)

bzl_library(
name = "bzl",
srcs = [
"jarjar.bzl",
"@bazel_tools//tools:bzl_srcs",
],
visibility = ["//visibility:public"],
)

0 comments on commit 540893a

Please sign in to comment.