Using Buildship 1.0.9 , Gradle 2.11 and Eclipse 4.5.1 with the following script:
When a import a project, only
buildCommand works but the
nature a specificated is not included in the
.project file. I alread tried
natures << 'ch.acanda.eclipse.pmd.builder.PMDNature' and
natures = ['ch.acanda.eclipse.pmd.builder.PMDNature'] but the result is always the same. Is it normal ? Thanks.
What version of gradle are you running? This feature requires 2.9+
Buildship 1.0.7 is now available - with support for custom natures and build commands
Buildship 1.0.7 is based on Gradle 2.9 which offers a pack of
Buildship now automatically configures custom project natures and custom build commands defined in the build script:
apply plugin: 'eclipse'
natures << 'some.extra.eclipse.nature'
buildCommand << 'some.extra.build.command'
Note that this feature is only supported for projects using…
Buildship only adds a nature if it is handled by the current Eclipse installation. So make sure that PMD is installed and the nature id is correct.
Indeed. I made a few tests and custom natures are only added to
.project file if you have the plugin installed and the nature declared. Thank you!