Skip to content

Commit

Permalink
Allow resources to be in a kotlin directory (#268)
Browse files Browse the repository at this point in the history
* Allow resources to be in a kotlin directory

We just put everything in a `kotlin` directory (which the test rules allow for) so it'd be nice if resources also didn't need this prefix.

* Update docs
  • Loading branch information
richmowd411 committed Feb 14, 2020
1 parent 889c2ec commit 99e2934
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions kotlin/internal/jvm/compile.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def _fold_jars_action(ctx, rule_kind, output_jar, input_jars):
_CONVENTIONAL_RESOURCE_PATHS = [
"src/main/resources",
"src/test/resources",
"kotlin",
]

def _adjust_resources_path_by_strip_prefix(path, resource_strip_prefix):
Expand Down
2 changes: 1 addition & 1 deletion kotlin/internal/jvm/jvm.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ _common_attr = utils.add_dicts(
),
"resource_strip_prefix": attr.string(
doc = """The path prefix to strip from Java resources, files residing under common prefix such as
`src/main/resources` or `src/test/resources` will have stripping applied by convention.""",
`src/main/resources` or `src/test/resources` or `kotlin` will have stripping applied by convention.""",
default = "",
),
"resource_jars": attr.label_list(
Expand Down

0 comments on commit 99e2934

Please sign in to comment.