Jenkins Plugin Development Gradle Build
You probably need to set your group to
group = 'org.jenkins-ci.plugins'
and you can delete the
apply plugin 'java'
as this is done internally (I think)
I'm not sure you need to include the ui-samples-plugin either but if you do it needs to be something like
dependencies { jenkinsPlugins( group: 'org.jenkins-ci.main', name: 'ui-samples-plugin', version: '1.424.2', ext: 'jar') testCompile group: 'junit', name: 'junit', version: '4.11'}
(untested)
Try its wiki page for more info