Hummm...
On Sun, 2011-08-21 at 10:23 +0100, Russel Winder wrote:
> Hi,
>
> I am trying to get Gradle to produce Eclipse (IntelliJ IDEA next) files
> so that we can remove all the IDE files form the GPars repository. I
> have apply-d the eclipse (and idea) plugins. However the generated
> files are inconsistent with Gradle from the command line.
>
> In build.gradle are the dependencies:
>
> groovy group: 'org.codehaus.groovy', name: 'groovy-all', version:
> hasProperty('gpars_groovyVersion') ? gpars_groovyVersion : '1.7.10'
>
> testCompile group: 'org.spockframework', name: 'spock-core', version:
> hasProperty('gpars_spockVersion') ? gpars_spockVersion : '0.5-groovy-1.7'This does not work at all, ever. So the problem is not with the eclipse target but with the above. Although the conditional expression works at the top level of the Gradle file in a println it fails in the dependency specification, the default value is always used. > and as far as I can tell Groovy 1.8.1 and Spock 0.6-groovy1.8-SNAPSHOT > get used because in my ~/.gradle/gradle.properties file I have: > > gpars_groovyVersion = 1.8.1 > gpars_spockVersion = 0.6-groovy-1.8-SNAPSHOT The values are seen at the top level of a Gradle file if the symbol is used in a println for instance, but they are never seen in the dependency specification. This is somewhat counter-intuitive. Actually I begin to thing there is a huge violation of the Principle of Least Surprise. > However the generated Eclipse files do not have these versions. It > seems then that the ~/.gradle/properties file is not read during an > eclipse target. Which seems bizarre, as I see no obvious reason why it > shouldn't. Aha, see above. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:[email protected] 41 Buckmaster Road m: +44 7770 465 077 xmpp: [email protected] London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
signature.asc
Description: This is a digitally signed message part
