Releases: bazelbuild/rules_kotlin
v2.1.0
Release notes for v2.1.0
Adds support for Kotlin 2.1.0 and above.
Using Bzlmod with Bazel 7
- Enable with
common --enable_bzlmod
in.bazelrc
. - Add to your
MODULE.bazel
file:
bazel_dep(name = "rules_kotlin", version = "2.1.0")
Using WORKSPACE
Paste this snippet into your WORKSPACE.bazel
file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_kotlin",
sha256 = "dd32f19e73c70f32ccb9a166c615c0ca4aed8e27e72c4a6330c3523eafa1aa55",
url = "https://github.com/bazelbuild/rules_kotlin/releases/download/v2.1.0/rules_kotlin-v2.1.0.tar.gz",
)
What's Changed
- Pass generated_source_jar to the final JavaInfo by @Bencodes in #1223
- [infra] Use kotlin standard libraries from the toolchain, as opposed to hard coded. by @restingbull in #1225
- Add rules_jvm_external overrides for stdlib by @Bencodes in #1219
- Stop suggesting that Java's
exported_plugins
is transitive. by @cpovirk in #1236 - Add a current_toolchain target to be referenced by kt_toolchain attribute by @jdai8 in #1239
- Fix workspace resolution for development by @restingbull in #1231
- fix running kotlin targets by @Bencodes in #1242
- Add support for -Xconsistent-data-class-copy-visibility by @Bencodes in #1247
- Create a new "bootstrap" toolchain and compile with 2.1.0 by @restingbull in #1244
- Fix typo in src/main/starlark/core/compile/BUILD.release.bazel by @Bencodes in #1253
- Query the release target in the integration tests by @Bencodes in #1254
New Contributors
Full Changelog: v2.0.0...v2.1.0
v2.0.0
Release notes for v2.0.0
Using Bzlmod with Bazel 7
- Enable with
common --enable_bzlmod
in.bazelrc
. - Add to your
MODULE.bazel
file:
bazel_dep(name = "rules_kotlin", version = "2.0.0")
Using WORKSPACE
Paste this snippet into your WORKSPACE.bazel
file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_kotlin",
sha256 = "d89723cc9ebbb7bdb2ebaca1af7d2383e074615643cf97a366b758a76b7dc443",
url = "https://github.com/bazelbuild/rules_kotlin/releases/download/v2.0.0/rules_kotlin-v2.0.0.tar.gz",
)
What's Changed
- Update Skylib to 1.7.1 by @Bencodes in #1187
- Update platforms to 0.0.10 by @Bencodes in #1189
- Fix stardoc breakage in bazel @ HEAD by @restingbull in #1190
- Revert "Update README.md" by @Bencodes in #1192
- Update Skylib to 1.7.1 by @Bencodes in #1188
- Add docs for cutting new rules releases by @Bencodes in #1191
- Update Bazel to 7.2.1 by @Bencodes in #1186
- Drop support for JavaScript by @Bencodes in #1185
- Import rules_android in MODULE.bazel by @Bencodes in #1195
- Support testing with coverage in dev mode by @Bencodes in #1199
- [ksp] Rename files during extraction by @restingbull in #1201
- Upgrade Bazel to
7.3.0
by @albertocavalcante in #1207 - Implement Jdeps using K2 APIs by @jbarr21 in #1166
- Add support for -Xjvm-release by @Bencodes in #1200
- Update KtLint to 1.3.1 by @Bencodes in #1210
- [toolchains] Add native.toolchain arguments to define_kt_toolchain by @restingbull in #1213
- [infra] Convert examples to bazel integration tests by @restingbull in #1183
- [stardoc] Update stardoc to 0.7.0 by @restingbull in #1214
- Add support for Kotlin 2.0.10 by @Bencodes in #1216
- Update released_rules_kotlin to 1.9.6 by @Bencodes in #1215
New Contributors
- @albertocavalcante made their first contribution in #1207
Full Changelog: v1.9.6...v2.0.0
v1.9.6
Release notes for v1.9.6
Using Bzlmod with Bazel 7
- Enable with
common --enable_bzlmod
in.bazelrc
. - Add to your
MODULE.bazel
file:
bazel_dep(name = "rules_kotlin", version = "1.9.6")
Using WORKSPACE
Paste this snippet into your WORKSPACE.bazel
file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_kotlin",
sha256 = "3b772976fec7bdcda1d84b9d39b176589424c047eb2175bed09aac630e50af43",
url = "https://github.com/bazelbuild/rules_kotlin/releases/download/v1.9.6/rules_kotlin-v1.9.6.tar.gz",
)
What's Changed
- Remove legacy struct providers by @comius in #1157
- Pass through kotlinc options to JS compile by @pswaminathan in #1017
- Prepare Jdeps extension for K2 implementation by @jbarr21 in #1164
- Bump express from 4.17.3 to 4.19.2 in /examples/node by @dependabot in #1150
- Update Bazel to 7.1.1 by @Bencodes in #1160
- Update buildifier to 7.1.1 by @Bencodes in #1161
- Update Kotlin to 1.9.23 and KSP to 1.9.23-1.0.20 by @Bencodes in #1162
- Update release_prep.sh to reference the correct Bazel version by @Bencodes in #1153
- Update release_prep.sh by @Bencodes in #1152
- Add support for generated Java code with KSP by @zalewskise in #1139
- Shade Guava to avoid conflicts with ksp plugins by @erikkerber in #1167
- Various kotlinc options added to opts.kotlinc.bzl by @erikkerber in #1170
- Mark kotlin extension as reproducible by @fmeum in #1173
- Update bazel_skylib to 1.6.1 in release module by @Bencodes in #1174
- Update presubmit.yml by @Bencodes in #1177
- Restrict unecessary inputs to 'JdepsMerge' actions by @oliviernotteghem in #1175
- Make loading the kotlinc repository lazy by @restingbull in #1126
- Fix js test and format capabilities by @restingbull in #1178
- Update KtLint to 1.3.0 by @Bencodes in #1184
New Contributors
- @jbarr21 made their first contribution in #1164
- @erikkerber made their first contribution in #1167
Full Changelog: v1.9.5...v1.9.6
v1.9.5
Release notes for v1.9.5
Using Bzlmod with Bazel 6
- Enable with
common --enable_bzlmod
in.bazelrc
. - Add to your
MODULE.bazel
file:
bazel_dep(name = "rules_kotlin", version = "1.9.5")
Using WORKSPACE
Paste this snippet into your WORKSPACE.bazel
file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_kotlin",
sha256 = "34e8c0351764b71d78f76c8746e98063979ce08dcf1a91666f3f3bc2949a533d",
url = "https://github.com/bazelbuild/rules_kotlin/releases/download/v1.9.5/rules_kotlin-v1.9.5.tar.gz",
)
What's Changed
- [README.md] Update Bazel Compatibility Matrix by @kolloch in #1143
- Add missing compatibility_level back by @Bencodes in #1155
New Contributors
Full Changelog: v1.9.4...v1.9.5
v1.9.4
Release notes for v1.9.4
Using Bzlmod with Bazel 7
- Enable with
common --enable_bzlmod
in.bazelrc
. - Add to your
MODULE.bazel
file:
bazel_dep(name = "rules_kotlin", version = "1.9.4")
Using WORKSPACE
Paste this snippet into your WORKSPACE.bazel
file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_kotlin",
sha256 = "76c0fcc2c23edf736320aded1acd9dde0bae418e5731df12933d886cba86b795",
url = "https://github.com/bazelbuild/rules_kotlin/releases/download/v1.9.4/rules_kotlin-v1.9.4.tar.gz",
)
What's Changed
- [Bcr] Add Bazel versions to BCR presubmit by @Bencodes in #1121
- Support user.bazelrc by @Bencodes in #1119
- Add support for -Xcontext-receivers by @Bencodes in #1117
- Refactor KotlinBuilderJvmJdepsTest to do exact dep assertions by @Bencodes in #1116
- Revert android.bzl changes introduced by #842 by @Bencodes in #1122
- Build rules_kotlin using rules_kotlin by @restingbull in #1081
- Improve jdeps logic to find more explicit and implicit dependencies by @scosenza in #1118
- Add user.bazelrc to .gitignore by @Bencodes in #1123
- [kt_compiler_plugin] Add kt_plugin_cfg for reusable and composable options by @restingbull in #1105
- [bzlmod] Stop relying on initialize.release.bzl by @restingbull in #1127
- Revert "[kt_compiler_plugin] Add kt_plugin_cfg for reusable and composable options" by @Bencodes in #1131
- [testing] Switch to junit5 by @restingbull in #1128
- Update Bazel to 7.1.0 by @Bencodes in #1136
- Use maven lock-file by @scaiper in #1134
- Remove leading . from package inference by @restingbull in #1142
- Pass -Djava.security.manager=allow in kt_rules_test by @Bencodes in #1132
- [testing] Revert to JUnit4. by @restingbull in #1145
- Remove unnecessary use of
ctx.resolve_tools
. by @tjgq in #1147 - Reapply "[kt_compiler_plugin] Add kt_plugin_cfg for reusable and comp… …osable op…" (#1131) by @restingbull in #1135
- Support -Xsuppress-version-warnings by @Bencodes in #1146
- Remove unused repo by @restingbull in #1151
New Contributors
Full Changelog: v1.9.1...v1.9.4
v1.9.3
Release notes for v1.9.3
Using Bzlmod with Bazel 6
- Enable with
common --enable_bzlmod
in.bazelrc
. - Add to your
MODULE.bazel
file:
bazel_dep(name = "rules_kotlin", version = "1.9.3")
Using WORKSPACE
Paste this snippet into your WORKSPACE.bazel
file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_kotlin",
sha256 = "b3eac09c6385e3a79f3c260314c4bfb82c288d3947869b2406b11bf1ef450cc2",
url = "https://github.com/bazelbuild/rules_kotlin/releases/download/v1.9.3/rules_kotlin-v1.9.3.tar.gz",
)
What's Changed
- [Bcr] Add Bazel versions to BCR presubmit by @Bencodes in #1121
- Support user.bazelrc by @Bencodes in #1119
- Add support for -Xcontext-receivers by @Bencodes in #1117
- Refactor KotlinBuilderJvmJdepsTest to do exact dep assertions by @Bencodes in #1116
- Revert android.bzl changes introduced by #842 by @Bencodes in #1122
- Build rules_kotlin using rules_kotlin by @restingbull in #1081
- Improve jdeps logic to find more explicit and implicit dependencies by @scosenza in #1118
- Add user.bazelrc to .gitignore by @Bencodes in #1123
- [kt_compiler_plugin] Add kt_plugin_cfg for reusable and composable options by @restingbull in #1105
- [bzlmod] Stop relying on initialize.release.bzl by @restingbull in #1127
- Revert "[kt_compiler_plugin] Add kt_plugin_cfg for reusable and composable options" by @Bencodes in #1131
- [testing] Switch to junit5 by @restingbull in #1128
- Update Bazel to 7.1.0 by @Bencodes in #1136
- Use maven lock-file by @scaiper in #1134
- Remove leading . from package inference by @restingbull in #1142
- Pass -Djava.security.manager=allow in kt_rules_test by @Bencodes in #1132
- [testing] Revert to JUnit4. by @restingbull in #1145
- Remove unnecessary use of
ctx.resolve_tools
. by @tjgq in #1147 - Reapply "[kt_compiler_plugin] Add kt_plugin_cfg for reusable and comp… …osable op…" (#1131) by @restingbull in #1135
- Support -Xsuppress-version-warnings by @Bencodes in #1146
New Contributors
Full Changelog: v1.9.1...v1.9.3
v1.9.2
Release notes for v1.9.2
Using Bzlmod with Bazel 6
- Enable with
common --enable_bzlmod
in.bazelrc
. - Add to your
MODULE.bazel
file:
bazel_dep(name = "rules_kotlin", version = "1.9.2")
Using WORKSPACE
Paste this snippet into your WORKSPACE.bazel
file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_kotlin",
sha256 = "48e69a22c7098a2bb36bcab3bec3355a0ea1190a285c64216cf4eba3c08bba89",
url = "https://github.com/bazelbuild/rules_kotlin/releases/download/v1.9.2/rules_kotlin-v1.9.2.tar.gz",
)
What's Changed
- [Bcr] Add Bazel versions to BCR presubmit by @Bencodes in #1121
- Support user.bazelrc by @Bencodes in #1119
- Add support for -Xcontext-receivers by @Bencodes in #1117
- Refactor KotlinBuilderJvmJdepsTest to do exact dep assertions by @Bencodes in #1116
- Revert android.bzl changes introduced by #842 by @Bencodes in #1122
- Build rules_kotlin using rules_kotlin by @restingbull in #1081
- Improve jdeps logic to find more explicit and implicit dependencies by @scosenza in #1118
- Add user.bazelrc to .gitignore by @Bencodes in #1123
Full Changelog: v1.9.1...v1.9.2
v1.9.1
Release notes for v1.9.1
Using Bzlmod with Bazel 6
- Enable with
common --enable_bzlmod
in.bazelrc
. - Add to your
MODULE.bazel
file:
bazel_dep(name = "rules_kotlin", version = "1.9.1")
Using WORKSPACE
Paste this snippet into your WORKSPACE.bazel
file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_kotlin",
sha256 = "d9898c3250e0442436eeabde4e194c30d6c76a4a97f517b18cefdfd4e345725a",
url = "https://github.com/bazelbuild/rules_kotlin/releases/download/v1.9.1/rules_kotlin-v1.9.1.tar.gz",
)
What's Changed
- Fix release notes generation by @Bencodes in #1057
- Fix missing jdeps by consistently calling
collectTypeReferences
by @scosenza in #1045 - Update Kotlin to 1.9.20 by @Bencodes in #1067
- Update release_prep.sh to have correct WORKSPACE download URL by @Bencodes in #1066
- Add javac_option to pass release flag to javac by @cheister in #1064
- Include more tests in the root test suite by @Bencodes in #1050
- Update release_prep.sh by @Bencodes in #1070
- [options] Add exports and fix readme by @restingbull in #1068
- Add add-opens for JDK 21 java.lang.IllegalAccessError by @cheister in #1069
- Update README.md by @AlexBeggs in #1073
- Use launcher stub template from bazel by @illicitonion in #1082
- Fix 'x_no_source_debug_extension' inverted behavior by @oliviernotteghem in #1078
- Update Bazel version to 6.4.0 by @Bencodes in #1085
- Update rules_java to 7.2.0 by @Bencodes in #1084
- Add CI jobs for 5.x and 6.x releases by @Bencodes in #1087
- Support Kotlin 2.0 target and language levels by @Bencodes in #1086
- Add missing KotlinJvmTaskExecutorTest to the test suite by @raghulvelusamy in #1089
- Build rules_kotlin using Bazel 7.0.0 by @Bencodes in #1090
- Update name of experimental_prune_transitive_deps flag. by @plobsing in #1101
- Allow setting jvm_target up to Java 21 by @josephglanville in #1099
- Add manifest files generated from ksp into final jar by @raghulvelusamy in #1094
- Add bzl_library targets to released artifacts by @stevebarrau in #1093
- Update default Kotlin language levels to 1.9 by @Bencodes in #1111
- Update Bazel to 7.0.2 by @Bencodes in #1108
- Update Kotlin to 1.9.22 by @Bencodes in #1109
- Fix README installation's string formatting code by @marcoss in #1114
New Contributors
- @scosenza made their first contribution in #1045
- @cheister made their first contribution in #1064
- @AlexBeggs made their first contribution in #1073
- @raghulvelusamy made their first contribution in #1089
- @plobsing made their first contribution in #1101
- @josephglanville made their first contribution in #1099
- @stevebarrau made their first contribution in #1093
- @marcoss made their first contribution in #1114
Full Changelog: v1.9.0...v1.9.1
v1.9.0
This release of rules_kotlin comes with some breaking changes:
- The
build_bazel_rules_android
repository namespace has been renamed torules_android
. Please update your WORKSPACE files to avoid downloading these rules multiple times! #1047 - In order to support Bzlmod, the Kotlin and KSP targets have been moved out of the
io_bazel_rules_kotlin
repository and intorules_kotlin
. If you are referencing any targets under@com_github_jetbrains_kotlin//...
in your build files you will need to replace them with@rules_kotlin//kotlin/compiler:...
. #1014
Using Bzlmod with Bazel 6+
Note: Bzlmod support inside of rules_kotlin
is still very much considered experimental. Please report any issues that you run into!
- Enable with
common --enable_bzlmod
in.bazelrc
. - Add to your
MODULE.bazel
file:
bazel_dep(name = "rules_kotlin", version = "1.9.0")
Using WORKSPACE
Paste this snippet into your file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_kotlin",
sha256 = "5766f1e599acf551aa56f49dab9ab9108269b03c557496c54acaf41f98e2b8d6",
url = "https://github.com/bazelbuild/rules_kotlin/releases/download/v1.9.0/rules_kotlin-v1.9.0.tar.gz",
)
What's Changed
- Move the KSP and compiler target definitions into rules_kotlin by @Bencodes in #1014
- Add support for Bzlmod by @Bencodes in #1006
- Enables compiling against direct dependencies only - kotlin by @nkoroste in #842
- Add support for -Xno-source-debug-extension by @Bencodes in #1025
- Include Bzlmod files into release binary by @Bencodes in #1026
- Enable Bzlmod for examples/android by @Bencodes in #1031
- Update and align rules_python versions on 0.23.1 by @Bencodes in #1029
- Update buildifier to 6.3.3 by @Bencodes in #1027
- Update MODULE.bazel rules_jvm_external to 5.3 by @Bencodes in #1028
- Enable Bzlmod for examples/multiplex by @Bencodes in #1030
- Load JavaInfo and java_common from rules_java by @comius in #1037
- Fix the nouse_workers_with_dexbuilder error by @sgowroji in #1040
- Rename build_bazel_rules_android to rules_android by @Bencodes in #1047
- Remove copy/pasted BUILD files that call kt_configure_toolchains by @Bencodes in #1053
- Add BUILD.release.bazel file for src/main/starlark/core/repositories/kotlin/ by @Bencodes in #1052
- Update bazel_skylib 1.3.0 -> 1.4.1 by @Bencodes in #1049
- Fix Android support when running the entire test suite by @Bencodes in #1051
- [bazel-bsp-aspect] extract more generated jars by @xuansontrinh in #1046
- Add Android Platforms build flags. by @katre in #1054
- Add support for Kotlin 1.9 by @agluszak in #996
- Add BCR configurations for publishing releases to the central registry by @Bencodes in #1038
New Contributors
- @sgowroji made their first contribution in #1040
- @xuansontrinh made their first contribution in #1046
- @katre made their first contribution in #1054
- @agluszak made their first contribution in #996
Full Changelog: v1.8.1...v1.9.0
Kotlin rules for Bazel - v1.8.1
Note: These rules are maintained externally by volunteers (with Google's approval)
SHA256: a630cda9fdb4f56cf2dc20a4bf873765c41cf00e9379e8d59cd07b24730f4fde
What's Changed
- Update README with KSP support by @Bencodes in #983
- fix readme about kotlinc_opts and javac_opts by @asinbow in #984
- update stardoc to 0.5.6 by @restingbull in #986
- Rename dev_io_bazel_rules_kotlin -> io_bazel_rules_kotlin by @Bencodes in #973
- Fail CI if the docs are outdated by @Bencodes in #961
- Bump quick guide to use v1.8 by @hanneskaeufler in #987
- Expose ksp_version by @zalewskise in #989
- Remove unnecessary Java runtime dependencies by @fmeum in #1000
- Migrate usages of deprecated
JavaInfo
fields by @hvadehra in #1005 - Update rules_jvm_external to 5.3 by @Bencodes in #1009
- Update Bazel to 6.3.2 by @Bencodes in #1007
- Add rules_java 6.4.0 by @Bencodes in #1010
- Group the all_tests jobs together in presubmit.yml by @Bencodes in #1008
- Disable strict deps for Android example by @Bencodes in #1013
- Update kt_java_stub_template to 6.2.1 by @Bencodes in #992
- Avoid running java_common#compile against KSP generated outputs by @Bencodes in #990
New Contributors
- @asinbow made their first contribution in #984
- @zalewskise made their first contribution in #989
- @hvadehra made their first contribution in #1005
Full Changelog: v1.8...v1.8.1