Skip to content

Releases: bazelbuild/rules_kotlin

Kotlin rules for Bazel - v1.6.0-RC-2

26 May 19:33
9e36436
Compare
Choose a tag to compare
Pre-release

What's Changed

Full Changelog: 1.6.0-RC-1...v1.6.0-RC-2

Kotlin rules for Bazel - 1.6.0-RC-1

27 Apr 17:22
063b198
Compare
Choose a tag to compare
Pre-release

What's Changed

New Contributors

Full Changelog: v1.5.0...1.6.0-RC-1

Kotlin rules for Bazel - 1.5.0

02 Feb 18:50
3599651
Compare
Choose a tag to compare

Note: These rules are maintained externally by volunteers (with Google's approval)

Note: Release notes and docs to be re-written.

SHA256: 12d22a3d9cbcf00f2e2d8f0683ba87d3823cb8c7f6837568dd7e48846e023307

Final revisions

  • Use JavaPluginInfo if available in Bazel (#587)
  • Remove exception info for kt_android_local_test from README.md (#595)
  • Cleanup output on failure (#604)
  • Bug fix in _repeated_values_for (#610)
  • remove kotlin repository alias, as it must be called before kotlin.bzl can be loaded. (#613)
  • Remove overzealous provider requiring. (#614)
  • Add tests to jar creator. Enable flag in single_jar to create directories (#615)
  • Allow building from head repo (#612)
  • add x_explicit_api_mode to remaining kotlinc_options definitions (#607)
  • Fix typo. (#605)
  • Pass transitive jars to jdeps merge action (#621)
  • Pass compilation args using the official way (#601)
  • Filter on jars inside of createDepsMap (#620)
  • Pass reducedClasspathMode to CompilationTaskInfo (#622)
  • Fix typo in top-level BUILD.release.bazel (#596)
  • Update Kotlin to 1.5.30 (#588)
  • Typo in “use rules_kotlin from head”, see #570 (#633)
  • Mark repos as local to ensure it always rebuilds (#632)
  • Add basic support for Kotlin 1.6 (#625)
  • fix typo in jvm/impl.bzl error message (#637)
  • Deshade transitive dependencies (#635)
  • Replace some uses of cfg="host" with cfg="exec" (#641)
  • Update log4j in examples/trivial/WORKSPACE (#645)
  • Update log4j to 2.16 (#649)
  • Don't hardcode -Xuse-experimental (#648)
  • Update Kotlin version to 1.5.31 (#654)
  • Update Kotlin to 1.3.32 (#655)
  • Update rules_jvm_external from 4.0 -> 4.2 (#658)
  • Ci jetpack compose (#657)
  • bump all 1.5.1 refs to 1.5.2 (#661)
  • Move Jacoco to runtime deps (#670)
  • Make the underlying _kt library public. (#668)
  • Clean up the android example (#659)
  • Support Bazel to 5.0.0 (#664)
  • Don't propagate JavaInfo for compiler plugin deshaded libs (#644)
  • Don't propagate plugins through deps (#666)

Beta 4 Revisions

  • Add --exclude_build_data arguemtn to singlejar invocation (#566)
  • Version the kt_kotlinc_options and kt_javac_options. (#564)
  • Bump Android build-tools to 30.0.3 (#568)
  • Fix using rules_kotlin from head (#571)
  • Support explicit API mode (#576)
  • Kotlin 1.5 support (#577)
  • Fix missing dependency on jvm-abi-gen.jar in release artifacts (#569)
  • Trim worker output before emitting it (#586)
  • Other fixes, typos, and erratta.

Beta 3 Revisions

  • Fix duplicate testonly attributes being passed to kt_android_local_test (2e7d520)
  • Call System.gc between work requests (#558)
  • Revert "Isolate Kotlin compiler instances for Multiplex workers. (#515)
  • Fix duplicate worker output (#561) …
  • Add forwarding references for js, jvm, ktlint. (#557)
    • Should fix the need to import rules_android if you don't use them
    • May require changing load() statements to point at different .bzl
      e.g. kt_jvm_library would be loaded from jvm.bzl instead of kotlin.bzl

Beta 2 Revisions

  • Handle properties from companion objects (#470)
  • Persistent workers: exit if stdin is closed (#472)
  • Fix build failure when using Java only modules with annotation processor (0ebede9)
  • Collect references for type declarations. (#475)
  • Add java_parameters kt_kotlinc_option (#477)
  • Additional jdeps cases in Kotlin (8a8e884)
  • Support optional source_jar (#482)
  • Pass a few more args to android_local_test (38548a6)
  • Add multiplex worker support (#481)
  • More jdeps fixes (#484)
  • pass the multiple platform flag to kotlinc (#487)
  • Fix jdeps collectTypeArguments stackoverflow error (51fe508)
  • make multiplxing parallel. (#496)
  • Fix concurrency for multiplex (#498)
  • Parallelize stdout and clean up PersistentWorker (#501)
  • Introduce ktlint_test and ktlint_fix (#502)
  • Support manifest_values in android_local_test
  • Add missing variables for java stub template. (#504)
  • Disable spammy output for jar creation. (#503)
  • Initial (experimental) support for code coverage. (#505)
  • source jars passed as rule srcs attributes were being included as nested (80e545c)
  • Add support for Kotlin coverage (#508)
  • Fix java.version parsing (#510) (#511)
  • Implement better test class inference. (#516)
  • Isolate Kotlin compiler instances for Multiplex workers. (#515)
  • Fix kt_jvm_test to support mixed java/kt srcs (#513)
  • Enable worker-key-mnemonic for KotlinCompile + KotlinKapt. (#518)
  • Pass strict_deps flag to java compiler in JavaBuilder flow (#524)
  • Fix formatting in JavaCompiler class (#490)
  • Add jdeps recursion tests (#488)
  • Fix kotlin compiler_release not being set (#530)
  • Remove jcenter references (#526)
  • Pass tags to android sandwich (#525)
  • Expose parcelize plugin and add an example for using it (#522)
  • Remove deprecated java_common fields (#519)
  • Fix missing dependency on @com_github_jetbrains_kotlin//:lib/jvm-abi... (6dfa4bb)
  • fix(docs): correct markdown syntax (#533)
  • Update Dagger from 2.28 -> 2.35.1 (#543)
  • Update to Bazel 4.1.0 (#542)
  • Use current java_stub_template (#545)
  • Fix generated resources (#538)
  • Fix kt_android_local_test can't depend on testonly libraries (#537) …
  • Support srcjars in mixed Java/Kotlin sources when ABI jars are enabled ( …
  • various housekeeping PRs.

Beta 1 Revisions

  • Strict dependency checking and enforcement. (#438)
  • Add a tristate (off/warn/error) experimental_report_unused_deps (#437)
  • Add docs for experimental_use_abi_jars (#446)
  • Kotlin Builder reduced classpath - experimental feature (#439)
  • Improve Jdeps to handle:- (#449)
  • Add Jetpack Compose example (#450)
  • Add support for kt_android_local_test (#451)
  • [Jdeps] Fixes for more missing cases discovered during testing (#452)
  • Ignore the jetpack compose example project from the main (avoids //..… (f7ea228)
  • Make the release script a wee bit clearer, and add generate a sha256
  • Fix breakage due to no jdeps produced when no KT source. (#457)
  • Fix test class checking to break when it finds a match. (#464)
  • Add missing AP files to fix references in Android Studio IDE (#459)
  • Fix examples/android code to actually run successfully (#443)
  • Support tracking super types that are not explicitly referenced as (#468)
  • Expose kotlinc's -Xfriend-paths to all jvm/android kt rules under the… (15dd1de)
  • Make all the child workspaces share the same .bazelversion. (#466)
  • Delete orphan code not used anywhere. (#467)

Alpha 3 Revisions

  • Fixed default option visibility
  • Bump to project Kotlin 1.4.20

Alpha 2 Revisions

  • JavaBuilder compilation prerelease available for testing using: --define=experimental_use_abi_jars=1
  • jdeps automatically generated from kt_jvm_library rules.
  • Support for kt_kotlinc_options to kt_jvm_library. Library options supersede toolchain options.
  • Added kt_kotlinc_options:
Name Description Type Mandatory Default
include_stdlibs Don't automatically include the Kotlin standard libraries into the classpath (stdlib and reflect). String optional "all"
warn Control warning behaviour. String optional "report"
x_allow_jvm_ir_dependencies Suppress errors thrown when using dependencies not compiled by the IR backend. Boolean optional False
x_allow_result_return_type Enable kotlin.Result as a return type Boolean optional False
x_inline_classes Enable experimental inline classes Boolean optional False
x_jvm_default Specifies that a JVM default method should be generated for non-abstract Kotlin interface member. String optional "off"
x_no_optimized_callable_references Do not use optimized callable reference superclasses. Available from 1.4. Boolean optional False
x_skip_prerelease_check Suppress errors thrown when using pre-release classes. Boolean optional False

Notable changes:

  • Releases are now precompiled, suggested production installation is via a release archive. Please see the Development Guide
  • when running from a non-archive repository. (#271)
  • Support for Kotlin compiler plugins via the kt_compiler_plugin (#308)
  • Improved determinism for remote builds (#304)
  • No longer packages non-kotlin generated sources (#263)
  • Proper classpath handling for java plugins (#318)
  • Support for propagating Kotlin version to Intellij (#242 )
  • Fixes to release artifact production (#326, #327)
  • Restructure the worker to be deterministic (cc039db, 3f4698a)
  • Support to compilation using kotlin abi and java ijars. (#294, #347)
  • Add support for Android data-binding when building with Kotlin (#346)
  • Add 0 to allowed package name characters (#364)
  • Specify what the compile_jar value should be when building the library (#341)
  • Separate --Xplugin options to support multiple compiler plugins at a time (#366)
  • Fix setting tags = ["trace", "timings"] on a rule. (#378)
  • Kotlin 1.4 (#363)
  • Support multiple source jars (#377)
  • Bump serialization runtime to compatible version (#382)
  • Add option rules for kotlinc and javac. (#383, #385)
  • Expos...
Read more

Kotlin Rules 1.5.0 (Beta 4)

01 Oct 18:25
1d80564
Compare
Choose a tag to compare
Pre-release

Note: These rules are maintained externally by volunteers (with Google's approval)

Note: The "legacy" prefix will be dropped as of this release. These are the rules, from this point on, until and unless Google chooses to externalize internal rules, at which point we can differentiate.

Note: legacy-1.4.0 isn't released, and this release includes all features in that line of development. Many of those changes are included in this list.

Beta 4 Revisions

  • Add --exclude_build_data arguemtn to singlejar invocation (#566)
  • Version the kt_kotlinc_options and kt_javac_options. (#564)
  • Bump Android build-tools to 30.0.3 (#568)
  • Fix using rules_kotlin from head (#571)
  • Support explicit API mode (#576)
  • Kotlin 1.5 support (#577)
  • Fix missing dependency on jvm-abi-gen.jar in release artifacts (#569)
  • Trim worker output before emitting it (#586)
  • Other fixes, typos, and erratta.

Beta 3 Revisions

  • Fix duplicate testonly attributes being passed to kt_android_local_test (2e7d520)
  • Call System.gc between work requests (#558)
  • Revert "Isolate Kotlin compiler instances for Multiplex workers. (#515)
  • Fix duplicate worker output (#561) …
  • Add forwarding references for js, jvm, ktlint. (#557)
    • Should fix the need to import rules_android if you don't use them
    • May require changing load() statements to point at different .bzl
      e.g. kt_jvm_library would be loaded from jvm.bzl instead of kotlin.bzl

Beta 2 Revisions

  • Handle properties from companion objects (#470)
  • Persistent workers: exit if stdin is closed (#472)
  • Fix build failure when using Java only modules with annotation processor (0ebede9)
  • Collect references for type declarations. (#475)
  • Add java_parameters kt_kotlinc_option (#477)
  • Additional jdeps cases in Kotlin (8a8e884)
  • Support optional source_jar (#482)
  • Pass a few more args to android_local_test (38548a6)
  • Add multiplex worker support (#481)
  • More jdeps fixes (#484)
  • pass the multiple platform flag to kotlinc (#487)
  • Fix jdeps collectTypeArguments stackoverflow error (51fe508)
  • make multiplxing parallel. (#496)
  • Fix concurrency for multiplex (#498)
  • Parallelize stdout and clean up PersistentWorker (#501)
  • Introduce ktlint_test and ktlint_fix (#502)
  • Support manifest_values in android_local_test
  • Add missing variables for java stub template. (#504)
  • Disable spammy output for jar creation. (#503)
  • Initial (experimental) support for code coverage. (#505)
  • source jars passed as rule srcs attributes were being included as nested (80e545c)
  • Add support for Kotlin coverage (#508)
  • Fix java.version parsing (#510) (#511)
  • Implement better test class inference. (#516)
  • Isolate Kotlin compiler instances for Multiplex workers. (#515)
  • Fix kt_jvm_test to support mixed java/kt srcs (#513)
  • Enable worker-key-mnemonic for KotlinCompile + KotlinKapt. (#518)
  • Pass strict_deps flag to java compiler in JavaBuilder flow (#524)
  • Fix formatting in JavaCompiler class (#490)
  • Add jdeps recursion tests (#488)
  • Fix kotlin compiler_release not being set (#530)
  • Remove jcenter references (#526)
  • Pass tags to android sandwich (#525)
  • Expose parcelize plugin and add an example for using it (#522)
  • Remove deprecated java_common fields (#519)
  • Fix missing dependency on @com_github_jetbrains_kotlin//:lib/jvm-abi... (6dfa4bb)
  • fix(docs): correct markdown syntax (#533)
  • Update Dagger from 2.28 -> 2.35.1 (#543)
  • Update to Bazel 4.1.0 (#542)
  • Use current java_stub_template (#545)
  • Fix generated resources (#538)
  • Fix kt_android_local_test can't depend on testonly libraries (#537) …
  • Support srcjars in mixed Java/Kotlin sources when ABI jars are enabled ( …
  • various housekeeping PRs.

Beta 1 Revisions

  • Strict dependency checking and enforcement. (#438)
  • Add a tristate (off/warn/error) experimental_report_unused_deps (#437)
  • Add docs for experimental_use_abi_jars (#446)
  • Kotlin Builder reduced classpath - experimental feature (#439)
  • Improve Jdeps to handle:- (#449)
  • Add Jetpack Compose example (#450)
  • Add support for kt_android_local_test (#451)
  • [Jdeps] Fixes for more missing cases discovered during testing (#452)
  • Ignore the jetpack compose example project from the main (avoids //..… (f7ea228)
  • Make the release script a wee bit clearer, and add generate a sha256
  • Fix breakage due to no jdeps produced when no KT source. (#457)
  • Fix test class checking to break when it finds a match. (#464)
  • Add missing AP files to fix references in Android Studio IDE (#459)
  • Fix examples/android code to actually run successfully (#443)
  • Support tracking super types that are not explicitly referenced as (#468)
  • Expose kotlinc's -Xfriend-paths to all jvm/android kt rules under the… (15dd1de)
  • Make all the child workspaces share the same .bazelversion. (#466)
  • Delete orphan code not used anywhere. (#467)

Alpha 3 Revisions

  • Fixed default option visibility
  • Bump to project Kotlin 1.4.20

Alpha 2 Revisions

  • JavaBuilder compilation prerelease available for testing using: --define=experimental_use_abi_jars=1
  • jdeps automatically generated from kt_jvm_library rules.
  • Support for kt_kotlinc_options to kt_jvm_library. Library options supersede toolchain options.
  • Added kt_kotlinc_options:
Name Description Type Mandatory Default
include_stdlibs Don't automatically include the Kotlin standard libraries into the classpath (stdlib and reflect). String optional "all"
warn Control warning behaviour. String optional "report"
x_allow_jvm_ir_dependencies Suppress errors thrown when using dependencies not compiled by the IR backend. Boolean optional False
x_allow_result_return_type Enable kotlin.Result as a return type Boolean optional False
x_inline_classes Enable experimental inline classes Boolean optional False
x_jvm_default Specifies that a JVM default method should be generated for non-abstract Kotlin interface member. String optional "off"
x_no_optimized_callable_references Do not use optimized callable reference superclasses. Available from 1.4. Boolean optional False
x_skip_prerelease_check Suppress errors thrown when using pre-release classes. Boolean optional False

Notable changes:

  • Releases are now precompiled, suggested production installation is via a release archive. Please see the Development Guide
  • when running from a non-archive repository. (#271)
  • Support for Kotlin compiler plugins via the kt_compiler_plugin (#308)
  • Improved determinism for remote builds (#304)
  • No longer packages non-kotlin generated sources (#263)
  • Proper classpath handling for java plugins (#318)
  • Support for propagating Kotlin version to Intellij (#242 )
  • Fixes to release artifact production (#326, #327)
  • Restructure the worker to be deterministic (cc039db, 3f4698a)
  • Support to compilation using kotlin abi and java ijars. (#294, #347)
  • Add support for Android data-binding when building with Kotlin (#346)
  • Add 0 to allowed package name characters (#364)
  • Specify what the compile_jar value should be when building the library (#341)
  • Separate --Xplugin options to support multiple compiler plugins at a time (#366)
  • Fix setting tags = ["trace", "timings"] on a rule. (#378)
  • Kotlin 1.4 (#363)
  • Support multiple source jars (#377)
  • Bump serialization runtime to compatible version (#382)
  • Add option rules for kotlinc and javac. (#383, #385)
  • Expose kt_kotlinc_options and kt_javac_options (#386)
  • Make kt_compiler_plugin work with android_binary (#388)
  • Support the new Kotlin IR backend (#384)
  • Add warning as error to the warn option. (b7f5832)
  • Major rework of the compiler plugin infrastructure (#393)
    • plugins now require an ID (formerly optional)
    • plugins run in specific phases (kapt stubs, compile)
    • compiler plugins may be exported via exported_compiler_plugins (similar to exported_plugins on java_library)
    • some bash substitutions in working directory arguments in plugins (anvil example demonstrates)
  • Option to tag a rule as kt_abi_plugin_incompatible (#362) …
  • Fix java_plugins to work with Android rules (#407)
  • Include KAPT generated source jars as Kotlin builder inputs (#410)
  • Unify experimental java builder + abi jar flags (#411)
  • Many more minor fixes.

More detail can be found in the Changelog

Usage instructions can be found in the readme README

This release includes the contributions of various Googlers as well as @cgruber, @justhecuke, @szinn, @rockwotj, @IljaKroonen, @benjaminRomano, @factuno-db, @arturdryomov, @restingbull, @jongerrish, @BenHenning, @gertvdijk, @dotdat, @fkorotkov, @Wyverald, @Bencodes, @Kernald, @meteorcloudy, @comius.

SHA-256 for rules_kotlin_release.tgz: e4185409c787c18f332ae83a73827aab6e77058a48ffee0cac01123408cbc89a

Kotlin Rules 1.5.0 (Beta 3)

28 Jul 02:30
7b7ac2d
Compare
Choose a tag to compare
Pre-release

Kotlin rules for Bazel - 1.5.0 Beta 3

Note: These rules are maintained externally by volunteers (with Google's approval)

Note: The "legacy" prefix will be dropped as of this release. These are the rules, from this point on, until and unless Google chooses to externalize internal rules, at which point we can differentiate.

Note: legacy-1.4.0 isn't released, and this release includes all features in that line of development. Many of those changes are included in this list.

Beta 3 Revisions

  • Fix duplicate testonly attributes being passed to kt_android_local_test (2e7d520)
  • Call System.gc between work requests (#558)
  • Revert "Isolate Kotlin compiler instances for Multiplex workers. (#515)
  • Fix duplicate worker output (#561) …
  • Add forwarding references for js, jvm, ktlint. (#557)
    • Should fix the need to import rules_android if you don't use them
    • May require changing load() statements to point at different .bzl
      e.g. kt_jvm_library would be loaded from jvm.bzl instead of kotlin.bzl

Beta 2 Revisions

  • Handle properties from companion objects (#470)
  • Persistent workers: exit if stdin is closed (#472)
  • Fix build failure when using Java only modules with annotation processor (0ebede9)
  • Collect references for type declarations. (#475)
  • Add java_parameters kt_kotlinc_option (#477)
  • Additional jdeps cases in Kotlin (8a8e884)
  • Support optional source_jar (#482)
  • Pass a few more args to android_local_test (38548a6)
  • Add multiplex worker support (#481)
  • More jdeps fixes (#484)
  • pass the multiple platform flag to kotlinc (#487)
  • Fix jdeps collectTypeArguments stackoverflow error (51fe508)
  • make multiplxing parallel. (#496)
  • Fix concurrency for multiplex (#498)
  • Parallelize stdout and clean up PersistentWorker (#501)
  • Introduce ktlint_test and ktlint_fix (#502)
  • Support manifest_values in android_local_test
  • Add missing variables for java stub template. (#504)
  • Disable spammy output for jar creation. (#503)
  • Initial (experimental) support for code coverage. (#505)
  • source jars passed as rule srcs attributes were being included as nested (80e545c)
  • Add support for Kotlin coverage (#508)
  • Fix java.version parsing (#510) (#511)
  • Implement better test class inference. (#516)
  • Isolate Kotlin compiler instances for Multiplex workers. (#515)
  • Fix kt_jvm_test to support mixed java/kt srcs (#513)
  • Enable worker-key-mnemonic for KotlinCompile + KotlinKapt. (#518)
  • Pass strict_deps flag to java compiler in JavaBuilder flow (#524)
  • Fix formatting in JavaCompiler class (#490)
  • Add jdeps recursion tests (#488)
  • Fix kotlin compiler_release not being set (#530)
  • Remove jcenter references (#526)
  • Pass tags to android sandwich (#525)
  • Expose parcelize plugin and add an example for using it (#522)
  • Remove deprecated java_common fields (#519)
  • Fix missing dependency on @com_github_jetbrains_kotlin//:lib/jvm-abi... (6dfa4bb)
  • fix(docs): correct markdown syntax (#533)
  • Update Dagger from 2.28 -> 2.35.1 (#543)
  • Update to Bazel 4.1.0 (#542)
  • Use current java_stub_template (#545)
  • Fix generated resources (#538)
  • Fix kt_android_local_test can't depend on testonly libraries (#537) …
  • Support srcjars in mixed Java/Kotlin sources when ABI jars are enabled ( …
  • various housekeeping PRs.

Beta 1 Revisions

  • Strict dependency checking and enforcement. (#438)
  • Add a tristate (off/warn/error) experimental_report_unused_deps (#437)
  • Add docs for experimental_use_abi_jars (#446)
  • Kotlin Builder reduced classpath - experimental feature (#439)
  • Improve Jdeps to handle:- (#449)
  • Add Jetpack Compose example (#450)
  • Add support for kt_android_local_test (#451)
  • [Jdeps] Fixes for more missing cases discovered during testing (#452)
  • Ignore the jetpack compose example project from the main (avoids //..… (f7ea228)
  • Make the release script a wee bit clearer, and add generate a sha256
  • Fix breakage due to no jdeps produced when no KT source. (#457)
  • Fix test class checking to break when it finds a match. (#464)
  • Add missing AP files to fix references in Android Studio IDE (#459)
  • Fix examples/android code to actually run successfully (#443)
  • Support tracking super types that are not explicitly referenced as (#468)
  • Expose kotlinc's -Xfriend-paths to all jvm/android kt rules under the… (15dd1de)
  • Make all the child workspaces share the same .bazelversion. (#466)
  • Delete orphan code not used anywhere. (#467)

Alpha 3 Revisions

  • Fixed default option visibility
  • Bump to project Kotlin 1.4.20

Alpha 2 Revisions

  • JavaBuilder compilation prerelease available for testing using: --define=experimental_use_abi_jars=1
  • jdeps automatically generated from kt_jvm_library rules.
  • Support for kt_kotlinc_options to kt_jvm_library. Library options supersede toolchain options.
  • Added kt_kotlinc_options:
Name Description Type Mandatory Default
include_stdlibs Don't automatically include the Kotlin standard libraries into the classpath (stdlib and reflect). String optional "all"
warn Control warning behaviour. String optional "report"
x_allow_jvm_ir_dependencies Suppress errors thrown when using dependencies not compiled by the IR backend. Boolean optional False
x_allow_result_return_type Enable kotlin.Result as a return type Boolean optional False
x_inline_classes Enable experimental inline classes Boolean optional False
x_jvm_default Specifies that a JVM default method should be generated for non-abstract Kotlin interface member. String optional "off"
x_no_optimized_callable_references Do not use optimized callable reference superclasses. Available from 1.4. Boolean optional False
x_skip_prerelease_check Suppress errors thrown when using pre-release classes. Boolean optional False

Notable changes:

  • Releases are now precompiled, suggested production installation is via a release archive. Please see the Development Guide
  • when running from a non-archive repository. (#271)
  • Support for Kotlin compiler plugins via the kt_compiler_plugin (#308)
  • Improved determinism for remote builds (#304)
  • No longer packages non-kotlin generated sources (#263)
  • Proper classpath handling for java plugins (#318)
  • Support for propagating Kotlin version to Intellij (#242 )
  • Fixes to release artifact production (#326, #327)
  • Restructure the worker to be deterministic (cc039db, 3f4698a)
  • Support to compilation using kotlin abi and java ijars. (#294, #347)
  • Add support for Android data-binding when building with Kotlin (#346)
  • Add 0 to allowed package name characters (#364)
  • Specify what the compile_jar value should be when building the library (#341)
  • Separate --Xplugin options to support multiple compiler plugins at a time (#366)
  • Fix setting tags = ["trace", "timings"] on a rule. (#378)
  • Kotlin 1.4 (#363)
  • Support multiple source jars (#377)
  • Bump serialization runtime to compatible version (#382)
  • Add option rules for kotlinc and javac. (#383, #385)
  • Expose kt_kotlinc_options and kt_javac_options (#386)
  • Make kt_compiler_plugin work with android_binary (#388)
  • Support the new Kotlin IR backend (#384)
  • Add warning as error to the warn option. (b7f5832)
  • Major rework of the compiler plugin infrastructure (#393)
    • plugins now require an ID (formerly optional)
    • plugins run in specific phases (kapt stubs, compile)
    • compiler plugins may be exported via exported_compiler_plugins (similar to exported_plugins on java_library)
    • some bash substitutions in working directory arguments in plugins (anvil example demonstrates)
  • Option to tag a rule as kt_abi_plugin_incompatible (#362) …
  • Fix java_plugins to work with Android rules (#407)
  • Include KAPT generated source jars as Kotlin builder inputs (#410)
  • Unify experimental java builder + abi jar flags (#411)
  • Many more minor fixes.

More detail can be found in the Changelog

Usage instructions can be found in the readme README

This release includes the contributions of various Googlers as well as @cgruber, @justhecuke, @szinn, @rockwotj, @IljaKroonen, @benjaminRomano, @factuno-db, @arturdryomov, @restingbull, @jongerrish, @BenHenning, @gertvdijk, @dotdat, @fkorotkov, @Wyverald, @Bencodes, @Kernald, @meteorcloudy, @comius.

SHA-256 for rules_kotlin_release.tgz: e4185409c787c18f332ae83a73827aab6e77058a48ffee0cac01123408cbc89a

Kotlin Rules 1.5.0 (Beta 2)

13 Jul 21:50
6423eb3
Compare
Choose a tag to compare
Pre-release

Kotlin rules for Bazel - 1.5.0 Beta 2

Note: These rules are maintained externally by volunteers (with Google's approval)

Note: The "legacy" prefix will be dropped as of this release. These are the rules, from this point on, until and unless Google chooses to externalize internal rules, at which point we can differentiate.

Note: legacy-1.4.0 isn't released, and this release includes all features in that line of development. Many of those changes are included in this list.

Known Bugs:

  • May require specification of rules_android in WORKSPACE to resolve a workspace cycle, in some projects.

Beta 2 Revisions

  • Handle properties from companion objects (#470)
  • Persistent workers: exit if stdin is closed (#472)
  • Fix build failure when using Java only modules with annotation processor (0ebede9)
  • Collect references for type declarations. (#475)
  • Add java_parameters kt_kotlinc_option (#477)
  • Additional jdeps cases in Kotlin (8a8e884)
  • Support optional source_jar (#482)
  • Pass a few more args to android_local_test (38548a6)
  • Add multiplex worker support (#481)
  • More jdeps fixes (#484)
  • pass the multiple platform flag to kotlinc (#487)
  • Fix jdeps collectTypeArguments stackoverflow error (51fe508)
  • make multiplxing parallel. (#496)
  • Fix concurrency for multiplex (#498)
  • Parallelize stdout and clean up PersistentWorker (#501)
  • Introduce ktlint_test and ktlint_fix (#502)
  • Support manifest_values in android_local_test
  • Add missing variables for java stub template. (#504)
  • Disable spammy output for jar creation. (#503)
  • Initial (experimental) support for code coverage. (#505)
  • source jars passed as rule srcs attributes were being included as nested (80e545c)
  • Add support for Kotlin coverage (#508)
  • Fix java.version parsing (#510) (#511)
  • Implement better test class inference. (#516)
  • Isolate Kotlin compiler instances for Multiplex workers. (#515)
  • Fix kt_jvm_test to support mixed java/kt srcs (#513)
  • Enable worker-key-mnemonic for KotlinCompile + KotlinKapt. (#518)
  • Pass strict_deps flag to java compiler in JavaBuilder flow (#524)
  • Fix formatting in JavaCompiler class (#490)
  • Add jdeps recursion tests (#488)
  • Fix kotlin compiler_release not being set (#530)
  • Remove jcenter references (#526)
  • Pass tags to android sandwich (#525)
  • Expose parcelize plugin and add an example for using it (#522)
  • Remove deprecated java_common fields (#519)
  • Fix missing dependency on @com_github_jetbrains_kotlin//:lib/jvm-abi... (6dfa4bb)
  • fix(docs): correct markdown syntax (#533)
  • Update Dagger from 2.28 -> 2.35.1 (#543)
  • Update to Bazel 4.1.0 (#542)
  • Use current java_stub_template (#545)
  • Fix generated resources (#538)
  • Fix kt_android_local_test can't depend on testonly libraries (#537) …
  • Support srcjars in mixed Java/Kotlin sources when ABI jars are enabled ( …
  • various housekeeping PRs.

Beta 1 Revisions

  • Strict dependency checking and enforcement. (#438)
  • Add a tristate (off/warn/error) experimental_report_unused_deps (#437)
  • Add docs for experimental_use_abi_jars (#446)
  • Kotlin Builder reduced classpath - experimental feature (#439)
  • Improve Jdeps to handle:- (#449)
  • Add Jetpack Compose example (#450)
  • Add support for kt_android_local_test (#451)
  • [Jdeps] Fixes for more missing cases discovered during testing (#452)
  • Ignore the jetpack compose example project from the main (avoids //..… (f7ea228)
  • Make the release script a wee bit clearer, and add generate a sha256
  • Fix breakage due to no jdeps produced when no KT source. (#457)
  • Fix test class checking to break when it finds a match. (#464)
  • Add missing AP files to fix references in Android Studio IDE (#459)
  • Fix examples/android code to actually run successfully (#443)
  • Support tracking super types that are not explicitly referenced as (#468)
  • Expose kotlinc's -Xfriend-paths to all jvm/android kt rules under the… (15dd1de)
  • Make all the child workspaces share the same .bazelversion. (#466)
  • Delete orphan code not used anywhere. (#467)

Alpha 3 Revisions

  • Fixed default option visibility
  • Bump to project Kotlin 1.4.20

Alpha 2 Revisions

  • JavaBuilder compilation prerelease available for testing using: --define=experimental_use_abi_jars=1
  • jdeps automatically generated from kt_jvm_library rules.
  • Support for kt_kotlinc_options to kt_jvm_library. Library options supersede toolchain options.
  • Added kt_kotlinc_options:
Name Description Type Mandatory Default
include_stdlibs Don't automatically include the Kotlin standard libraries into the classpath (stdlib and reflect). String optional "all"
warn Control warning behaviour. String optional "report"
x_allow_jvm_ir_dependencies Suppress errors thrown when using dependencies not compiled by the IR backend. Boolean optional False
x_allow_result_return_type Enable kotlin.Result as a return type Boolean optional False
x_inline_classes Enable experimental inline classes Boolean optional False
x_jvm_default Specifies that a JVM default method should be generated for non-abstract Kotlin interface member. String optional "off"
x_no_optimized_callable_references Do not use optimized callable reference superclasses. Available from 1.4. Boolean optional False
x_skip_prerelease_check Suppress errors thrown when using pre-release classes. Boolean optional False

Notable changes:

  • Releases are now precompiled, suggested production installation is via a release archive. Please see the Development Guide
  • when running from a non-archive repository. (#271)
  • Support for Kotlin compiler plugins via the kt_compiler_plugin (#308)
  • Improved determinism for remote builds (#304)
  • No longer packages non-kotlin generated sources (#263)
  • Proper classpath handling for java plugins (#318)
  • Support for propagating Kotlin version to Intellij (#242 )
  • Fixes to release artifact production (#326, #327)
  • Restructure the worker to be deterministic (cc039db, 3f4698a)
  • Support to compilation using kotlin abi and java ijars. (#294, #347)
  • Add support for Android data-binding when building with Kotlin (#346)
  • Add 0 to allowed package name characters (#364)
  • Specify what the compile_jar value should be when building the library (#341)
  • Separate --Xplugin options to support multiple compiler plugins at a time (#366)
  • Fix setting tags = ["trace", "timings"] on a rule. (#378)
  • Kotlin 1.4 (#363)
  • Support multiple source jars (#377)
  • Bump serialization runtime to compatible version (#382)
  • Add option rules for kotlinc and javac. (#383, #385)
  • Expose kt_kotlinc_options and kt_javac_options (#386)
  • Make kt_compiler_plugin work with android_binary (#388)
  • Support the new Kotlin IR backend (#384)
  • Add warning as error to the warn option. (b7f5832)
  • Major rework of the compiler plugin infrastructure (#393)
    • plugins now require an ID (formerly optional)
    • plugins run in specific phases (kapt stubs, compile)
    • compiler plugins may be exported via exported_compiler_plugins (similar to exported_plugins on java_library)
    • some bash substitutions in working directory arguments in plugins (anvil example demonstrates)
  • Option to tag a rule as kt_abi_plugin_incompatible (#362) …
  • Fix java_plugins to work with Android rules (#407)
  • Include KAPT generated source jars as Kotlin builder inputs (#410)
  • Unify experimental java builder + abi jar flags (#411)
  • Many more minor fixes.

More detail can be found in the Changelog

Usage instructions can be found in the readme README

This release includes the contributions of various Googlers as well as @cgruber, @justhecuke, @szinn, @rockwotj, @IljaKroonen, @benjaminRomano, @factuno-db, @arturdryomov, @restingbull, @jongerrish, @BenHenning, @gertvdijk, @dotdat, @fkorotkov, @Wyverald, @Bencodes, @Kernald, @meteorcloudy, @comius.

SHA-256 for rules_kotlin_release.tgz: e4185409c787c18f332ae83a73827aab6e77058a48ffee0cac01123408cbc89a

Kotlin Rules 1.5.0 (Alpha 3)

06 Jan 17:21
6e8b04f
Compare
Choose a tag to compare
Pre-release

Kotlin rules for Bazel - Legacy Rules 1.5.0

Note: These rules are maintained externally by volunteers (with Google's approval)

Note: The "legacy" prefix will be dropped as of this release. These are the rules, from this point on, until and unless Google chooses to externalize internal rules, at which point we can differentiate.

Note: legacy-1.4.0 isn't released, and this release includes all features in that line of development. Many of those changes are included in this list.

Alpha 3 Revisions

  • Fixed default option visibility
  • Bump to project Kotlin 1.4.20

Alpha 2 Revisions

  • JavaBuilder compilation prerelease available for testing using: --define=experimental_use_abi_jars=1
  • jdeps automatically generated from kt_jvm_library rules.
  • Support for kt_kotlinc_options to kt_jvm_library. Library options supersede toolchain options.
  • Added kt_kotlinc_options:
Name Description Type Mandatory Default
include_stdlibs Don't automatically include the Kotlin standard libraries into the classpath (stdlib and reflect). String optional "all"
warn Control warning behaviour. String optional "report"
x_allow_jvm_ir_dependencies Suppress errors thrown when using dependencies not compiled by the IR backend. Boolean optional False
x_allow_result_return_type Enable kotlin.Result as a return type Boolean optional False
x_inline_classes Enable experimental inline classes Boolean optional False
x_jvm_default Specifies that a JVM default method should be generated for non-abstract Kotlin interface member. String optional "off"
x_no_optimized_callable_references Do not use optimized callable reference superclasses. Available from 1.4. Boolean optional False
x_skip_prerelease_check Suppress errors thrown when using pre-release classes. Boolean optional False

Notable changes:

  • Releases are now precompiled, suggested production installation is via a release archive. Please see the Development Guide
  • when running from a non-archive repository. (#271)
  • Support for Kotlin compiler plugins via the kt_compiler_plugin (#308)
  • Improved determinism for remote builds (#304)
  • No longer packages non-kotlin generated sources (#263)
  • Proper classpath handling for java plugins (#318)
  • Support for propagating Kotlin version to Intellij (#242 )
  • Fixes to release artifact production (#326, #327)
  • Restructure the worker to be deterministic (cc039db, 3f4698a)
  • Support to compilation using kotlin abi and java ijars. (#294, #347)
  • Add support for Android data-binding when building with Kotlin (#346)
  • Add 0 to allowed package name characters (#364)
  • Specify what the compile_jar value should be when building the library (#341)
  • Separate --Xplugin options to support multiple compiler plugins at a time (#366)
  • Fix setting tags = ["trace", "timings"] on a rule. (#378)
  • Kotlin 1.4 (#363)
  • Support multiple source jars (#377)
  • Bump serialization runtime to compatible version (#382)
  • Add option rules for kotlinc and javac. (#383, #385)
  • Expose kt_kotlinc_options and kt_javac_options (#386)
  • Make kt_compiler_plugin work with android_binary (#388)
  • Support the new Kotlin IR backend (#384)
  • Add warning as error to the warn option. (b7f5832)
  • Major rework of the compiler plugin infrastructure (#393)
    • plugins now require an ID (formerly optional)
    • plugins run in specific phases (kapt stubs, compile)
    • compiler plugins may be exported via exported_compiler_plugins (similar to exported_plugins on java_library)
    • some bash substitutions in working directory arguments in plugins (anvil example demonstrates)
  • Option to tag a rule as kt_abi_plugin_incompatible (#362) …
  • Fix java_plugins to work with Android rules (#407)
  • Include KAPT generated source jars as Kotlin builder inputs (#410)
  • Unify experimental java builder + abi jar flags (#411)
  • Many more minor fixes.

More detail can be found in the Changelog

Usage instructions can be found in the readme README

This release includes the contributions of various Googlers as well as @cgruber, @justhecuke, @szinn, @rockwotj, @IljaKroonen, @benjaminRomano, @factuno-db, @arturdryomov, @restingbull, @jongerrish, @BenHenning, @gertvdijk, @dotdat, @fkorotkov, @Wyverald, @Bencodes, @Kernald, @meteorcloudy, @comius.

Kotlin Rules 1.5.0 (Alpha 2)

30 Dec 17:35
404d3b3
Compare
Choose a tag to compare
Pre-release

Kotlin rules for Bazel - Legacy Rules 1.5.0

Note: These rules are maintained externally by volunteers (with Google's approval)

Note: The "legacy" prefix will be dropped as of this release. These are the rules, from this point on, until and unless Google chooses to externalize internal rules, at which point we can differentiate.

Note: legacy-1.4.0 isn't released, and this release includes all features in that line of development. Many of those changes are included in this list.

Alpha 2 Revisions

  • JavaBuilder compilation prerelease available for testing using: --define=experimental_use_abi_jars=1
  • jdeps automatically generated from kt_jvm_library rules.
  • Support for kt_kotlinc_options to kt_jvm_library. Library options supersede toolchain options.
  • Added kt_kotlinc_options:
Name Description Type Mandatory Default
include_stdlibs Don't automatically include the Kotlin standard libraries into the classpath (stdlib and reflect). String optional "all"
warn Control warning behaviour. String optional "report"
x_allow_jvm_ir_dependencies Suppress errors thrown when using dependencies not compiled by the IR backend. Boolean optional False
x_allow_result_return_type Enable kotlin.Result as a return type Boolean optional False
x_inline_classes Enable experimental inline classes Boolean optional False
x_jvm_default Specifies that a JVM default method should be generated for non-abstract Kotlin interface member. String optional "off"
x_no_optimized_callable_references Do not use optimized callable reference superclasses. Available from 1.4. Boolean optional False
x_skip_prerelease_check Suppress errors thrown when using pre-release classes. Boolean optional False

Notable changes:

  • Releases are now precompiled, suggested production installation is via a release archive. Please see the Development Guide
  • when running from a non-archive repository. (#271)
  • Support for Kotlin compiler plugins via the kt_compiler_plugin (#308)
  • Improved determinism for remote builds (#304)
  • No longer packages non-kotlin generated sources (#263)
  • Proper classpath handling for java plugins (#318)
  • Support for propagating Kotlin version to Intellij (#242 )
  • Fixes to release artifact production (#326, #327)
  • Restructure the worker to be deterministic (cc039db, 3f4698a)
  • Support to compilation using kotlin abi and java ijars. (#294, #347)
  • Add support for Android data-binding when building with Kotlin (#346)
  • Add 0 to allowed package name characters (#364)
  • Specify what the compile_jar value should be when building the library (#341)
  • Separate --Xplugin options to support multiple compiler plugins at a time (#366)
  • Fix setting tags = ["trace", "timings"] on a rule. (#378)
  • Kotlin 1.4 (#363)
  • Support multiple source jars (#377)
  • Bump serialization runtime to compatible version (#382)
  • Add option rules for kotlinc and javac. (#383, #385)
  • Expose kt_kotlinc_options and kt_javac_options (#386)
  • Make kt_compiler_plugin work with android_binary (#388)
  • Support the new Kotlin IR backend (#384)
  • Add warning as error to the warn option. (b7f5832)
  • Major rework of the compiler plugin infrastructure (#393)
    • plugins now require an ID (formerly optional)
    • plugins run in specific phases (kapt stubs, compile)
    • compiler plugins may be exported via exported_compiler_plugins (similar to exported_plugins on java_library)
    • some bash substitutions in working directory arguments in plugins (anvil example demonstrates)
  • Option to tag a rule as kt_abi_plugin_incompatible (#362) …
  • Fix java_plugins to work with Android rules (#407)
  • Include KAPT generated source jars as Kotlin builder inputs (#410)
  • Unify experimental java builder + abi jar flags (#411)
  • Many more minor fixes.

More detail can be found in the Changelog

Usage instructions can be found in the readme README

This release includes the contributions of various Googlers as well as @cgruber, @justhecuke, @szinn, @rockwotj, @IljaKroonen, @benjaminRomano, @factuno-db, @arturdryomov, @restingbull, @jongerrish, @BenHenning, @gertvdijk, @dotdat, @fkorotkov, @Wyverald, @Bencodes, @Kernald, @meteorcloudy, @comius.

Legacy Kotlin Rules 1.5.0 (Alpha 1)

04 Dec 00:53
858c0e7
Compare
Choose a tag to compare
Pre-release

Kotlin rules for Bazel - Legacy Rules 1.5.0

Note: These rules are maintained externally by volunteers (with Google's approval)

Note: The "legacy" prefix will be dropped as of this release. These are the rules, from this point on, until and unless Google chooses to externalize internal rules, at which point we can differentiate.

Note: legacy-1.4.0 isn't released, and thie release includes all features in that line of development. Many of those changes are included in this list.

Notable changes:

  • Releases are now precompiled, suggested production installation is via a release archive. Please see the Development Guide
  • when running from a non-archive repository. (#271)
  • Support for Kotlin compiler plugins via the kt_compiler_plugin (#308)
  • Improved determinism for remote builds (#304)
  • No longer packages non-kotlin generated sources (#263)
  • Proper classpath handling for java plugins (#318)
  • Support for propagating Kotlin version to Intellij (#242 )
  • Fixes to release artifact production (#326, #327)
  • Restructure the worker to be deterministic (cc039db, 3f4698a)
  • Support to compilation using kotlin abi and java ijars. (#294, #347)
  • Add support for Android data-binding when building with Kotlin (#346)
  • Add 0 to allowed package name characters (#364)
  • Specify what the compile_jar value should be when building the library (#341)
  • Separate --Xplugin options to support multiple compiler plugins at a time (#366)
  • Fix setting tags = ["trace", "timings"] on a rule. (#378)
  • Kotlin 1.4 (#363)
  • Support multiple source jars (#377)
  • Bump serialization runtime to compatible version (#382)
  • Add option rules for kotlinc and javac. (#383, #385)
  • Expose kt_kotlinc_options and kt_javac_options (#386)
  • Make kt_compiler_plugin work with android_binary (#388)
  • Support the new Kotlin IR backend (#384)
  • Add warning as error to the warn option. (b7f5832)
  • Major rework of the compiler plugin infrastructure (#393)
    • plugins now require an ID (formerly optional)
    • plugins run in specific phases (kapt stubs, compile)
    • compiler plugins may be exported via exported_compiler_plugins (similar to exported_plugins on java_library)
    • some bash substitutions in working directory arguments in plugins (anvil example demonstrates)
  • Option to tag a rule as kt_abi_plugin_incompatible (#362) …
  • Fix java_plugins to work with Android rules (#407)
  • Include KAPT generated source jars as Kotlin builder inputs (#410)
  • Unify experimental java builder + abi jar flags (#411)
  • Many more minor fixes.

More detail can be found in the Changelog

Usage instructions can be found in the readme README

This release includes the contributions of various Googlers as well as @cgruber, @justhecuke, @szinn, @rockwotj, @IljaKroonen, @benjaminRomano, @factuno-db, @arturdryomov, @restingbull, @jongerrish, @BenHenning, @gertvdijk, @dotdat, @fkorotkov, @Wyverald, @Bencodes, @Kernald, @meteorcloudy, @comius.

Legacy Kotlin Rules 1.4.0 (Release Candidate 4)

16 Nov 09:03
Compare
Choose a tag to compare

Kotlin rules for Bazel - Legacy Rules 1.4.0

Note: These rules are maintained externally from Google (with Google's oversight and help)

Housekeeping release. Improvements to the underlying infrastructure of the rules to improve performance and correctness.

Notable changes:

  • Releases are now precompiled, suggested production installation is via a release archive. Please see the Development Guide when running from a non-archive repository. (#271)
  • Support for Kotlin compiler plugins via the kt_compiler_plugin (#308)
  • Improved determinism for remote builds (#304)
  • No longer packages non-kotlin generated sources (#263)
  • Proper classpath handling for java plugins (#318)
  • Support for propagating Kotlin version to Intellij (#242 )
  • Fixes to release artifact production (#326, #327)
  • Restructure the worker to be deterministic (cc039db, 3f4698a)
  • Minor cleanups (dc7fd1a)
  • Fix release packaging to exclude references to non-release targets. (19658cd)

Note: Some fixes on release branch have not yet been integrated into master, and so have only commits, not pull requests.

More detail can be found in the Changelog

Usage instructions can be found in the readme README

This release includes the contributions of various Googlers as well as @cgruber, @justhecuke, @szinn, @rockwotj, @IljaKroonen, @benjaminRomano, @factuno-db, @arturdryomov, @restingbull.