On Tue, Dec 15, 2009 at 8:44 AM, Russel Winder <[email protected]
> wrote:

> In the ~/.gradle/gradle.properties file, I used to be able to have:
>
>        gradle_installPath = /${user.home}/lib/JavaPackages/gradle-trunk
>
> which worked because the Ant copy task got used and properties got
> expanded.  Now that the Gradle copy task is used, properties are not
> expanded and I am forced to write the full explicit path.
>
> I find this a real blocking irritation as I have different home
> directories on different machines and yet they all share by NFS this
> same file.  It means I have to edit the file or give explicit command
> options to install on each machine.
>
> I think therefore that the either I am missing something (most likely)
> or the Gradle installation action needs amending to allow for property
> expansion on paths.
>

What you can do is not to use ~/gradle.properties for specifying
gradle_installPath but ~/init.gradle.

addBuildListener(new MyBuildListener())

class MyBuildListener extends BuildAdapter {
    public void projectsLoaded(Gradle gradle) {
       gradle.rootProject.gradle_
installPath = <someStatement>
    }
}

Eventually we should provide a groovier way of doing things. Something like:

projectsLoaded {
   rootProject.gradle_installPath = <someStatement>
}

- Hans

--
Hans Dockter
Gradle Project Manager
http://www.gradle.org



>
> For Gant I organized things so that:
>
>        gant_installPath =
> ${System.properties.'user.home'}/lib/JavaPackages/gant-trunk
>
> works fine.
>
> Thanks.
>
> --
> Russel.
>
> =============================================================================
> Dr Russel Winder      Partner
>                                            xmpp: [email protected]
> Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
> 41 Buckmaster Road,   f: +44 8700 516 084   voip:
> sip:[email protected] <sip%[email protected]>
> London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder
>

Reply via email to