JavadocLinksPlugin implements Plugin<Project> { @Override public void apply(Project project) { this.project = project; OkHttpPlugin okHttpPlugin = project.getPlugins().apply(OkHttpPlugin.class); project.getTasks().withType(Javadoc.class) .configureEach(javadoc -> { OkHttpClient okHttpClient = okHttpPlugin.getOkHttpClient(); javadoc.doFirst("resolveJavadocLinks", new ResolveJavadocLinks(okHttpClient)); }); }  @Override void apply(Project project);  }
@Test public void apply() { project.getPlugins().apply(JavadocLinksPlugin.class); }
@Test public void apply_java() { project.getPlugins().apply(JavaPlugin.class); project.getPlugins().apply(JavadocLinksPlugin.class); }