rules_kotlin
rules_kotlin copied to clipboard
Bazel rules for Kotlin
Resolves #1035 Sanity tested with: ``` cd examples/ksp ; bazel aquery 'mnemonic(KotlinKsp, //:coffee_lib)' | grep ksp_opts -A 2 --ksp_opts \ 'arg1=value1' \ 'arg2=value2' \ ```
…rect dependencies only https://github.com/oliviernotteghem/rules_kotlin/commit/004189ea53792cad74e0b3b8559d4889707cafbb came a slightly outdated branch. Syncing changes with what we're using internally at Uber.
Adding KAPT arguments to define_kt_toolchain By this, we can configure KAPT. Build.bazel ``` load("@io_bazel_rules_kotlin//kotlin:core.bzl", "define_kt_toolchain", "kapt_options") kapt_options( name = "kapt_options", correctErrorTypes = True, ) define_kt_toolchain( name = "kotlin_toolchain", api_version =...
KSP offers a way to pass options to processors, its done with the -P flag, for example: ``` -P plugin:com.google.devtools.ksp.symbol-processing:apoption=key=value ``` Since we don't have a dedicated attr for that...
Fixes a TODO about collecting proper transitive data. Note: I don't know where a test for this belongs, nor whether there are other providers which should be scanned for data...
The flatten jar macro currently collects the entire compilation classpath of any target passed is as an associate which gives access to all of the Kotlin `internal` functions of not...
Fixes #1016 I haven't yet considered what options may need to be e.g. stripped out before sending along. But if there are other glaring holes in this, or reasons to...
Add transitive_runtime_jars to KtKvmInfo so we can store the java_info.transitive_runtime_jars for access in the IntelliJ Bazel Plugin's aspect
Part one of two. @nkoroste discovered we had been breaking backwards compatibility by updating the plugins as the compiler plugin api changes. These separates and compiles each major version of...
Following the instructions in `rules_kotlin`'s readme, the following should be enough to use the Kotlin 1.6.21 compiler release: ```starlark load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_kotlin", sha256 = "01293740a16e474669aba5b5a1fe3d368de5832442f164e4fbfc566815a8bc3a", url =...