-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
59 lines (53 loc) · 1.73 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
load(
"@io_bazel_rules_kotlin//kotlin:jvm.bzl",
"kt_javac_options",
"kt_jvm_import",
)
load(
"@io_bazel_rules_kotlin//kotlin:core.bzl",
"define_kt_toolchain",
"kt_compiler_plugin",
"kt_kotlinc_options",
)
# Kotlin Toolchain
kt_kotlinc_options(
name = "kt_kotlinc_options",
)
kt_javac_options(
name = "kt_javac_options",
)
define_kt_toolchain(
name = "kotlin_toolchain",
api_version = "1.6",
experimental_use_abi_jars = True,
javac_options = "//:kt_javac_options",
jvm_target = "11",
kotlinc_options = "//:kt_kotlinc_options",
language_version = "1.6",
)
# Jetpack Compose Compiler
kt_compiler_plugin(
name = "jetpack_compose_compiler_plugin",
id = "androidx.compose.compiler",
target_embedded_compiler = True,
visibility = ["//visibility:public"],
deps = [
"@maven//:androidx_compose_compiler_compiler",
],
)
# Add missing 'sun.misc' files to coroutines artifact
# Used in 'override_targets' by referencing @//:kotlinx_coroutines_core_jvm
# The versions must also match in /WORKSPACE
KOTLINX_COROUTINES_VERSION = "1.6.0"
kt_jvm_import(
name = "kotlinx_coroutines_core_jvm",
jars = [
"@maven_secondary//:v1/https/repo1.maven.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core-jvm/{version}/kotlinx-coroutines-core-jvm-{version}.jar".format(version = KOTLINX_COROUTINES_VERSION),
],
srcjar = "@maven_secondary//:v1/https/repo1.maven.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core-jvm/{version}/kotlinx-coroutines-core-jvm-{version}.jar".format(version = KOTLINX_COROUTINES_VERSION),
visibility = ["//visibility:public"],
deps = [
"//third_party:sun_misc",
"@maven//:org_jetbrains_kotlin_kotlin_stdlib",
],
)