diff --git a/kotlin/internal/jvm/impl.bzl b/kotlin/internal/jvm/impl.bzl index 5c5d86d..fa86a71 100644 --- a/kotlin/internal/jvm/impl.bzl +++ b/kotlin/internal/jvm/impl.bzl @@ -73,7 +73,10 @@ def _unify_jars(ctx): else: # Legacy handling. jars = [] - source_jars = [ctx.file.srcjar] if ctx.file.srcjar else [] + if (ctx.file.srcjar and not "%s" % ctx.file.srcjar.path == "third_party/empty.jar"): + source_jars = [ctx.file.srcjar] + else: + source_jars = [] # TODO after a while remove the for block, the checks after it,and simplify the source-jar to jar allignment. # There must be a single jar jar and it can either be a filegroup or a JavaInfo. @@ -98,9 +101,7 @@ def _unify_jars(ctx): fail("got more than one jar, this is an error create an issue: %s" % jars) if len(source_jars) > 1: fail("got more than one source jar. " + - "Did you include both srcjar and a sources jar in the jars attribute?: " + - jars) - print(source_jars) + "Did you include both srcjar and a sources jar in the jars attribute?: %s" % source_jars) return struct(class_jar = jars[0], source_jar = source_jars[0] if len(source_jars) == 1 else None, ijar = None) def kt_jvm_import_impl(ctx):