kt_javac_options

Define java compiler options for kt_jvm_* rules with java sources.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
add_exportsExport internal jdk apisList of stringsoptional[]
releaseCompile for the specified Java SE releaseStringoptional"default"
warnControl warning behaviour.Stringoptional"report"
x_ep_disable_all_checksSee javac -XepDisableAllChecks documentationBooleanoptionalFalse
x_explicit_api_modeEnable explicit API mode for Kotlin libraries.Stringoptional"off"
x_lintSee javac -Xlint: documentationList of stringsoptional[]
xd_suppress_notesSee javac -XDsuppressNotes documentationBooleanoptionalFalse

kt_jvm_binary

Builds a Java archive (“jar file”), plus a wrapper shell script with the same name as the rule. The wrapper shell script uses a classpath that includes, among other things, a jar file for each library on which the binary depends.

Note: This rule does not have all of the features found in java_binary. It is appropriate for building workspace utilities. java_binary should be preferred for release artefacts.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
depsA list of dependencies of this rule.See general comments about deps at Attributes common to all build rules.List of labelsoptional[]
srcsThe list of source files that are processed to create the target, this can contain both Java and Kotlin files. Java analysis occurs first so Kotlin classes may depend on Java classes in the same compilation unit.List of labelsoptional[]
dataThe list of files needed by this rule at runtime. See general comments about data at Attributes common to all build rules.List of labelsoptional[]
resourcesA list of files that should be include in a Java jar.List of labelsoptional[]
associatesKotlin deps who should be considered part of the same module/compilation-unit for the purposes of “internal” access. Such deps must all share the same module space and so a target cannot associate to two deps from two different modules.List of labelsoptional[]
javac_optsJavac options to be used when compiling this target. These opts if provided will be used instead of the ones provided to the toolchain.LabeloptionalNone
jvm_flagsA list of flags to embed in the wrapper script generated for running this binary. Note: does not yet support make variable substitution.List of stringsoptional[]
kotlinc_optsKotlinc options to be used when compiling this target. These opts if provided will be used instead of the ones provided to the toolchain.LabeloptionalNone
main_className of class with main() method to use as entry point.Stringrequired
module_nameThe name of the module, if not provided the module name is derived from the label. --e.g., //some/package/path:label_name is translated to some_package_path-label_name.Stringoptional""
plugins-List of labelsoptional[]
resource_jarsSet of archives containing Java resources. If specified, the contents of these jars are merged into the output jar.List of labelsoptional[]
resource_strip_prefixThe path prefix to strip from Java resources, files residing under common prefix such as src/main/resources or src/test/resources or kotlin will have stripping applied by convention.Stringoptional""
runtime_depsLibraries to make available to the final binary or test at runtime only. Like ordinary deps, these will appear on the runtime classpath, but unlike them, not on the compile-time classpath.List of labelsoptional[]

kt_jvm_import

Import Kotlin jars.

examples

# Old style usage -- reference file groups, do not used this.
kt_jvm_import(
    name = "kodein",
    jars = [
        "@com_github_salomonbrys_kodein_kodein//jar:file",
        "@com_github_salomonbrys_kodein_kodein_core//jar:file"
    ]
)

# This style will pull in the transitive runtime dependencies of the targets as well.
kt_jvm_import(
    name = "kodein",
    jars = [
        "@com_github_salomonbrys_kodein_kodein//jar",
        "@com_github_salomonbrys_kodein_kodein_core//jar"
    ]
)

# Import a single kotlin jar.
kt_jvm_import(
    name = "kotlin-stdlib",
    jars = ["lib/kotlin-stdlib.jar"],
    srcjar = "lib/kotlin-stdlib-sources.jar"
)

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
depsCompile and runtime dependenciesList of labelsoptional[]
exported_compiler_pluginsExported compiler plugins.

Compiler plugins listed here will be treated as if they were added in the plugins attribute of any targets that directly depend on this target. Like java_plugins' exported_plugins, this is not transitive
List of labelsoptional[]
exportsExported libraries.

Deps listed here will be made available to other rules, as if the parents explicitly depended on these deps. This is not true for regular (non-exported) deps.
List of labelsoptional[]
jarThe jar listed here is equivalent to an export attribute.LabeloptionalNone
jarsThe jars listed here are equavalent to an export attribute. The label should be either to a single class jar, or one or more filegroup labels. The filegroups, when resolved, must contain only one jar containing classes, and (optionally) one peer file containing sources, named <jarname>-sources.jar.

