Skip to content

Commit

Permalink
[options] Add exports and fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
restingbull committed Nov 3, 2023
1 parent cfe427b commit f28fbbb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,13 @@ load("@rules_kotlin//kotlin:core.bzl", "kt_kotlinc_options", "kt_javac_options",

kt_kotlinc_options(
name = "kt_kotlinc_options",
kotlinc_opts = ["-Xno-param-assertions"],
x_no_param_assertions = True,
jvm_target = "1.8",
)

kt_javac_options(
name = "kt_javac_options",
javac_opts = ["-nowarn"],
warn = "off",
)

define_kt_toolchain(
Expand All @@ -230,16 +230,16 @@ load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library")

kt_kotlinc_options(
name = "kt_kotlinc_options_for_package_name",
kotlinc_opts = [
"-Xno-param-assertions",
"-Xopt-in=kotlin.Experimental",
"-Xopt-in=kotlin.ExperimentalStdlibApi",
x_no_param_assertions = True,
x_optin = [
"kotlin.Experimental",
"kotlin.ExperimentalStdlibApi",
],
)

kt_javac_options(
name = "kt_javac_options_for_package_name",
javac_opts = ["-nowarn"],
warn = "off"
)

kt_jvm_library(
Expand Down
10 changes: 10 additions & 0 deletions src/main/starlark/core/options/opts.javac.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ _JOPTS = {
"strict": ["-Xexplicit-api=strict"],
},
),
"add_exports": struct(
args = dict(
default = [],
doc = "Export internal jdk apis ",
),
type = attr.string_list,
value_to_flag = {
derive.info: derive.repeated_values_for("--add-exports="),
},
),
}

def _javac_options_impl(ctx):
Expand Down

0 comments on commit f28fbbb

Please sign in to comment.