I don't understand gradle plugins block
apply plugin: 'someplugin1'
apply plugin: 'maven'
and other one:
id 'org.hidetake.ssh' version '1.1.2'
In first block We have some plugin name. in second one package and version. I don't understand where I should use first block and when second one.
plugins block is the newer method of applying plugins, and they must be available in the Gradle plugin repository. The
apply approach is the older, yet more flexible method of adding a plugin to your build.
plugins method does not work in multi-project configurations (
allprojects), but will work on the build configuration for each child project.
I would think that as functionality progresses, the
plugins configuration method will overtake the older approach, but at this point both can be and are used concurrently.