DEPRECATED - please use jar and srcjar attributes.
List of labelsoptional[]
neverlinkIf true only use this library for compilation and not at runtime.BooleanoptionalFalse
runtime_depsAdditional runtime deps.List of labelsoptional[]
srcjarThe sources for the class jar.Labeloptional"@rules_kotlin//third_party:empty.jar"

kt_jvm_library

This rule compiles and links Kotlin and Java sources into a .jar file.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
depsA list of dependencies of this rule.See general comments about deps at Attributes common to all build rules.List of labelsoptional[]
srcsThe list of source files that are processed to create the target, this can contain both Java and Kotlin files. Java analysis occurs first so Kotlin classes may depend on Java classes in the same compilation unit.List of labelsoptional[]
dataThe list of files needed by this rule at runtime. See general comments about data at Attributes common to all build rules.List of labelsoptional[]
resourcesA list of files that should be include in a Java jar.List of labelsoptional[]
associatesKotlin deps who should be considered part of the same module/compilation-unit for the purposes of “internal” access. Such deps must all share the same module space and so a target cannot associate to two deps from two different modules.List of labelsoptional[]
exported_compiler_pluginsExported compiler plugins.

Compiler plugins listed here will be treated as if they were added in the plugins attribute of any targets that directly depend on this target. Like java_plugins exported_plugins, this is not transitive
List of labelsoptional[]
exportsExported libraries.

Deps listed here will be made available to other rules, as if the parents explicitly depended on these deps. This is not true for regular (non-exported) deps.
List of labelsoptional[]
javac_optsJavac options to be used when compiling this target. These opts if provided will be used instead of the ones provided to the toolchain.LabeloptionalNone
kotlinc_optsKotlinc options to be used when compiling this target. These opts if provided will be used instead of the ones provided to the toolchain.LabeloptionalNone
module_nameThe name of the module, if not provided the module name is derived from the label. --e.g., //some/package/path:label_name is translated to some_package_path-label_name.Stringoptional""
neverlinkIf true only use this library for compilation and not at runtime.BooleanoptionalFalse
plugins-List of labelsoptional[]
resource_jarsSet of archives containing Java resources. If specified, the contents of these jars are merged into the output jar.List of labelsoptional[]
resource_strip_prefixThe path prefix to strip from Java resources, files residing under common prefix such as src/main/resources or src/test/resources or kotlin will have stripping applied by convention.Stringoptional""
runtime_depsLibraries to make available to the final binary or test at runtime only. Like ordinary deps, these will appear on the runtime classpath, but unlike them, not on the compile-time classpath.List of labelsoptional[]

kt_jvm_test

Setup a simple kotlin_test.

Notes:

  • The kotlin test library is not added implicitly, it is available with the label @rules_kotlin//kotlin/compiler:kotlin-test.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
depsA list of dependencies of this rule.See general comments about deps at Attributes common to all build rules.List of labelsoptional[]
srcsThe list of source files that are processed to create the target, this can contain both Java and Kotlin files. Java analysis occurs first so Kotlin classes may depend on Java classes in the same compilation unit.List of labelsoptional[]
dataThe list of files needed by this rule at runtime. See general comments about data at Attributes common to all build rules.List of labelsoptional[]
resourcesA list of files that should be include in a Java jar.List of labelsoptional[]
associatesKotlin deps who should be considered part of the same module/compilation-unit for the purposes of “internal” access. Such deps must all share the same module space and so a target cannot associate to two deps from two different modules.List of labelsoptional[]
envSpecifies additional environment variables to set when the target is executed by bazel test.Dictionary: String -> Stringoptional{}
javac_optsJavac options to be used when compiling this target. These opts if provided will be used instead of the ones provided to the toolchain.LabeloptionalNone
jvm_flagsA list of flags to embed in the wrapper script generated for running this binary. Note: does not yet support make variable substitution.List of stringsoptional[]
kotlinc_optsKotlinc options to be used when compiling this target. These opts if provided will be used instead of the ones provided to the toolchain.LabeloptionalNone
main_class-Stringoptional"com.google.testing.junit.runner.BazelTestRunner"
module_nameThe name of the module, if not provided the module name is derived from the label. --e.g., //some/package/path:label_name is translated to some_package_path-label_name.Stringoptional""
plugins-List of labelsoptional[]
resource_jarsSet of archives containing Java resources. If specified, the contents of these jars are merged into the output jar.List of labelsoptional[]
resource_strip_prefixThe path prefix to strip from Java resources, files residing under common prefix such as src/main/resources or src/test/resources or kotlin will have stripping applied by convention.Stringoptional""
runtime_depsLibraries to make available to the final binary or test at runtime only. Like ordinary deps, these will appear on the runtime classpath, but unlike them, not on the compile-time classpath.List of labelsoptional[]
test_classThe Java class to be loaded by the test runner.Stringoptional""

