org.gradle.api.Project.getPluginManager()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(7.2k)|赞(0)|评价(0)|浏览(203)

本文整理了Java中org.gradle.api.Project.getPluginManager()方法的一些代码示例,展示了Project.getPluginManager()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.getPluginManager()方法的具体详情如下:
包路径:org.gradle.api.Project
类名称:Project
方法名:getPluginManager

Project.getPluginManager介绍

暂无

代码示例

代码示例来源:origin: classmethod/gradle-aws-plugin

public void apply(Project project) {
    project.getPluginManager().apply(AwsPlugin.class);
    project.getExtensions().create(AmazonRoute53PluginExtension.NAME, AmazonRoute53PluginExtension.class, project);
  }
}

代码示例来源:origin: classmethod/gradle-aws-plugin

public void apply(Project project) {
    project.getPluginManager().apply(AwsPlugin.class);
    project.getExtensions().create(AmazonIdentityManagementPluginExtension.NAME,
        AmazonIdentityManagementPluginExtension.class, project);
  }
}

代码示例来源:origin: classmethod/gradle-aws-plugin

public void apply(Project project) {
    project.getPluginManager().apply(AwsPlugin.class);
    project.getExtensions().create(AmazonRDSPluginExtension.NAME, AmazonRDSPluginExtension.class, project);
  }
}

代码示例来源:origin: classmethod/gradle-aws-plugin

public void apply(Project project) {
    project.getPluginManager().apply(AwsPlugin.class);
    project.getExtensions().create(AmazonS3PluginExtension.NAME, AmazonS3PluginExtension.class, project);
  }
}

代码示例来源:origin: classmethod/gradle-aws-plugin

public void apply(Project project) {
    project.getPluginManager().apply(AwsPlugin.class);
    project.getExtensions().create(AmazonEC2PluginExtension.NAME, AmazonEC2PluginExtension.class, project);
  }
}

代码示例来源:origin: classmethod/gradle-aws-plugin

public void apply(Project project) {
    project.getPluginManager().apply(AwsPlugin.class);
    project.getExtensions().create(AmazonSQSPluginExtension.NAME, AmazonSQSPluginExtension.class, project);
  }
}

代码示例来源:origin: classmethod/gradle-aws-plugin

public void apply(Project project) {
    project.getPluginManager().apply(AwsPlugin.class);
    project.getExtensions().create(AmazonECRPluginExtension.NAME, AmazonECRPluginExtension.class, project);
  }
}

代码示例来源:origin: classmethod/gradle-aws-plugin

public void apply(Project project) {
    project.getPluginManager().apply(AwsPlugin.class);
    project.getExtensions().create(AWSLambdaPluginExtension.NAME, AWSLambdaPluginExtension.class, project);
  }
}

代码示例来源:origin: gradle.plugin.me.seeber.gradle/gradle-project-config

/**
   * Apply the Checkstyle rules for Eclipse Java projects
   *
   * @param project Project to apply rules to
   */
  protected void applyEclipseRules(Project project) {
    if (project.getPluginManager().hasPlugin("java") && project.getPluginManager().hasPlugin("eclipse")) {
      getProject().getPluginManager().apply(EclipseJavaRules.class);
    }
  }
}

代码示例来源:origin: classmethod/gradle-aws-plugin

@Override
public void apply(Project project) {
  project.getPluginManager().apply(AwsPlugin.class);
  project.getPluginManager().apply(AmazonS3Plugin.class);
  project.getExtensions().create(AmazonCloudFormationPluginExtension.NAME,
      AmazonCloudFormationPluginExtension.class,
      project);
  applyTasks(project);
}

代码示例来源:origin: gradle.plugin.com.github.rsuiteCMS/gradlePhantomjsAssistant

@Override
public void apply(Project project) {
  initLog(project);
  project.getPluginManager().apply(JavaPlugin.class);
  // Create the phantomjs configuration point
  config = project.getExtensions().create("phantomjs", PhantomJSConfig.class, project);
}

代码示例来源:origin: com.google.cloud.tools/appengine-gradle-plugin

@Override
public void apply(Project project) {
 checkGradleVersion(project);
 if (isAppEngineStandard(project)) {
  project.getPluginManager().apply(AppEngineStandardPlugin.class);
 } else {
  project.getPluginManager().apply(AppEngineFlexiblePlugin.class);
 }
}

