From a3d4d561cc18680a510589772146c38e172ace65 Mon Sep 17 00:00:00 2001 From: Scotte Zinn Date: Wed, 15 Jan 2020 17:23:55 -0500 Subject: [PATCH] Add InteliiJ aspect info (#242) - supplies the language version in the kt provider - allows the bazel-intellij aspect processing to correctly identify the version of Kotlin being used and update the source accordingly - part of the fix for https://github.com/bazelbuild/intellij/issues/1274 --- kotlin/internal/defs.bzl | 1 + kotlin/internal/jvm/compile.bzl | 1 + 2 files changed, 2 insertions(+) diff --git a/kotlin/internal/defs.bzl b/kotlin/internal/defs.bzl index 62690d553..fddc2ce6f 100644 --- a/kotlin/internal/defs.bzl +++ b/kotlin/internal/defs.bzl @@ -23,6 +23,7 @@ KtJvmInfo = provider( "module_name": "the module name", "srcs": "the source files. [intelij-aspect]", "outputs": "output jars produced by this rule. [intelij-aspect]", + "language_version": "version of kotlin used. [intellij-aspect]", }, ) diff --git a/kotlin/internal/jvm/compile.bzl b/kotlin/internal/jvm/compile.bzl index 6b9a554b6..922c00718 100644 --- a/kotlin/internal/jvm/compile.bzl +++ b/kotlin/internal/jvm/compile.bzl @@ -250,6 +250,7 @@ def kt_jvm_compile_action(ctx, rule_kind, output_jar): kt = _KtJvmInfo( srcs = ctx.files.srcs, module_name = module_name, + language_version = toolchain.api_version, # intelij aspect needs this. outputs = struct( jdeps = ctx.outputs.jdeps,