当前位置: 首页>>代码示例>>Java>>正文


Java IdeaPlugin类代码示例

本文整理汇总了Java中org.gradle.plugins.ide.idea.IdeaPlugin的典型用法代码示例。如果您正苦于以下问题:Java IdeaPlugin类的具体用法?Java IdeaPlugin怎么用?Java IdeaPlugin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IdeaPlugin类属于org.gradle.plugins.ide.idea包,在下文中一共展示了IdeaPlugin类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: applyIdeaPlugin

import org.gradle.plugins.ide.idea.IdeaPlugin; //导入依赖的package包/类
private void applyIdeaPlugin(Project root) {
    Set<Project> allProjects = root.getAllprojects();
    for (Project p : allProjects) {
        p.getPluginManager().apply(IdeaPlugin.class);
    }
    ideaPluginFor(root).performPostEvaluationActions();
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:8,代码来源:IdeaModelBuilder.java

示例2: findProjectsApplyingIdeaAndScalaPlugins

import org.gradle.plugins.ide.idea.IdeaPlugin; //导入依赖的package包/类
private Collection<Project> findProjectsApplyingIdeaAndScalaPlugins() {
    return Collections2.filter(rootProject.getAllprojects(), new Predicate<Project>() {
        @Override
        public boolean apply(Project project) {
            return project.getPlugins().hasPlugin(IdeaPlugin.class) && (project.getPlugins().hasPlugin(ScalaBasePlugin.class) || project.getPlugins().hasPlugin(ScalaLanguagePlugin.class));
        }
    });
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:9,代码来源:IdeaScalaConfigurer.java

示例3: applyIdeaPlugin

import org.gradle.plugins.ide.idea.IdeaPlugin; //导入依赖的package包/类
private void applyIdeaPlugin(Project root) {
    Set<Project> allProjects = root.getAllprojects();
    for (Project p : allProjects) {
        p.getPlugins().apply(IdeaPlugin.class);
    }
    root.getPlugins().getPlugin(IdeaPlugin.class).makeSureModuleNamesAreUnique();
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:8,代码来源:IdeaModelBuilder.java

示例4: create

import org.gradle.plugins.ide.idea.IdeaPlugin; //导入依赖的package包/类
public ModuleDependency create(Project project, String scope) {
    if (project.getPlugins().hasPlugin(IdeaPlugin.class)) {
        return new ModuleDependency(((IdeaModel) project.getExtensions().getByName("idea")).getModule().getName(), scope);
    } else {
        return new ModuleDependency(project.getName(), scope);
    }
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:8,代码来源:ModuleDependencyBuilder.java

示例5: ideaPluginFor

import org.gradle.plugins.ide.idea.IdeaPlugin; //导入依赖的package包/类
private IdeaPlugin ideaPluginFor(Project project) {
    return project.getPlugins().getPlugin(IdeaPlugin.class);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:IdeaModelBuilder.java

示例6: hasIdeaPlugin

import org.gradle.plugins.ide.idea.IdeaPlugin; //导入依赖的package包/类
private static boolean hasIdeaPlugin(Project project) {
    return project.getPlugins().hasPlugin(IdeaPlugin.class);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:IdeaNameDeduper.java

示例7: configureIntelliJ

import org.gradle.plugins.ide.idea.IdeaPlugin; //导入依赖的package包/类
private static void configureIntelliJ(final Project project) {
    project.getPlugins().withType(IdeaPlugin.class).all(new Action<IdeaPlugin>() {
        @Override
        public void execute(IdeaPlugin ideaPlugin) {
            SourceSet mainSourceSet = getMainSourceSet(project);
            SourceSet testSourceSet = getTestSourceSet(project);
            final File mainGeneratedOutputDir = getGeneratedOutputDir(project, mainSourceSet, JAVA_EXTENSION);
            final File testGeneratedOutputDir = getGeneratedOutputDir(project, testSourceSet, JAVA_EXTENSION);
            project.getTasks().withType(GenerateIdeaModule.class).all(new Action<GenerateIdeaModule>() {
                @Override
                public void execute(GenerateIdeaModule generateIdeaModule) {
                    generateIdeaModule.doFirst(new Action<Task>() {
                        @Override
                        public void execute(Task task) {
                            project.mkdir(mainGeneratedOutputDir);
                            project.mkdir(testGeneratedOutputDir);
                        }
                    });
                }
            });
            IdeaModule module = ideaPlugin.getModel().getModule();
            module.setSourceDirs(new SetBuilder<File>()
                .addAll(module.getSourceDirs())
                .add(getAvroSourceDir(project, mainSourceSet))
                .build());
            module.setTestSourceDirs(new SetBuilder<File>()
                .addAll(module.getTestSourceDirs())
                .add(getAvroSourceDir(project, testSourceSet))
                .build());
            // IntelliJ doesn't allow source directories beneath an excluded directory.
            // Thus, we remove the build directory exclude and add all non-generated sub-directories as excludes.
            SetBuilder<File> excludeDirs = new SetBuilder<>();
            excludeDirs.addAll(module.getExcludeDirs()).remove(project.getBuildDir());
            File buildDir = project.getBuildDir();
            if (buildDir.isDirectory()) {
                excludeDirs.addAll(project.getBuildDir().listFiles(new NonGeneratedDirectoryFileFilter()));
            }
            module.setExcludeDirs(excludeDirs.build());
        }
    });
}
 
开发者ID:commercehub-oss,项目名称:gradle-avro-plugin,代码行数:42,代码来源:AvroPlugin.java


注:本文中的org.gradle.plugins.ide.idea.IdeaPlugin类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。