ktlint_config

Used to configure ktlint.

ktlint can be configured to use a .editorconfig, as documented at https://github.com/pinterest/ktlint/#editorconfig

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
android_rules_enabledTurn on Android Kotlin Style Guide compatibilityBooleanoptionalFalse
editorconfigEditor config file to useLabeloptionalNone
experimental_rules_enabledTurn on experimental rules (ktlint-ruleset-experimental)BooleanoptionalFalse

ktlint_fix

Lint Kotlin files and automatically fix them as needed

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
srcsSource files to review and fixList of labelsrequired
configktlint_config to useLabeloptionalNone

ktlint_test

Lint Kotlin files, and fail if the linter raises errors.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
srcsSource files to lintList of labelsrequired
configktlint_config to useLabeloptionalNone

kt_compiler_plugin

Define a plugin for the Kotlin compiler to run. The plugin can then be referenced in the plugins attribute of the kt_jvm_* rules.

An example can be found under //examples/plugin:

kt_compiler_plugin(
    name = "open_for_testing_plugin",
    id = "org.jetbrains.kotlin.allopen",
    options = {
        "annotation": "plugin.OpenForTesting",
    },
    deps = [
        "//kotlin/compiler:allopen-compiler-plugin",
    ],
)

kt_jvm_library(
    name = "open_for_testing",
    srcs = ["OpenForTesting.kt"],
)

kt_jvm_library(
    name = "user",
    srcs = ["User.kt"],
    plugins = [":open_for_testing_plugin"],
    deps = [
        ":open_for_testing",
    ],
)

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
depsThe list of libraries to be added to the compiler's plugin classpathList of labelsoptional[]
compile_phaseRuns the compiler plugin during kotlin compilation. Known examples: allopen, sam_with_recieverBooleanoptionalTrue
idThe ID of the pluginStringrequired
optionsDictionary of options to be passed to the plugin. Supports the following template values:

- {generatedClasses}: directory for generated class output - {temp}: temporary directory, discarded between invocations - {generatedSources}: directory for generated source output - {classpath} : replaced with a list of jars separated by the filesystem appropriate separator.
Dictionary: String -> Stringoptional{}
stubs_phaseRuns the compiler plugin in kapt stub generation.BooleanoptionalTrue
target_embedded_compilerPlugin was compiled against the embeddable kotlin compiler. These plugins expect shaded kotlinc dependencies, and will fail when running against a non-embeddable compiler.BooleanoptionalFalse

kt_javac_options

Define java compiler options for kt_jvm_* rules with java sources.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
add_exportsExport internal jdk apisList of stringsoptional[]
releaseCompile for the specified Java SE releaseStringoptional"default"
warnControl warning behaviour.Stringoptional"report"
x_ep_disable_all_checksSee javac -XepDisableAllChecks documentationBooleanoptionalFalse
x_explicit_api_modeEnable explicit API mode for Kotlin libraries.Stringoptional"off"
x_lintSee javac -Xlint: documentationList of stringsoptional[]
xd_suppress_notesSee javac -XDsuppressNotes documentationBooleanoptionalFalse

kt_kotlinc_options

