Skip to content

Commit

Permalink
Add test case to show that we can still avoid compiling if no constan…
Browse files Browse the repository at this point in the history
…t was changed
  • Loading branch information
melix committed Mar 2, 2017
1 parent f32715e commit f160ddd
Showing 1 changed file with 14 additions and 0 deletions.
Expand Up @@ -714,4 +714,18 @@ abstract class AbstractCrossTaskIncrementalJavaCompilationIntegrationTest extend
impl.recompiledClasses 'B'
}
def "detects that changed class still has the same constants so no recompile is necessary"() {
java api: ["class A { public static final int FOO = 123;}"],
impl: ["class B { void foo() { int x = 123; }}"]
impl.snapshot { run "compileJava" }
when:
java api: ["class A { public static final int FOO = 123; void addSomeRandomMethod() {} }"]
run "impl:compileJava"
then:
impl.noneRecompiled()
}
}

0 comments on commit f160ddd

Please sign in to comment.