Skip to content

Commit

Permalink
Pass dep as associate deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Raghul Velusamy committed Dec 11, 2023
1 parent f7c76a0 commit 9279002
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
17 changes: 17 additions & 0 deletions src/main/kotlin/io/bazel/kotlin/builder/tasks/BUILD.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("//kotlin:jvm.bzl", "kt_jvm_library")
load("//src/main/kotlin:bootstrap.bzl", "kt_bootstrap_library")

kt_bootstrap_library(
Expand All @@ -37,3 +38,19 @@ kt_bootstrap_library(
"@kotlin_rules_maven//:javax_inject_javax_inject",
],
)

kt_jvm_library(
name = "tasks_associates",
srcs = glob(["**/*.kt"]),
visibility = ["//src:__subpackages__"],
deps = [
"//src/main/kotlin/io/bazel/kotlin/builder/toolchain",
"//src/main/kotlin/io/bazel/kotlin/builder/utils",
"//src/main/kotlin/io/bazel/kotlin/builder/utils/jars",
"//src/main/kotlin/io/bazel/worker",
"//src/main/protobuf:deps_java_proto",
"//src/main/protobuf:kotlin_model_java_proto",
"@bazel_tools//tools/jdk:JacocoCoverage",
"@kotlin_rules_maven//:javax_inject_javax_inject",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ private val Directories.incrementalData
* Create a new [JvmCompilationTask] with sources found in the generatedSources directory. This should be run after
* annotation processors have been run.
*/
fun JvmCompilationTask.expandWithGeneratedSources(): JvmCompilationTask =
internal fun JvmCompilationTask.expandWithGeneratedSources(): JvmCompilationTask =
expandWithSources(
Stream.of(directories.generatedSources, directories.generatedJavaSources)
.map { s -> Paths.get(s) }
Expand Down
7 changes: 2 additions & 5 deletions src/test/kotlin/io/bazel/kotlin/builder/tasks/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,8 @@ kt_rules_test(
kt_rules_test(
name = "KotlinJvmTaskExecutorTest",
srcs = ["jvm/KotlinJvmTaskExecutorTest.kt"],
deps = [
"//kotlin/compiler:kotlin-test",
"//src/main/kotlin/io/bazel/kotlin/builder/tasks",
"@kotlin_rules_maven//:junit_junit",
],
associates = ["//src/main/kotlin/io/bazel/kotlin/builder/tasks:tasks_associates"],
deps = ["//kotlin/compiler:kotlin-test"],
)

test_suite(
Expand Down

0 comments on commit 9279002

Please sign in to comment.