fix ij plugin dep pickup
diff --git a/.bazelproject b/.bazelproject
index 3c59298..0d257c3 100644
--- a/.bazelproject
+++ b/.bazelproject
@@ -20,9 +20,9 @@
-//docs/...
//:all_local_tests
//examples/...
- # These targets are built for the ide only. Primary purpose is to ensure the builder can build the targets, but it's a
+ # These targets are built for the ide only. Primary purpose is to ensure the builder can build the targets, but it's
# also a good way of testing the intellij plugin.
- //kotlin/builder/src/io/bazel/kotlin/builder:builder_for_ide
+ //kotlin/builder:builder_lib_for_ide
//kotlin/builder:compiler_lib_for_ide
test_sources:
diff --git a/kotlin/builder/BUILD b/kotlin/builder/BUILD
index b11de2a..6114a98 100644
--- a/kotlin/builder/BUILD
+++ b/kotlin/builder/BUILD
@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
load("//kotlin/builder:bootstrap.bzl", "kt_bootstrap_library")
+load("//kotlin:kotlin.bzl", "kt_jvm_library")
# The compiler library, this is co-located in the kotlin compiler classloader.
kt_bootstrap_library(
@@ -24,13 +25,37 @@
],
)
+kt_bootstrap_library(
+ name = "builder_lib",
+ srcs = glob(["src/io/bazel/kotlin/builder/**/*.kt"]),
+ runtime_deps = [
+ "@com_github_jetbrains_kotlin//:kotlin-reflect",
+ "@com_github_jetbrains_kotlin//:kotlin-stdlib-jdk7",
+ "@com_github_jetbrains_kotlin//:kotlin-stdlib-jdk8",
+ "@io_bazel_rules_kotlin_aopalliance_aopalliance//jar",
+ "@io_bazel_rules_kotlin_com_google_code_gson_gson//jar",
+ ],
+ deps = [
+ "@io_bazel_rules_kotlin_com_google_guava_guava//jar",
+ "@com_github_jetbrains_kotlin//:kotlin-stdlib",
+ "@com_github_jetbrains_kotlin//:kotlin-preloader",
+ "@io_bazel_rules_kotlin//kotlin/builder/proto:kotlin_model",
+ "@io_bazel_rules_kotlin//kotlin/builder/proto:deps",
+ "@io_bazel_rules_kotlin//kotlin/builder/proto:worker",
+ "@io_bazel_rules_kotlin_com_google_inject_guice//jar",
+ "@io_bazel_rules_kotlin_com_google_protobuf_protobuf_java//jar",
+ "@io_bazel_rules_kotlin_com_google_protobuf_protobuf_java_util//jar",
+ "@io_bazel_rules_kotlin_javax_inject_javax_inject//jar",
+ ],
+)
+
# The builder artifact.
java_binary(
name = "builder",
data = [":compiler_lib.jar"],
main_class = "io.bazel.kotlin.builder.KotlinBuilder",
visibility = ["//visibility:public"],
- runtime_deps = ["//kotlin/builder/src/io/bazel/kotlin/builder"],
+ runtime_deps = [":builder_lib"],
)
filegroup(
@@ -54,7 +79,7 @@
testonly = 1,
data = [":data_for_tests"],
exports = [
- "//kotlin/builder/src/io/bazel/kotlin/builder",
+ ":builder_lib",
"//third_party/jvm/com/google/truth",
"//third_party/jvm/junit",
"@io_bazel_rules_kotlin//kotlin/builder/proto:deps",
diff --git a/kotlin/builder/bootstrap.bzl b/kotlin/builder/bootstrap.bzl
index 67f8c21..ebfeeaa 100644
--- a/kotlin/builder/bootstrap.bzl
+++ b/kotlin/builder/bootstrap.bzl
@@ -43,6 +43,7 @@
native.filegroup(
name = dep_label,
srcs = deps + neverlink_deps,
+ tags = ["no-ide"],
visibility=["//visibility:private"]
)
command="""
@@ -84,6 +85,7 @@
native.java_import(
name = name,
jars = [jar_label],
+ tags = ["no-ide"],
runtime_deps=deps + runtime_deps,
visibility=["//visibility:public"]
)
diff --git a/kotlin/builder/src/io/bazel/kotlin/builder/BUILD b/kotlin/builder/src/io/bazel/kotlin/builder/BUILD
deleted file mode 100644
index e13c047..0000000
--- a/kotlin/builder/src/io/bazel/kotlin/builder/BUILD
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 2018 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("//kotlin/builder:bootstrap.bzl", "kt_bootstrap_library")
-
-kt_bootstrap_library(
- name = "builder",
- srcs = glob(["**/*.kt"]),
- runtime_deps = [
- "@com_github_jetbrains_kotlin//:kotlin-reflect",
- "@com_github_jetbrains_kotlin//:kotlin-stdlib-jdk7",
- "@com_github_jetbrains_kotlin//:kotlin-stdlib-jdk8",
- "@io_bazel_rules_kotlin_aopalliance_aopalliance//jar",
- "@io_bazel_rules_kotlin_com_google_code_gson_gson//jar",
- ],
- deps = [
- "@io_bazel_rules_kotlin_com_google_guava_guava//jar",
- "@com_github_jetbrains_kotlin//:kotlin-stdlib",
- "@com_github_jetbrains_kotlin//:kotlin-preloader",
- "@io_bazel_rules_kotlin//kotlin/builder/proto:kotlin_model",
- "@io_bazel_rules_kotlin//kotlin/builder/proto:deps",
- "@io_bazel_rules_kotlin//kotlin/builder/proto:worker",
- "@io_bazel_rules_kotlin_com_google_inject_guice//jar",
- "@io_bazel_rules_kotlin_com_google_protobuf_protobuf_java//jar",
- "@io_bazel_rules_kotlin_com_google_protobuf_protobuf_java_util//jar",
- "@io_bazel_rules_kotlin_javax_inject_javax_inject//jar",
- ],
-)
diff --git a/kotlin/builder/unittests/BUILD b/kotlin/builder/unittests/BUILD
index 2895039..37f6237 100644
--- a/kotlin/builder/unittests/BUILD
+++ b/kotlin/builder/unittests/BUILD
@@ -17,7 +17,7 @@
srcs = glob(["**/*.java"]),
test_class = "io.bazel.kotlin.builder.mode.jvm.utils.JdepsParserTest",
deps = [
- "//kotlin/builder/src/io/bazel/kotlin/builder",
+ "//kotlin/builder:builder_lib_for_tests",
"@com_github_jetbrains_kotlin//:kotlin-stdlib",
"@io_bazel_rules_kotlin//kotlin/builder/proto:deps",
"@io_bazel_rules_kotlin_com_google_protobuf_protobuf_java//jar",