Define kotlin compiler options.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
include_stdlibsDon't automatically include the Kotlin standard libraries into the classpath (stdlib and reflect).Stringoptional"all"
java_parametersGenerate metadata for Java 1.8+ reflection on method parameters.BooleanoptionalFalse
jvm_targetThe -jvm_target flag. This is only tested at 1.8.Stringoptional""
warnControl warning behaviour.Stringoptional"report"
x_allow_result_return_typeEnable kotlin.Result as a return typeBooleanoptionalFalse
x_assertionsConfigures how assertions are handled. The ‘jvm’ option enables assertions in JVM code.Stringoptional""
x_backend_threadsWhen using the IR backend, run lowerings by file in N parallel threads. 0 means use a thread per processor core. Default value is 1.Integeroptional1
x_context_receiversEnable experimental context receivers.BooleanoptionalFalse
x_emit_jvm_type_annotationsBasic support for type annotations in JVM bytecode.BooleanoptionalFalse
x_enable_incremental_compilationEnable incremental compilationBooleanoptionalFalse
x_explicit_api_modeEnable explicit API mode for Kotlin libraries.Stringoptional"off"
x_inline_classesEnable experimental inline classesBooleanoptionalFalse
x_jdk_releaseThe -jvm_target flag. This is only tested at 1.8.Stringoptional""
x_jspecify_annotationsControls how JSpecify annotations are treated. Options are ‘default’, ‘ignore’, ‘warn’, and ‘strict’.Stringoptional""
x_jsr_305Specifies how to handle JSR-305 annotations in Kotlin code. Options are ‘default’, ‘ignore’, ‘warn’, and ‘strict’.Stringoptional""
x_jvm_defaultSpecifies that a JVM default method should be generated for non-abstract Kotlin interface member.Stringoptional"off"
x_lambdasChange codegen behavior of lambdasStringoptional"class"
x_multi_platformEnable experimental language support for multi-platform projectsBooleanoptionalFalse
x_no_call_assertionsDon't generate not-null assertions for arguments of platform typesBooleanoptionalFalse
x_no_optimizeDisable optimizationsBooleanoptionalFalse
x_no_optimized_callable_referencesDo not use optimized callable reference superclasses. Available from 1.4.BooleanoptionalFalse
x_no_param_assertionsDon't generate not-null assertions on parameters of methods accessible from JavaBooleanoptionalFalse
x_no_receiver_assertionsDon't generate not-null assertion for extension receiver arguments of platform typesBooleanoptionalFalse
x_no_source_debug_extensionDo not generate @kotlin.jvm.internal.SourceDebugExtension annotation on a class with the copy of SMAPBooleanoptionalFalse
x_optinDefine APIs to opt-in to.List of stringsoptional[]
x_report_perfReport detailed performance statisticsBooleanoptionalFalse
x_sam_conversionsChange codegen behavior of SAM/functional interfacesStringoptional"class"
x_skip_prerelease_checkSuppress errors thrown when using pre-release classes.BooleanoptionalFalse
x_suppress_version_warningsSuppress warnings about outdated, inconsistent, or experimental language or API versions.BooleanoptionalFalse
x_type_enhancement_improvements_strict_modeEnables strict mode for type enhancement improvements, enforcing stricter type checking and enhancements.BooleanoptionalFalse
x_use_fir_ltCompile using LightTree parser with Front-end IR. Warning: this feature is far from being production-readyBooleanoptionalFalse
x_use_k2Compile using experimental K2. K2 is a new compiler pipeline, no compatibility guarantees are yet providedBooleanoptionalFalse

kt_ksp_plugin

Define a KSP plugin for the Kotlin compiler to run. The plugin can then be referenced in the plugins attribute of the kt_jvm_* and kt_android_* rules.

An example can be found under //examples/ksp:

kt_ksp_plugin(
    name = "moshi-kotlin-codegen",
    processor_class = "com.squareup.moshi.kotlin.codegen.ksp.JsonClassSymbolProcessorProvider",
    deps = [
        "@maven//:com_squareup_moshi_moshi",
        "@maven//:com_squareup_moshi_moshi_kotlin",
        "@maven//:com_squareup_moshi_moshi_kotlin_codegen",
    ],
)

kt_jvm_library(
    name = "lib",
    srcs = glob(["*.kt"]),
    plugins = ["//:moshi-kotlin-codegen"],
)

**ATTRIBUTES**


| Name  | Description | Type | Mandatory | Default |
| :------------- | :------------- | :------------- | :------------- | :------------- |
| <a id="kt_ksp_plugin-name"></a>name |  A unique name for this target.   | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required |  |
| <a id="kt_ksp_plugin-deps"></a>deps |  The list of libraries to be added to the compiler's plugin classpath   | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional |  `[]`  |
| <a id="kt_ksp_plugin-generates_java"></a>generates_java |  Runs Java compilation action for plugin generating Java output.   | Boolean | optional |  `False`  |
| <a id="kt_ksp_plugin-processor_class"></a>processor_class |  The fully qualified class name that the Java compiler uses as an entry point to the annotation processor.   | String | required |  |
| <a id="kt_ksp_plugin-target_embedded_compiler"></a>target_embedded_compiler |  Plugin was compiled against the embeddable kotlin compiler. These plugins expect shaded kotlinc dependencies, and will fail when running against a non-embeddable compiler.   | Boolean | optional |  `False`  |


