Skip to content

Commit

Permalink
Filter out generated databinding files from instrumentation APK.
Browse files Browse the repository at this point in the history
Note that this implies that databinding cannot be used on resources in the test apk. However, the resources in the test apk are already very weird - so I don't think this makes them much weirder.

RELNOTES: None
PiperOrigin-RevId: 179243983
  • Loading branch information
aj-michael authored and Copybara-Service committed Dec 15, 2017
1 parent 931d285 commit fa5274d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,10 @@ public static void createZipFilterAction(
.setCheckHashMismatch(checkHashMismatch)
.addExplicitFilter("R\\.class")
.addExplicitFilter("R\\$.*\\.class")
// These files are generated by databinding in both the target and the instrumentation app
// with different contents. We want to keep the one from the target app.
.addExplicitFilter("/BR\\.class$")
.addExplicitFilter("/databinding/[^/]+Binding\\.class$")
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4104,7 +4104,7 @@ public void testFilterActionWithInstrumentedBinary() throws Exception {
"--checkHashMismatch",
"IGNORE",
"--explicitFilters",
"R\\.class,R\\$.*\\.class",
"R\\.class,R\\$.*\\.class,/BR\\.class$,/databinding/[^/]+Binding\\.class$",
"--outputMode",
"DONT_CARE");
}
Expand Down

0 comments on commit fa5274d

Please sign in to comment.