Eclipse plugin dissables Gradle nature

Hello Gradle users / team,

I do have the same issue as described in the old forum (https://discuss.gradle.org/t/eclipse-plugin-derails-gradle-nature/2026). Basically if you run ‘gradle eclipseClean eclipse’ that rebuilds the Eclipse project but nukes the Gradle nature out of it. If you have many project (my case) it becomes a pain in the neck to re-enable the Gradle nature on each one of them.

There is a way to do this on the command line, without having to re-import the projects from scratch or enable the Gradle nature from within Eclipse?

Thanks!

you can tweak the natures of the generated eclipse project file using
the following snippet:

eclipse {
    project {
        natures 'some.extra.eclipse.nature',
    }
}

Hello Rene, thanks for your quick reply.

You are right, that fixes the problem. Later on I also found a nice article with examples here, and the documentation is pretty clear about it.

–Jose

thanks for sharing the link