GitVersionPlugin implements Plugin<Project> { @Override public void apply(Project project) { this.project = project; this.logger = project.getLogger(); project.setVersion(resolveVersion()); project.allprojects(p -> p.setVersion(project.getVersion())); }  @Override void apply(Project project);  }
@Test public void apply() { project.getPlugins().apply(GitVersionPlugin.class); assertThat(project.getVersion()).isNotNull(); assertThat(project.getVersion()).isInstanceOf(String.class); }