gradlefile '.groovy' file extension

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

gradlefile '.groovy' file extension

Bert van Brakel
Any chance of gradle automatically also looking for the gradlefile with the '.groovy' file extension? This makes it easier to assign editors to this file without having to use the gradle -f switch.

Not a big deal, just a little extra polish which would be nice.

Just downloaded it now and playing around with it.
Reply | Threaded
Open this post in threaded view
|

Re: gradlefile '.groovy' file extension

hans_d
Administrator
Hi Bert,

On May 2, 2008, at 9:23 AM, Bert van Brakel wrote:

Any chance of gradle automatically also looking for the gradlefile with the
'.groovy' file extension? This makes it easier to assign editors to this
file without having to use the gradle -f switch. 

Not a big deal, just a little extra polish which would be nice.

Just downloaded it now and playing around with it.

Originally we have called the file gradle.groovy. For the reasons you have mentioned above. But then Russel Winder has pointed out, that although the code is Groovy code it cannot be executed as Groovy, it has to be executed in the Gradle context. 

From an editor point of view an extension .groovy is justified. From an execution point of view .groovy is misleading. It is not a script that can be execute via 'groovy gradlefile.groovy'. Therefore we don't want to append a .groovy suffix.

In IntelliJ I can register the pattern 'gradefile' to be interpreted as Groovy code. So I don't have a problem here. I'm sure for the eclipse groovy plugin the same is possible or could be easily implemented.

Opening it directly from the OS is a different story.

- Hans

-- 
Sent from the gradle-user mailing list archive at Nabble.com.


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




--
Hans Dockter
Gradle Project lead




Reply | Threaded
Open this post in threaded view
|

Re: gradlefile '.groovy' file extension

Peter Niederwieser
hdockter wrote
 From an editor point of view an extension .groovy is justified. From  
an execution point of view .groovy is misleading. It is not a script  
that can be execute via 'groovy gradlefile.groovy'. Therefore we  
don't want to append a .groovy suffix.
I'd also prefer to have gradle look for both "gradlefile" and "gradlefile.groovy". Of course I could configure IDEA to recognize "gradlefile", but then I'd also have to configure Eclipse, TextMate, Notepad++, etc. That's a big price to pay just to avoid any potential confusion as to why gradlefile.groovy can't be run in the interpreter. And why would I even assume that a file ending in ".groovy" is meant to be run directly? (Personally I'd never have this idea.)

Cheers,
Peter
Reply | Threaded
Open this post in threaded view
|

Re: gradlefile '.groovy' file extension

Bert van Brakel
In reply to this post by hans_d
hdockter wrote
Originally we have called the file gradle.groovy. For the reasons you  
have mentioned above. But then Russel Winder has pointed out, that  
although the code is Groovy code it cannot be executed as Groovy, it  
has to be executed in the Gradle context.

 From an editor point of view an extension .groovy is justified. From  
an execution point of view .groovy is misleading.
How about build.gradle?

Keeps it inline with Ant/Gant, pretty obvious what it does, doesn't confuse it with groovy, and allows the OS to assign the right program for running. Windows is also pretty bad at dealing with files with no extension (I use Windows and *nix) so it's just one more small irritation.
Reply | Threaded
Open this post in threaded view
|

Re: gradlefile '.groovy' file extension

hans_d
Administrator
Hi Bert,

On May 2, 2008, at 11:53 PM, Bert van Brakel wrote:


hdockter wrote:


Originally we have called the file gradle.groovy. For the reasons you  
have mentioned above. But then Russel Winder has pointed out, that  
although the code is Groovy code it cannot be executed as Groovy, it  
has to be executed in the Gradle context.

 From an editor point of view an extension .groovy is justified. From  
an execution point of view .groovy is misleading. 


How about build.gradle? 

Keeps it inline with Ant/Gant, pretty obvious what it does, doesn't confuse
it with groovy, and allows the OS to assign the right program for running.
Windows is also pretty bad at dealing with files with no extension (I use
Windows and *nix) so it's just one more small irritation.

This is definitely a good option. As the naming of this file is something very fundamental I'd like to wait a little bit with a final decision.

- Hans


-- 
Sent from the gradle-user mailing list archive at Nabble.com.


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




--
Hans Dockter
Gradle Project lead




Reply | Threaded
Open this post in threaded view
|

Re: gradlefile '.groovy' file extension

Xavier Hanin
In reply to this post by Bert van Brakel
On Fri, May 2, 2008 at 11:53 PM, Bert van Brakel <[hidden email]> wrote:


hdockter wrote:
>
>
> Originally we have called the file gradle.groovy. For the reasons you
> have mentioned above. But then Russel Winder has pointed out, that
> although the code is Groovy code it cannot be executed as Groovy, it
> has to be executed in the Gradle context.
>
>  From an editor point of view an extension .groovy is justified. From
> an execution point of view .groovy is misleading.
>

How about build.gradle?

Keeps it inline with Ant/Gant, pretty obvious what it does, doesn't confuse
it with groovy, and allows the OS to assign the right program for running.
Windows is also pretty bad at dealing with files with no extension (I use
Windows and *nix) so it's just one more small irritation.
FWIW I like 'build.gradle' much more than 'gradlefile' for the same reasons.

Xavier



--
View this message in context: http://www.nabble.com/gradlefile-%27.groovy%27-file-extension-tp17000897p17028513.html
Sent from the gradle-user mailing list archive at Nabble.com.


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

   http://xircles.codehaus.org/manage_email





--
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/