@Test
public void parsesProguardConfigs() throws Exception {

  File buildFile = TestUtils.getTestDataFile(PROGUARD_BUILD_FILE);
  String content = Files.asCharSource(buildFile, UTF_8).read();
  GradleContext context = GroovyGradleParser.parseGradleBuildFile(content, 1, null).build();
  ImmutableMap<String, ProguardConfig> expectedMap =
      ImmutableMap.of(
          "release",
          ProguardConfig.builder()
              .setMinifyEnabled(true)
              .setHasProguardRules(true)
              .setObfuscationEnabled(true)
              .build(),
          "shrinkOnly",
          ProguardConfig.builder()
              .setMinifyEnabled(true)
              .setHasProguardRules(true)
              .setObfuscationEnabled(false)
              .build(),
          "debug",
          ProguardConfig.builder()
              .setMinifyEnabled(false)
              .setHasProguardRules(true)
              .setObfuscationEnabled(true)
              .build());
  assertThat(context.getProguardConfigs()).isEqualTo(expectedMap);
}