org.gradle.api.invocation.Gradle.projectsEvaluated()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(432)

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

Gradle.projectsEvaluated介绍

暂无

代码示例

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

/**
 * @see org.gradle.api.Plugin#apply(java.lang.Object)
 */
@Override
public void apply(Project project) {
  this.project = project;
  getLogger().info("Applying workspace plugin to {}", project);
  WorkspaceConfig workspaceConfig = new WorkspaceConfig();
  project.getExtensions().add("workspaceConfig", workspaceConfig);
  project.getGradle().projectsEvaluated(g -> {
    replaceDependencies(getProject());
  });
}

代码示例来源:origin: typelead/gradle-eta

project.getGradle().projectsEvaluated(gradle -> {
    if (extension.shouldPreInstallDependencies()) {
      setupEnvironmentTask.setupEnvironment();

代码示例来源:origin: gradle.plugin.org.amdatu.blueprint/org.amdatu.blueprint.gradle

@Override
public void apply(Object receiver) {
  if (receiver instanceof Settings) {
    Settings settings = ((Settings) receiver);
    settings.getGradle().projectsEvaluated(action -> {
      settings.getGradle().getRootProject().apply(a -> a.plugin(AmdatuBlueprintPlugin.class));
    });
  } else if (receiver instanceof Project) {
    Project project = (Project) receiver;
    Workspace bndWorkspace = (Workspace) project.getProperties().get("bndWorkspace");
    if (bndWorkspace == null) {
      throw new GradleException("Bnd workspace not available!");
    }
    project.subprojects(subProject -> subProject
        .fileTree(subProject.getProjectDir(), files -> files.include("*.bndrun"))
        .forEach(bndrun -> addDockerTasks(bndWorkspace, subProject, bndrun)));
    createRunAllTask(project, "docker", DockerTask.class);
    createRunAllTask(project, "dockerPush", DockerPushTask.class);
  }
}

代码示例来源:origin: typelead/gradle-eta

private void configureInjectionTasks() {
  if (isRootProject()) {
    project.getGradle().projectsEvaluated
      (gradle -> gradle.allprojects
       (p -> {
         JavaPluginConvention javaConvention =
           p.getConvention().findPlugin(JavaPluginConvention.class);
         EtaPlugin etaPlugin = p.getPlugins().findPlugin(EtaPlugin.class);
         if (javaConvention != null && etaPlugin == null) {
           javaConvention.getSourceSets().all
             (sourceSet -> configureSourceSetInjection(p, sourceSet));
         }
       }));
  }
}

相关文章