use of com.facebook.buck.rules.DefaultOnDiskBuildInfo in project buck by facebook.
the class AndroidBinaryIntegrationTest method testDxFindsReferencedResources.
@Test
public void testDxFindsReferencedResources() throws IOException {
DefaultOnDiskBuildInfo buildInfo = new DefaultOnDiskBuildInfo(BuildTargetFactory.newInstance("//java/com/sample/lib:lib#dex"), new ProjectFilesystem(tmpFolder.getRoot()), ObjectMappers.newDefaultInstance());
Optional<ImmutableList<String>> resourcesFromMetadata = buildInfo.getValues(DexProducedFromJavaLibrary.REFERENCED_RESOURCES);
assertTrue(resourcesFromMetadata.isPresent());
assertEquals(ImmutableSet.of("com.sample.top_layout", "com.sample2.title"), ImmutableSet.copyOf(resourcesFromMetadata.get()));
}
Aggregations