cherry some changes from android branch
diff --git a/.bazelproject b/.bazelproject index ea24aea..4dc8ce1 100644 --- a/.bazelproject +++ b/.bazelproject
@@ -18,7 +18,7 @@ targets: //:all_local_tests - //examples/... + //examples/dagger/... # These targets are built for the ide only. Primary purpose is to ensure the builder can build the targets, but it's # also a good way of testing the intellij plugin. //kotlin/builder/src/io/bazel/kotlin/builder:builder_kt_for_ide
diff --git a/.gitignore b/.gitignore index 101fc88..2ddea41 100644 --- a/.gitignore +++ b/.gitignore
@@ -1,2 +1,2 @@ **/bazel-* -.project/** +**/.project
diff --git a/kotlin/internal/jvm/jvm.bzl b/kotlin/internal/jvm/jvm.bzl index d155c1b..09a669e 100644 --- a/kotlin/internal/jvm/jvm.bzl +++ b/kotlin/internal/jvm/jvm.bzl
@@ -183,6 +183,21 @@ ), } +_lib_common_attr = _common_attr + { + "exports": attr.label_list( + doc = """Exported 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.""", + default = [], + providers = [JavaInfo], + ), + "neverlink": attr.bool( + doc = """If true only use this library for compilation and not at runtime.""", + default = False, + ), +} + _runnable_common_attr = _common_attr + { "jvm_flags": attr.string_list( doc = """A list of flags to embed in the wrapper script generated for running this binary. Note: does not yet @@ -201,20 +216,7 @@ kt_jvm_library = rule( doc = """This rule compiles and links Kotlin and Java sources into a .jar file.""", - attrs = _common_attr + { - "exports": attr.label_list( - doc = """Exported 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.""", - default = [], - providers = [JavaInfo], - ), - "neverlink": attr.bool( - doc = """If true only use this library for compilation and not at runtime.""", - default = False, - ), - }, + attrs = _lib_common_attr, outputs = _common_outputs, toolchains = [_TOOLCHAIN_TYPE], implementation = _kt_jvm_library_impl,