<a id="kt_plugin_cfg"></a>

## kt_plugin_cfg

<pre>
load("@rules_kotlin//kotlin:core.bzl", "kt_plugin_cfg")

kt_plugin_cfg(<a href="#kt_plugin_cfg-name">name</a>, <a href="#kt_plugin_cfg-deps">deps</a>, <a href="#kt_plugin_cfg-options">options</a>, <a href="#kt_plugin_cfg-plugin">plugin</a>)
</pre>

Configurations for kt_compiler_plugin, ksp_plugin, and java_plugin.

This allows setting options and dependencies independently from the initial plugin definition.

**ATTRIBUTES**


| Name  | Description | Type | Mandatory | Default |
| :------------- | :------------- | :------------- | :------------- | :------------- |
| <a id="kt_plugin_cfg-name"></a>name |  A unique name for this target.   | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required |  |
| <a id="kt_plugin_cfg-deps"></a>deps |  Dependencies for this configuration.   | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional |  `[]`  |
| <a id="kt_plugin_cfg-options"></a>options |  A dictionary of flag to values to be used as plugin configuration options.   | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> List of strings</a> | optional |  `{}`  |
| <a id="kt_plugin_cfg-plugin"></a>plugin |  The plugin to associate with this configuration   | <a href="https://bazel.build/concepts/labels">Label</a> | required |  |


<a id="define_kt_toolchain"></a>

## define_kt_toolchain

<pre>
load("@rules_kotlin//kotlin:core.bzl", "define_kt_toolchain")

define_kt_toolchain(<a href="#define_kt_toolchain-name">name</a>, <a href="#define_kt_toolchain-language_version">language_version</a>, <a href="#define_kt_toolchain-api_version">api_version</a>, <a href="#define_kt_toolchain-jvm_target">jvm_target</a>, <a href="#define_kt_toolchain-experimental_use_abi_jars">experimental_use_abi_jars</a>,
                    <a href="#define_kt_toolchain-experimental_strict_kotlin_deps">experimental_strict_kotlin_deps</a>, <a href="#define_kt_toolchain-experimental_report_unused_deps">experimental_report_unused_deps</a>,
                    <a href="#define_kt_toolchain-experimental_reduce_classpath_mode">experimental_reduce_classpath_mode</a>, <a href="#define_kt_toolchain-experimental_multiplex_workers">experimental_multiplex_workers</a>, <a href="#define_kt_toolchain-javac_options">javac_options</a>,
                    <a href="#define_kt_toolchain-kotlinc_options">kotlinc_options</a>, <a href="#define_kt_toolchain-jvm_stdlibs">jvm_stdlibs</a>, <a href="#define_kt_toolchain-jvm_runtime">jvm_runtime</a>, <a href="#define_kt_toolchain-jacocorunner">jacocorunner</a>, <a href="#define_kt_toolchain-exec_compatible_with">exec_compatible_with</a>,
                    <a href="#define_kt_toolchain-target_compatible_with">target_compatible_with</a>, <a href="#define_kt_toolchain-target_settings">target_settings</a>)
</pre>

Define the Kotlin toolchain.

**PARAMETERS**


