Incremental builds are broken with 2.8

Looks like 2.8 is re-executing jar tasks at every run breaking incremental builds for devs. We do have build time in Manifest that is always changing. But it used to work pretty well before 2.8.

Executing task ‘:test-framework:jar’ (up-to-date check took 0.021 secs) due to:
Input file /src/1953/lodging/epc/trunk/test-framework/build/tmp/jar/MANIFEST.MF has changed.

Here is our manifest file configuration:

jar {
    manifest {
        attributes("Build-Time": new Date().toString(),
                "Job-Name": System.env['JOB_NAME'] ?: '',
                "Built-By": System.env['USER'] ?: '',
                "Created-By": "Gradle ${gradle.gradleVersion}",
                "Change-List": System.env['P4_CHANGELIST'] ?: '',
                "Build-Number": System.env['BUILD_NUMBER'] ?: '',
                "Build-Jdk": javaVersion)
    }
}

This is actually the result of GRADLE-3340 being fixed for Gradle 2.8. Since you have a timestamp in your manifest the build will always be out of date. I’d suggest replacing that manifest value with a static value on developer builds.

Hmm… We can do that. Thanks Mark