Skip to content

Commit

Permalink
Add test case to prove incorrect behavior of incremental compiler
Browse files Browse the repository at this point in the history
See: #1474
  • Loading branch information
melix committed Mar 1, 2017
1 parent 721bfb1 commit bb5c6b4
Showing 1 changed file with 14 additions and 0 deletions.
Expand Up @@ -648,4 +648,18 @@ abstract class AbstractCrossTaskIncrementalJavaCompilationIntegrationTest extend
!output.contains(':api:compileJava - is not incremental (e.g. outputs have changed, no previous execution, etc.).')
impl.recompiledClasses("ImplA")
}
@Issue("gradle/gradle#1474")
def "recompiles dependent class in case a constant is computed from another constant"() {
java api: ["class A { public static final int FOO = 10; }"], impl: ['class B { public static final int BAR = 2 + A.FOO; } ']
impl.snapshot { run 'compileJava' }
when:
java api: ['class A { public static final int FOO = 100; }']
run 'impl:compileJava'
then:
impl.recompiledClasses 'B'
}
}

0 comments on commit bb5c6b4

Please sign in to comment.