From 4ad88199dc86b0faf60cee24d39f792e9c992a09 Mon Sep 17 00:00:00 2001 From: Ben Lee Date: Tue, 16 Jul 2024 20:54:40 -0700 Subject: [PATCH] Support testing with coverage in dev mode --- src/main/kotlin/bootstrap.bzl | 4 ++-- src/main/kotlin/io/bazel/kotlin/builder/cmd/BUILD.bazel | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/bootstrap.bzl b/src/main/kotlin/bootstrap.bzl index 1ee84dc34..8dbe61f00 100644 --- a/src/main/kotlin/bootstrap.bzl +++ b/src/main/kotlin/bootstrap.bzl @@ -57,7 +57,7 @@ def kt_bootstrap_library(name, deps = [], neverlink_deps = [], srcs = [], visibi def kt_bootstrap_binary( name, main_class, - runtime_library, + runtime_deps, shade_rules, jvm_flags = [], data = [], @@ -68,7 +68,7 @@ def kt_bootstrap_binary( java_binary( name = raw, create_executable = False, - runtime_deps = [runtime_library], + runtime_deps = runtime_deps, ) # Shaded to ensure that libraries it uses are not leaked to diff --git a/src/main/kotlin/io/bazel/kotlin/builder/cmd/BUILD.bazel b/src/main/kotlin/io/bazel/kotlin/builder/cmd/BUILD.bazel index 5be5d51a6..06363c3b8 100644 --- a/src/main/kotlin/io/bazel/kotlin/builder/cmd/BUILD.bazel +++ b/src/main/kotlin/io/bazel/kotlin/builder/cmd/BUILD.bazel @@ -39,9 +39,12 @@ kt_bootstrap_binary( "-XX:-MaxFDLimit", ], main_class = "io.bazel.kotlin.builder.cmd.Build", - runtime_library = ":build_lib", shade_rules = "//src/main/kotlin:shade.jarjar", visibility = ["//src:__subpackages__"], + runtime_deps = [ + ":build_lib", + "@bazel_tools//tools/jdk:JacocoCoverage", + ], ) kt_bootstrap_library( @@ -60,7 +63,7 @@ kt_bootstrap_binary( name = "merge_jdeps", data = [], main_class = "io.bazel.kotlin.builder.cmd.MergeJdeps", - runtime_library = ":merge_jdeps_lib", shade_rules = "//src/main/kotlin:shade.jarjar", visibility = ["//src:__subpackages__"], + runtime_deps = [":merge_jdeps_lib"], )