FYI This is the best work-around that I've come up. I'd be interested
to hear if there's a better way:

processResources {
        inputs.properties( version: version.toString() )

        def sourceFiles = source.files

        from(sourceFiles) {
                include '**/*.properties'
                filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: 
[VERSION:
version.toString()])
        }
        from(sourceFiles) {
                exclude '**/*.properties'
        }
}

On Thu, Aug 18, 2011 at 4:04 PM, Merlyn Albery-Speyer
<[email protected]> wrote:
> Hi all,
>
> I have this in my build.gradle:
>
> processResources {
>        inputs.properties( version: version.toString() )
>        filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [VERSION:
> version.toString()])
> }
>
> When I run this* on one machine it will copy across a gif file without
> changing it's md5sum. When I run this on another machine the same
> gif's md5sum is changed. I'm using gradle wrapper.
>
> Has anyone seen this happen?
>
> Cheers,
> Merlyn
>
> * For this test I ran: ./gradlew cleanProcessResources processResources
>
> Here's the environment that works:
>
> ------------------------------------------------------------
> Gradle 1.0-milestone-3
> ------------------------------------------------------------
>
> Gradle build time: Monday, 25 April 2011 5:40:11 PM EST
> Groovy: 1.7.10
> Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010
> Ivy: 2.2.0
> JVM: 1.6.0_24 (Apple Inc. 19.1-b02-334)
> OS: Mac OS X 10.5.8 x86_64
>
> And here's the environment that does not:
>
> ------------------------------------------------------------
> Gradle 1.0-milestone-3
> ------------------------------------------------------------
>
> Gradle build time: Monday, 25 April 2011 5:40:11 PM EST
> Groovy: 1.7.10
> Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010
> Ivy: 2.2.0
> JVM: 1.6.0_14 (Sun Microsystems Inc. 14.0-b16)
> OS: Linux 2.6.21.7-2.fc8xen i386
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to