LombokPlugin implements Plugin<Project> { @Override public void apply(Project project) { this.project = project; lombokBasePlugin = project.getPlugins().apply(LombokBasePlugin.class); lombokBasePlugin.getLombokExtension().getConfig().put("config.stopBubbling", "true"); generateLombokConfig = project.getTasks().register("generateLombokConfig", GenerateLombokConfig.class, genConfig -> { genConfig.getProperties().convention(lombokBasePlugin.getLombokExtension().getConfig()); genConfig.setGroup("lombok"); }); project.getTasks().withType(Delombok.class).configureEach(this::configureDelombokDefaults); project.getPlugins().withType(JavaPlugin.class, javaPlugin -> configureJavaPluginDefaults()); }  @Override void apply(Project project);  }
@Test public void apply_alone() { project.getPlugins().apply(LombokPlugin.class); }
@Test public void apply_after_java() { project.getPlugins().apply(JavaPlugin.class); project.getPlugins().apply(LombokPlugin.class); }
@Test public void apply_before_java() { project.getPlugins().apply(LombokPlugin.class); project.getPlugins().apply(JavaPlugin.class); }