diff --git a/kotlin/rules.bzl b/kotlin/rules.bzl index f863f06..f151910 100644 --- a/kotlin/rules.bzl +++ b/kotlin/rules.bzl @@ -50,6 +50,11 @@ def _kotlin_compile_impl(ctx): for file in fileset: jars += [file] + # Populate from android dependencies + for dep in ctx.attr.android_deps: + if dep.android.defines_resources: + jars.append(dep.android.resource_jar.class_jar) + if jars: # De-duplicate jarsetlist = list(set(jars)) @@ -120,6 +125,11 @@ _kotlin_compile_attrs = { providers = ["java"], ), + # Dependent java rules. + "android_deps": attr.label_list( + providers = ["android"], + ), + # Not really implemented yet. "data": attr.label_list( allow_files = True,