| Name  | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="define_kt_toolchain-name"></a>name |  <p align="center"> - </p>   |  none |
| <a id="define_kt_toolchain-language_version"></a>language_version |  <p align="center"> - </p>   |  `None` |
| <a id="define_kt_toolchain-api_version"></a>api_version |  <p align="center"> - </p>   |  `None` |
| <a id="define_kt_toolchain-jvm_target"></a>jvm_target |  <p align="center"> - </p>   |  `None` |
| <a id="define_kt_toolchain-experimental_use_abi_jars"></a>experimental_use_abi_jars |  <p align="center"> - </p>   |  `False` |
| <a id="define_kt_toolchain-experimental_strict_kotlin_deps"></a>experimental_strict_kotlin_deps |  <p align="center"> - </p>   |  `None` |
| <a id="define_kt_toolchain-experimental_report_unused_deps"></a>experimental_report_unused_deps |  <p align="center"> - </p>   |  `None` |
| <a id="define_kt_toolchain-experimental_reduce_classpath_mode"></a>experimental_reduce_classpath_mode |  <p align="center"> - </p>   |  `None` |
| <a id="define_kt_toolchain-experimental_multiplex_workers"></a>experimental_multiplex_workers |  <p align="center"> - </p>   |  `None` |
| <a id="define_kt_toolchain-javac_options"></a>javac_options |  <p align="center"> - </p>   |  `Label("@rules_kotlin//kotlin/internal:default_javac_options")` |
| <a id="define_kt_toolchain-kotlinc_options"></a>kotlinc_options |  <p align="center"> - </p>   |  `Label("@rules_kotlin//kotlin/internal:default_kotlinc_options")` |
| <a id="define_kt_toolchain-jvm_stdlibs"></a>jvm_stdlibs |  <p align="center"> - </p>   |  `None` |
| <a id="define_kt_toolchain-jvm_runtime"></a>jvm_runtime |  <p align="center"> - </p>   |  `None` |
| <a id="define_kt_toolchain-jacocorunner"></a>jacocorunner |  <p align="center"> - </p>   |  `None` |
| <a id="define_kt_toolchain-exec_compatible_with"></a>exec_compatible_with |  <p align="center"> - </p>   |  `None` |
| <a id="define_kt_toolchain-target_compatible_with"></a>target_compatible_with |  <p align="center"> - </p>   |  `None` |
| <a id="define_kt_toolchain-target_settings"></a>target_settings |  <p align="center"> - </p>   |  `None` |


<a id="kt_register_toolchains"></a>

## kt_register_toolchains

<pre>
load("@rules_kotlin//kotlin:core.bzl", "kt_register_toolchains")

kt_register_toolchains()
</pre>

This macro registers the kotlin toolchain.



<!-- Generated with Stardoc: http://skydoc.bazel.build -->



<a id="kotlin_repositories"></a>

## kotlin_repositories

<pre>
load("@rules_kotlin//kotlin:repositories.doc.bzl", "kotlin_repositories")

kotlin_repositories(<a href="#kotlin_repositories-is_bzlmod">is_bzlmod</a>, <a href="#kotlin_repositories-compiler_repository_name">compiler_repository_name</a>, <a href="#kotlin_repositories-ksp_repository_name">ksp_repository_name</a>, <a href="#kotlin_repositories-compiler_release">compiler_release</a>,
                    <a href="#kotlin_repositories-ksp_compiler_release">ksp_compiler_release</a>)
</pre>

Call this in the WORKSPACE file to setup the Kotlin rules.

**PARAMETERS**


| Name  | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="kotlin_repositories-is_bzlmod"></a>is_bzlmod |  <p align="center"> - </p>   |  `False` |
| <a id="kotlin_repositories-compiler_repository_name"></a>compiler_repository_name |  for the kotlinc compiler repository.   |  `"com_github_jetbrains_kotlin"` |
| <a id="kotlin_repositories-ksp_repository_name"></a>ksp_repository_name |  <p align="center"> - </p>   |  `"com_github_google_ksp"` |
| <a id="kotlin_repositories-compiler_release"></a>compiler_release |  version provider from versions.bzl.   |  `struct(sha256 = "88d7d8bad362ae4e114a8b9668c6887b8c85f48e340883db0e317e47c8dc2f4f", url_templates = ["https://github.com/JetBrains/kotlin/releases/download/v{version}/kotlin-compiler-{version}.zip"], version = "2.0.10")` |
| <a id="kotlin_repositories-ksp_compiler_release"></a>ksp_compiler_release |  (internal) version provider from versions.bzl.   |  `struct(sha256 = "e6a79e649ee383b372fa982be89686c10ee42b25e60147b3271a70fd75a9eb19", url_templates = ["https://github.com/google/ksp/releases/download/{version}/artifacts.zip"], version = "2.0.10-1.0.24")` |


<a id="versions.use_repository"></a>

## versions.use_repository

<pre>
load("@rules_kotlin//kotlin:repositories.doc.bzl", "versions")

versions.use_repository(<a href="#versions.use_repository-name">name</a>, <a href="#versions.use_repository-version">version</a>, <a href="#versions.use_repository-rule">rule</a>, <a href="#versions.use_repository-kwargs">kwargs</a>)
</pre>



**PARAMETERS**


| Name  | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="versions.use_repository-name"></a>name |  <p align="center"> - </p>   |  none |
| <a id="versions.use_repository-version"></a>version |  <p align="center"> - </p>   |  none |
| <a id="versions.use_repository-rule"></a>rule |  <p align="center"> - </p>   |  none |
| <a id="versions.use_repository-kwargs"></a>kwargs |  <p align="center"> - </p>   |  none |