Skip to content

Commit

Permalink
Always add root srcjar for library sources
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 578659157
  • Loading branch information
Googler authored and copybara-github committed Nov 1, 2023
1 parent 76564cc commit dc4a9aa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ public ProjectProto.Project addSrcJars() {
private ImmutableList<ProjectPath> resolveSrcJarInnerPaths(Collection<ProjectPath> srcJars) {
ImmutableList.Builder<ProjectPath> newSrcJars = ImmutableList.builder();
for (ProjectPath srcJar : srcJars) {
newSrcJars.add(srcJar);
Path jarFile = resolver.resolve(srcJar);
Optional<Path> innerPath = findInnerJarPath(jarFile.toFile());
newSrcJars.add(innerPath.map(srcJar::withInnerJarPath).orElse(srcJar));
findInnerJarPath(jarFile.toFile()).map(srcJar::withInnerJarPath).ifPresent(newSrcJars::add);
}
return newSrcJars.build();
}
Expand Down

0 comments on commit dc4a9aa

Please sign in to comment.