Skip to content

Commit

Permalink
Add InteliiJ aspect info (#242)
Browse files Browse the repository at this point in the history
- 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 bazelbuild/intellij#1274
  • Loading branch information
richmowd411 committed Jan 15, 2020
1 parent c1d6af7 commit f783d08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions kotlin/internal/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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]",
},
)

Expand Down
1 change: 1 addition & 0 deletions kotlin/internal/jvm/compile.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f783d08

Please sign in to comment.