Hi,

I suspect you've run into http://jira.codehaus.org/browse/GRADLE-352

You could try ant.source(dir: "templates") instead

Jeppe Madsen wrote:
Hi,

I realize this might be a Groovy issue, but many of you are probably
using Ant so may be able to answer:

I'm porting a big bunch of ant files to Gradle (so far with with great
success! Build files are much smaller and easier to digest), but ran
into an issue:

This was for the original build.xml
<envgen destdir="${build.dir}/env/$${env}" envPropertiesFile="conf/environments.csv" overwrite="true" stripFileExtension="false">
        <source dir="templates" />
</envgen>

When I map this to gradle, I get

ant {
taskdef(name: "envgen", classname: "com.basilv.envgen.EnvGenTask", classpath: dependencies.envgenAntTask.asPath) envgen (destdir: "$buildDir/env/\${env}", envPropertiesFile:"conf/environments.csv", overwrite:"true", stripFileExtension:"false") {
           source(dir: "templates")
    }
}

But this fails with an
Execution failed for task :generateEnvFiles.
Cause: Cannot read write-only property: source

I assume it tries to return the value of source? So I've tried to
replace source with the following, it doesn't change anything:

   source {
                fileset(dir:"templates")
                prinln "hello"
            }
        println "hello2"
    }

Any clues?

/Jeppe


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

   http://xircles.codehaus.org/manage_email


Reply via email to