Search in sources :

Example 1 with IdeaWorkspace

use of org.gradle.plugins.ide.idea.model.IdeaWorkspace in project gradle by gradle.

the class IdeaPlugin method configureIdeaWorkspace.

private void configureIdeaWorkspace(final Project project) {
    if (isRoot(project)) {
        GenerateIdeaWorkspace task = project.getTasks().create("ideaWorkspace", GenerateIdeaWorkspace.class);
        task.setDescription("Generates an IDEA workspace file (IWS)");
        IdeaWorkspace workspace = new IdeaWorkspace();
        workspace.setIws(new XmlFileContentMerger(task.getXmlTransformer()));
        task.setWorkspace(workspace);
        ideaModel.setWorkspace(task.getWorkspace());
        task.setOutputFile(new File(project.getProjectDir(), project.getName() + ".iws"));
        addWorker(task, false);
    }
}
Also used : IdeaWorkspace(org.gradle.plugins.ide.idea.model.IdeaWorkspace) XmlFileContentMerger(org.gradle.plugins.ide.api.XmlFileContentMerger) File(java.io.File)

Aggregations

File (java.io.File)1 XmlFileContentMerger (org.gradle.plugins.ide.api.XmlFileContentMerger)1 IdeaWorkspace (org.gradle.plugins.ide.idea.model.IdeaWorkspace)1