Java 类org.gradle.api.plugins.WarPluginConvention 实例源码

项目:jsass-gradle-plugin    文件:JSassWarPlugin.java   
@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());
        } else {
            compileWebappSass.setDestinationDir(new File(p.getBuildDir(), "generated/webappCss"));
            war.from(compileWebappSass.getDestinationDir());
        }
        war.dependsOn(compileWebappSass);
    });
}
项目:Reer    文件:JettyPlugin.java   
public WarPluginConvention getWarConvention(Project project) {
    return project.getConvention().getPlugin(WarPluginConvention.class);
}
项目:Pushjet-Android    文件:JettyPlugin.java   
public WarPluginConvention getWarConvention(Project project) {
    return project.getConvention().getPlugin(WarPluginConvention.class);
}
项目:Pushjet-Android    文件:JettyPlugin.java   
public WarPluginConvention getWarConvention(Project project) {
    return project.getConvention().getPlugin(WarPluginConvention.class);
}