Skip to content

Commit

Permalink
Also ignore module-info.class in multi-version Jars
Browse files Browse the repository at this point in the history
RELNOTES:
Also ignore module-info.class in multi-version Jars
PiperOrigin-RevId: 229531507
  • Loading branch information
Googler authored and Copybara-Service committed Jan 16, 2019
1 parent 4654b87 commit 019f13b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Pattern;
import javax.annotation.Nullable;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
Expand Down Expand Up @@ -546,7 +547,9 @@ private void desugarClassesInInput(
ImmutableSet.Builder<String> interfaceLambdaMethodCollector)
throws IOException {
for (String inputFilename : inputFiles) {
if ("module-info.class".equals(inputFilename)) {
if ("module-info.class".equals(inputFilename)
|| (inputFilename.endsWith("/module-info.class")
&& Pattern.matches("META-INF/versions/[0-9]+/module-info.class", inputFilename))) {
continue; // Drop module-info.class since it has no meaning on Android
}
if (OutputFileProvider.DESUGAR_DEPS_FILENAME.equals(inputFilename)) {
Expand Down

0 comments on commit 019f13b

Please sign in to comment.