Skip to content

Commit

Permalink
Merge branch 'master' into Bencodes-patch-5
Browse files Browse the repository at this point in the history
  • Loading branch information
Bencodes authored Jul 12, 2024
2 parents 8e57bbe + 38f9c0f commit 533f441
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
validate_config: 1
bazel: 7.2.1
bazel: 880c17c67a9b4e17e9753a5c6e2a759bff5a2cfe
buildifier:
version: 7.1.1
# no lint warnings for the moment. They are basically a smoke alarm in hell.
Expand Down
4 changes: 2 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ module(
repo_name = "rules_kotlin",
)

bazel_dep(name = "platforms", version = "0.0.6")
bazel_dep(name = "bazel_skylib", version = "1.6.1")
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_java", version = "7.2.0")
bazel_dep(name = "rules_python", version = "0.23.1")
bazel_dep(name = "rules_cc", version = "0.0.8")
Expand Down
4 changes: 2 additions & 2 deletions MODULE.release.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ module(
repo_name = "rules_kotlin",
)

bazel_dep(name = "platforms", version = "0.0.6")
bazel_dep(name = "bazel_skylib", version = "1.6.1")
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_java", version = "7.2.0")
bazel_dep(name = "rules_python", version = "0.23.1")
bazel_dep(name = "rules_cc", version = "0.0.8")
Expand Down
1 change: 1 addition & 0 deletions kotlin/internal/jvm/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ bzl_library(
deps = [
"//third_party:bzl",
"@bazel_skylib//rules:common_settings",
"@rules_java//java:rules",
],
)
16 changes: 11 additions & 5 deletions kotlin/internal/jvm/compile.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,15 @@
# 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_tools//tools/jdk:toolchain_utils.bzl",
"find_java_runtime_toolchain",
"find_java_toolchain",
)
load(
"@rules_java//java:defs.bzl",
"JavaInfo",
"java_common",
)
load(
"//kotlin/internal:defs.bzl",
_JAVA_RUNTIME_TOOLCHAIN_TYPE = "JAVA_RUNTIME_TOOLCHAIN_TYPE",
_JAVA_TOOLCHAIN_TYPE = "JAVA_TOOLCHAIN_TYPE",
_KtCompilerPluginInfo = "KtCompilerPluginInfo",
_KtJvmInfo = "KtJvmInfo",
_KtPluginConfiguration = "KtPluginConfiguration",
Expand Down Expand Up @@ -54,6 +51,15 @@ load(
)

# UTILITY ##############################################################################################################
def find_java_toolchain(ctx, target):
if _JAVA_TOOLCHAIN_TYPE in ctx.toolchains:
return ctx.toolchains[_JAVA_TOOLCHAIN_TYPE].java
return target[java_common.JavaToolchainInfo]

def find_java_runtime_toolchain(ctx, target):
if _JAVA_RUNTIME_TOOLCHAIN_TYPE in ctx.toolchains:
return ctx.toolchains[_JAVA_RUNTIME_TOOLCHAIN_TYPE].java_runtime
return target[java_common.JavaRuntimeInfo]

def _java_info(target):
return target[JavaInfo] if JavaInfo in target else None
Expand Down
4 changes: 2 additions & 2 deletions src/main/starlark/core/repositories/versions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ versions = struct(
# 1. Download archive
# 2. Download dependencies and Configure rules
# --> 3. Configure dependencies <--
SKYLIB_VERSION = "1.6.1",
SKYLIB_SHA = "9f38886a40548c6e96c106b752f242130ee11aaa068a56ba7e56f4511f33e4f2",
SKYLIB_VERSION = "1.7.1",
SKYLIB_SHA = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f",
PROTOBUF_VERSION = "3.11.3",
PROTOBUF_SHA = "cf754718b0aa945b00550ed7962ddc167167bd922b842199eeb6505e6f344852",
RULES_JVM_EXTERNAL_TAG = "5.3",
Expand Down

0 comments on commit 533f441

Please sign in to comment.