org.gradle.api.tasks.bundling.War.dependsOn()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(137)

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

War.dependsOn介绍

暂无

代码示例

代码示例来源:origin: gradle.plugin.de.esoco.gwt/gwt-gradle-plugin

private void createCompileTask(final Project project) {
  project.getTasks().create(GwtCompileTask.NAME, GwtCompileTask.class);
  final GwtExtension extension = project.getExtensions().getByType(GwtExtension.class);
  final War warTask = project.getTasks().withType(War.class).getByName("war");
  warTask.dependsOn(GwtCompileTask.NAME);
  project.getTasks().withType(GwtCompileTask.class, new Action<GwtCompileTask>() {
    @Override
    public void execute(final GwtCompileTask task) {
      task.configure(project, extension);
      warTask.from(extension.getCompile().getWar());
    }
  });
}

代码示例来源:origin: Putnami/putnami-gradle-plugin

private void createCompileTask(final Project project) {
  project.getTasks().create(GwtCompileTask.NAME, GwtCompileTask.class);
  final PutnamiExtension extension = project.getExtensions().getByType(PutnamiExtension.class);
  final War warTask = project.getTasks().withType(War.class).getByName("war");
  warTask.dependsOn(GwtCompileTask.NAME);
  project.getTasks().withType(GwtCompileTask.class, new Action<GwtCompileTask>() {
    @Override
    public void execute(final GwtCompileTask task) {
      task.configure(project, extension);
      warTask.from(extension.getCompile().getWar());
    }
  });
  ConfigurationContainer configurationContainer = project.getConfigurations();
  //		Configuration gwtConfig = configurationContainer.getByName(PwtLibPlugin.CONF_GWT_SDM);
  //		FileCollection warClasspath = warTask.getClasspath().minus(gwtConfig);
  //		warTask.setClasspath(warClasspath);
}

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

@Override
  public void apply(Project project) {

    jSassBasePlugin = project.getPlugins().apply(JSassBasePlugin.class);
    project.getPlugins().apply(WarPlugin.class);

    SassCompile compileWebappSass = project.getTasks().create("compileWebappSass", SassCompile.class);
    compileWebappSass.setGroup(BasePlugin.BUILD_GROUP);
    compileWebappSass.setDescription("Compile sass and scss files for the webapp");

    WarPluginConvention warPluginConvention = project.getConvention().getPlugin(WarPluginConvention.class);
    compileWebappSass.setSourceDir(warPluginConvention.getWebAppDir());

    project.afterEvaluate(p -> {
      War war = (War) p.getTasks().getByName(WarPlugin.WAR_TASK_NAME);
      if (jSassBasePlugin.getExtension().isInplace()) {
        compileWebappSass.setDestinationDir(warPluginConvention.getWebAppDir());
        war.dependsOn(compileWebappSass);
      } else {
        compileWebappSass.setDestinationDir(new File(p.getBuildDir(), "jsass/webapp"));
        war.from(compileWebappSass);
      }
    });
  }
}

代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-theme-builder

final BuildThemeTask buildThemeTask) {
war.dependsOn(buildThemeTask);

相关文章