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

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

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

Project.evaluationDependsOn介绍

暂无

代码示例

代码示例来源:origin: diffplug/goomph

/** Adds the eclipse project from the given project path. */
public void addProject(String projectPath) {
  addDependency(project.evaluationDependsOn(projectPath));
}

代码示例来源:origin: GoogleCloudPlatform/app-gradle-plugin

/**
 * Returns the appengine service directory for this project and modifies the task dependencies of
 * run/start to ensure {@code serviceProject} is built first.
 */
public File projectAsService(Project serviceProject) {
 if (!serviceProject.equals(project)) {
  project.evaluationDependsOn(serviceProject.getPath());
 }
 project
   .getTasks()
   .findByName(AppEngineStandardPlugin.RUN_TASK_NAME)
   .dependsOn(serviceProject.getTasks().findByPath(BasePlugin.ASSEMBLE_TASK_NAME));
 project
   .getTasks()
   .findByName(AppEngineStandardPlugin.START_TASK_NAME)
   .dependsOn(serviceProject.getTasks().findByPath(BasePlugin.ASSEMBLE_TASK_NAME));
 return serviceProject
   .getTasks()
   .findByName(AppEngineStandardPlugin.EXPLODE_WAR_TASK_NAME)
   .getOutputs()
   .getFiles()
   .getSingleFile();
}

代码示例来源:origin: com.amazon.device.tools.build/gradle-core

private void ensureConfigured(Configuration config) {
  for (Dependency dependency : config.getAllDependencies()) {
    if (dependency instanceof ProjectDependency) {
      ProjectDependency projectDependency = (ProjectDependency) dependency;
      project.evaluationDependsOn(projectDependency.getDependencyProject().getPath());
      try {
        ensureConfigured(projectDependency.getProjectConfiguration());
      } catch (Throwable e) {
        throw new UnknownProjectException(String.format(
            "Cannot evaluate module %s : %s",
            projectDependency.getName(), e.getMessage()),
            e);
      }
    }
  }
}

代码示例来源:origin: diffplug/goomph

/** Adds all eclipse projects from all gradle projects whose paths meet the given spec. */
public void addAllProjects(Spec<String> include) {
  project.getRootProject().getAllprojects().forEach(p -> {
    // this project is automatically included by logic
    // in OomphIdePlugin
    if (p == project) {
      return;
    }
    // this project depends on all the others
    if (include.isSatisfiedBy(p.getPath())) {
      addDependency(project.evaluationDependsOn(p.getPath()));
    }
  });
}

代码示例来源:origin: io.freefair.gradle/war-plugin

private void configureOverlay(WarOverlay overlay, Project otherProject) {
  project.evaluationDependsOn(otherProject.getPath());
  War otherWar = (War) otherProject.getTasks().getByName(WAR_TASK_NAME);
  configureOverlay(overlay, otherWar);
  if (overlay.isEnableCompilation()) {
    project.getDependencies().add(COMPILE_CLASSPATH_CONFIGURATION_NAME, otherProject);
    project.getDependencies().add(TEST_COMPILE_CLASSPATH_CONFIGURATION_NAME, otherProject);
  }
}

相关文章