コード例 #1
0
ファイル: JacocoPlugin.java プロジェクト: Cazen/gradle
  public void apply(ProjectInternal project) {
    project.getPluginManager().apply(ReportingBasePlugin.class);
    this.project = project;
    addJacocoConfigurations();
    JacocoAgentJar agent = instantiator.newInstance(JacocoAgentJar.class, project);
    JacocoPluginExtension extension =
        project
            .getExtensions()
            .create(PLUGIN_EXTENSION_NAME, JacocoPluginExtension.class, project, agent);
    final ReportingExtension reportingExtension =
        (ReportingExtension) project.getExtensions().getByName(ReportingExtension.NAME);
    ((IConventionAware) extension)
        .getConventionMapping()
        .map(
            "reportsDir",
            new Callable<File>() {
              @Override
              public File call() {
                return reportingExtension.file("jacoco");
              }
            });

    configureAgentDependencies(agent, extension);
    configureTaskClasspathDefaults(extension);
    applyToDefaultTasks(extension);
    configureDefaultOutputPathForJacocoMerge();
    configureJacocoReportsDefaults(extension);
    addDefaultReportTasks(extension);
  }
コード例 #2
0
  public void apply(ProjectInternal project) {
    project.getPluginManager().apply(BasePlugin.class);
    project.getPluginManager().apply(ReportingBasePlugin.class);
    project.getPluginManager().apply(LanguageBasePlugin.class);

    JavaPluginConvention javaConvention = new JavaPluginConvention(project, instantiator);
    project.getConvention().getPlugins().put("java", javaConvention);

    configureCompileDefaults(project, javaConvention);
    configureSourceSetDefaults(javaConvention);

    configureJavaDoc(project, javaConvention);
    configureTest(project, javaConvention);
    configureBuildNeeded(project);
    configureBuildDependents(project);
  }
コード例 #3
0
 @Override
 public PluginManagerInternal getPluginManager() {
   return target.getPluginManager();
 }