代码示例来源:origin: io.github.gradle-clojure/gradle-clojure-plugin

@Override
public void apply(Project project) {
 project.getPluginManager().apply(ClojureCommonBasePlugin.class);
 ClojureScriptExtension extension = project.getExtensions().create("clojurescript", ClojureScriptExtension.class, project);
 configureSourceSetDefaults(project, extension);
 configureBuildDefaults(project, extension);
}

代码示例来源:origin: gradle.plugin.net.orekyuu/library-version-updater

@Override
  public void apply(Project project) {
    project.getPluginManager().apply(VersionsPlugin.class);
    project.getPluginManager().apply(UseLatestVersionsPlugin.class);

    project.getTasks().create("createLibraryUpdatePR", CreateLibUpdatePullRequest.class, (task) -> {
      task.setGithubAccessToken("default");
      task.setGithubPage("default");
      task.setBasedBranchName("master");
      task.dependsOn("useLatestVersions");
    });
  }
}

代码示例来源:origin: gradle.plugin.com.xenoterracide/gradle-idea

@Override
  public void apply( Project project ) {
    project.getPluginManager().apply( IdeaPlugin.class );
    project.getExtensions().configure( IdeaModel.class, plugin -> {
      plugin.module( module -> {
        module.setDownloadSources( true );
        module.setDownloadJavadoc( true );
      } );
    } );

  }
}

代码示例来源:origin: gradle.plugin.org.javamodularity/moduleplugin

public void configureRun(Project project, String moduleName) {
  project.getPluginManager().withPlugin(ApplicationPlugin.APPLICATION_PLUGIN_NAME, plugin -> {
    if (project.getPlugins().hasPlugin("application")) {
      JavaExec execTask = (JavaExec) project.getTasks().findByName(ApplicationPlugin.TASK_RUN_NAME);
      execTask.getExtensions().create("moduleOptions", ModuleOptions.class, project);
      updateJavaExecTask(execTask, moduleName);
      updateStartScriptsTask(project, execTask, moduleName);
    }
  });
}

代码示例来源:origin: gradle.plugin.org.hibernate.build.animalsniffer/gradle-animalSniffer-plugin

@Override
  public void apply(Project project) {
    project.getPluginManager().apply( "java" );

    final SnifferExtension snifferExtension = Helper.maybeCreateExtension( project );

    final GenerateTask generateTask = project.getTasks().create( GenerateTask.STANDARD_NAME, GenerateTask.class );

    final String compileTaskName = project.getConvention().getPlugin( JavaPluginConvention.class )
        .getSourceSets()
        .getByName( "main" )
        .getClassesTaskName();

    generateTask.dependsOn( project.getTasks().getByName( compileTaskName ) );
  }
}

代码示例来源:origin: gradle.plugin.org.gosu-lang.gosu/gradle-gosu-plugin

@Override
public void apply(Project project) {
 _project = project;
 _project.getPluginManager().apply(JavaPlugin.class);
 JavaBasePlugin javaBasePlugin = _project.getPlugins().getPlugin(JavaBasePlugin.class);
 configureCompileDefaults();
 configureSourceSetDefaults(javaBasePlugin);
 addGosuRuntimeDependencies();
}

代码示例来源:origin: com.github.rodm/gradle-teamcity-dsl-plugin

@Override
public final void apply(Project project) {
  project.getPluginManager().apply(JavaPlugin.class);
  TeamCityDSLExtension extension = createExtension(project);
  Configuration configuration = createConfiguration(project);
  configureRepositories(project);
  configureSourceSet(project, configuration, extension);
  configureDefaultDependencies(project, configuration, extension);
  configureTask(project, extension);
  configureTaskType(project);
}

代码示例来源:origin: palantir/gradle-baseline

@Override
public void apply(Project project) {
  if (project != project.getRootProject()) {
    project.getLogger().warn(
        "com.palantir.baseline-circleci should be applied to the root project only, not '{}'",
        project.getName());
  }
  // the `./gradlew resolveConfigurations` task is used on CI to download all jars for convenient caching
  project.getRootProject().allprojects(p -> p.getPluginManager().apply(ConfigurationResolverPlugin.class));
  configurePluginsForReports(project);
  configurePluginsForArtifacts(project);
}

相关文章