spring-attic / eclipse-integration-gradle

Gradle Tooling for Eclipse
Eclipse Public License 1.0
298 stars 108 forks source link

Provide an "empty" templates for Gradle project #70

Closed vogella closed 9 years ago

vogella commented 10 years ago

IMHO it would useful to have a minimal Gradle template for the Gradle project wizard. The current wizard already creates several classes. I would like to have the option to create a Gradle project with an empty src/main/java and src/test/java folder.

vogella commented 10 years ago

Clone your code and I see that you are reusing the Gradle sample which I think is great. IMHO to solve this issue gradle should include a minimal example which the Eclipse tooling could reuse.

Can you point me to the corresponding repo which contains the samples? I cloned gradle/gradle and it looks to me that this does not include the samples.

paulvi commented 10 years ago

:+1: voting up for empty template with src/main/java and src/test/java folders.

see also http://stackoverflow.com/questions/14017364/how-to-create-java-gradle-project

kdvolder commented 10 years ago

Can you point me to the corresponding repo which contains the samples? I cloned gradle/gradle and it looks to me that this does not include the samples.

Actually, I'm not sure. However the tooling also has some 'local' samples (actually only a single one right now :-). It wouldn't be too difficult to add the 'empty' sample as local sample.

An empty sample is likely not interesting enough to be included in a gradle distribution, so my opinion is we should do it as a local sample.

I can point you to where our local samples are:

https://github.com/spring-projects/eclipse-integration-gradle/tree/master/org.springsource.ide.eclipse.gradle.core/samples

All samples are registered here: https://github.com/spring-projects/eclipse-integration-gradle/blob/master/org.springsource.ide.eclipse.gradle.core/src/org/springsource/ide/eclipse/gradle/core/samples/SampleProjectRegistry.java

But the 'registerLocalSamples method scans the local samples directory, so simply adding your empty sample there should be sufficient.

One potential problem with 'empty' sample is that you can not commit empty source directories to git. So you will have to find your way around that somehow. The easiest might be to stick a small readme file in the empty directories. Alternatively you may override 'createAt' method of LocalSample or SampleProject class and generate your 'empty' sample content programatically.

vogella commented 9 years ago

I think this issue can be closed. https://github.com/eclipse/buildship is now an Eclipse project driven by Gradleware directly so I will post my requirements at this project.