From 0853411f89987690f8228137cf42dec5dbfc3b45 Mon Sep 17 00:00:00 2001 From: Tim Peut Date: Tue, 13 Feb 2024 10:42:50 -0800 Subject: [PATCH] Remove some unnecessary .to_list() calls PiperOrigin-RevId: 606674393 Change-Id: I62d7b85c5ae76e46bc212742564e3cf5d2a73906 --- mobile_install/r_java.bzl | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mobile_install/r_java.bzl b/mobile_install/r_java.bzl index 1b24ec8da..31cd55a0c 100644 --- a/mobile_install/r_java.bzl +++ b/mobile_install/r_java.bzl @@ -67,9 +67,6 @@ def _make_r_jar(ctx, r_java, packages, out_r_jar): content = "\n".join(packages.to_list()), ) - # Get the JVM options - jvm_opts = ctx.attr._java_toolchain[java_common.JavaToolchainInfo].jvm_opt.to_list() - rjar_args = ctx.actions.args() rjar_args.add("rjar") rjar_args.add("--jdk", utils.host_jvm_path(ctx)) @@ -78,15 +75,14 @@ def _make_r_jar(ctx, r_java, packages, out_r_jar): rjar_args.add("--pkgs", r_packages.path) rjar_args.add("--rjar", out_r_jar.path) rjar_args.add("--target_label", str(ctx.label)) - rjar_args.add_joined("--jvm_opts", jvm_opts, join_with = " ") + rjar_args.add_joined("--jvm_opts", ctx.attr._java_toolchain[java_common.JavaToolchainInfo].jvm_opt, join_with = " ") # Call action binary. ctx.actions.run( executable = ctx.executable._android_kit, arguments = [rjar_args], tools = ctx.attr._jar_tool.files, - inputs = ([r_packages, r_java] + - ctx.attr._java_jdk.files.to_list()), + inputs = depset([r_packages, r_java], transitive = [ctx.attr._java_jdk.files]), outputs = [out_r_jar], mnemonic = "RJar", progress_message = "MI RJar " + out_r_jar.path,