rules_kotlin
rules_kotlin copied to clipboard
Bazel rules for Kotlin
If the target has `x-jvm-default` setting set (either via toolchain or explicitly), but has any plugin set, the option is going to be ignored. Here you can find minimal reproducible...
There are performance benefits to using `--nolegacy_external_runfiles` ([code here](https://cs.opensource.google/bazel/bazel/+/master:src/main/java/com/google/devtools/build/lib/analysis/config/CoreOptions.java;l=452-460;drc=3a8da9268ffa9c814de4ce4bc1b0e349b37072a5)) as a Bazel build option, [with some additional context here](https://github.com/bazelbuild/bazel/issues/9306#issuecomment-1370440301). As @alexeagle tells me, it allows for an optimization in runfiles...
After updating to version 1.7.1 with Bazel 5.1.0 I get the error ``` ERROR: src/test/java/BUILD:8:13: in kt_jvm_test rule //src/test/java:KtTest: Traceback (most recent call last): File "cache/bazel/879c5fa76919d0bed49168a2e457a904/external/io_bazel_rules_kotlin/kotlin/internal/jvm/impl.bzl", line 306, column 32,...
```sh $ bazel build ... ** Please add the following dependencies: /external/com_github_jetbrains_kotlin/lib/kotlin-stdlib.jar to Target failed to build ``` This error persists even if I add a dep on that jar...
I tried to build this project https://github.com/android/databinding-samples with bazel. the data binding class was generated, but can't link to the source code. `bazel-out/darwin-fastbuild/bin/BasicSample/app/src/main/_javac/basic_sample_base/libbasic_sample_base_tmp/com/example/android/databinding/basicsample/databinding/ObservableFieldProfileBinding.java:15: error: package com.example.android.databinding.basicsample.data does not exist import...
This enables passing the [dumpProcessorStats](https://kotlinlang.org/docs/kapt.html#measuring-performance-of-annotation-processors) flag to the KAPT invocation. Note that the official documentation uses the new name `dumpProcessorTimings`, which appears to be the name from version 1.8 onwards....
This is the Kotlin part of deps/classes tracking to achieve compilation avoidance. Refer to Java part (TODO) for more info.
Currently, the kotlinc worker uses the default jvm options on `java_binary`. These need to be configurable to allocate more memory/configure GC to enhance worker performance.
This is forked off the 1.6 tag, as that is the current release.
This PR is intended to be a proof of concept of integrating `rules_kotlin` with the Starlark version for `rules_android`. This PR uses the pre-alpha version of [rules_android](https://github.com/mauriciogg/rules_android/tree/pre-alpha) with some additional...