void () { compileModules("project.main"); setFileContent(appFile, APP_JAVA_WITH_NEW_METHOD, false); clearOutputs(); compileModules("project.main"); if (isGradleNewerOrSameAs("7.1")) { assertThat(dirtyOutputRoots).as("Dirty output roots").containsExactlyInAnyOrder("build/tmp/compileJava/previous-compilation-data.bin"); } else { assertThat(dirtyOutputRoots).as("Dirty output roots").isEmpty(); } assertThat(generatedFiles) .containsOnly(Map.entry(mainRoot, Set.of("my/pack/App.class"))); }