Skip to content

Commit

Permalink
Delete unused method JavaInfo.isJavaLibraryesqueTarget
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 721682447
Change-Id: Ib05dece16ca15b362b1c8c37678ef975732c50e0
  • Loading branch information
hvadehra authored and copybara-github committed Jan 31, 2025
1 parent 7ee232b commit 3b3d0af
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,6 @@ public sealed class JavaInfo extends NativeInfo

@SerializationConstant public static final JavaInfoProvider PROVIDER = new JavaInfoProvider();

// Ideally we would check if the target has a JavaInfo, but this check predates the Starlark
// sandwich and consumers depend on this returning `false` for java_binary/java_test targets. When
// these are in Starlark, this check will need to exclude the latter targets by checking for
// `JavaInfo._is_binary`
public static boolean isJavaLibraryesqueTarget(TransitiveInfoCollection target)
throws RuleErrorException {
return JavaInfo.getCompilationArgsProvider(target).isPresent();
}

public static NestedSet<Artifact> transitiveRuntimeJars(TransitiveInfoCollection target)
throws RuleErrorException {
return transformStarlarkDepsetApi(target, JavaInfo::getTransitiveRuntimeJars);
Expand Down

0 comments on commit 3b3d0af

Please sign in to comment.