• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java EclipsePlugin类的典型用法和代码示例

java 1次浏览

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

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

示例1: applyEclipsePlugin

点赞 2

import org.gradle.plugins.ide.eclipse.EclipsePlugin; //导入依赖的package包/类
private void applyEclipsePlugin(Project root) {
    Set<Project> allProjects = root.getAllprojects();
    for (Project p : allProjects) {
        p.getPluginManager().apply(EclipsePlugin.class);
    }
    root.getPlugins().getPlugin(EclipsePlugin.class).performPostEvaluationActions();
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:8,
代码来源:EclipseModelBuilder.java

示例2: configureEclipseTasks

点赞 2

import org.gradle.plugins.ide.eclipse.EclipsePlugin; //导入依赖的package包/类
/**
 * Configure the 'eclipse' task
 *
 * @param tasks Task container to manage tasks
 * @param eclipseModel Eclipse configuration to create dependency
 */
@Mutate
public void configureEclipseTasks(ModelMap<Task> tasks, EclipseModel eclipseModel) {
    tasks.named(EclipsePlugin.ECLIPSE_TASK_NAME, t -> {
        t.dependsOn(ECLIPSE_CHECKSTYLE_TASK_NAME);
    });

    tasks.named(Tasks.cleanName(Validate.notNull(EclipsePlugin.ECLIPSE_TASK_NAME)), t -> {
        t.dependsOn(Tasks.cleanName(ECLIPSE_CHECKSTYLE_TASK_NAME));
    });
}
 

开发者ID:jochenseeber,
项目名称:gradle-project-config,
代码行数:17,
代码来源:CheckstyleConfigPlugin.java

示例3: initialize

点赞 2

import org.gradle.plugins.ide.eclipse.EclipsePlugin; //导入依赖的package包/类
/**
 * @see me.seeber.gradle.plugin.AbstractProjectConfigPlugin#initialize()
 */
@Override
public void initialize() {
    try {
        // HACK to avoid NullPointerException during resource loading
        URLConnection dummyConnection = new URLConnection(new URL("file:///")) {
            @Override
            public void connect() throws IOException {
                throw new IOException();
            }
        };

        dummyConnection.setDefaultUseCaches(false);
    }
    catch (IOException e) {
        Throwables.throwIfUnchecked(e);
        throw new RuntimeException(e);
    }

    getProject().getPlugins().apply(ProjectConfigPlugin.class);
    getProject().getPlugins().apply(EclipsePlugin.class);

    getProject().getPlugins().withType(WarPlugin.class, war -> {
        getProject().getPlugins().apply(EclipseWtpPlugin.class);
    });

    getProject().getPlugins().withType(JavaPlugin.class, java -> {
        getProject().getConfigurations().create(ECLIPSE_ANNOTATIONS_CONFIGURATION, c -> {
            c.setDescription("Classpath used when generating Eclipse external annotations from JAR files");
            c.setVisible(false);
            c.setTransitive(true);
            c.extendsFrom(
                    getProject().getConfigurations().getByName(JavaPlugin.COMPILE_CLASSPATH_CONFIGURATION_NAME));

            c.getDependencies().add(getProject().getDependencies().create("com.google.code.findbugs:jsr305:3.0.1"));
        });
    });
}
 

开发者ID:jochenseeber,
项目名称:gradle-project-config,
代码行数:41,
代码来源:EclipseConfigPlugin.java

示例4: modifyEclipseProject

点赞 2

import org.gradle.plugins.ide.eclipse.EclipsePlugin; //导入依赖的package包/类
/** Applies the EclipsePlugin and provides the eclipse model for modification. */
public static void modifyEclipseProject(Project project, Consumer<EclipseModel> modifier) {
	// make sure the eclipse plugin has been applied
	ProjectPlugin.getPlugin(project, EclipsePlugin.class);

	// exclude the build folder
	project.afterEvaluate(p -> {
		EclipseModel eclipseModel = p.getExtensions().getByType(EclipseModel.class);
		modifier.accept(eclipseModel);
	});
}
 

开发者ID:diffplug,
项目名称:goomph,
代码行数:12,
代码来源:EclipseProjectPlugin.java

示例5: applyEclipsePlugin

点赞 2

import org.gradle.plugins.ide.eclipse.EclipsePlugin; //导入依赖的package包/类
private void applyEclipsePlugin(Project root) {
    Set<Project> allProjects = root.getAllprojects();
    for (Project p : allProjects) {
        p.getPlugins().apply(EclipsePlugin.class);
    }
    root.getPlugins().getPlugin(EclipsePlugin.class).makeSureProjectNamesAreUnique();
}
 

开发者ID:Pushjet,
项目名称:Pushjet-Android,
代码行数:8,
代码来源:EclipseModelBuilder.java

示例6: hasEclipsePlugin

点赞 2

import org.gradle.plugins.ide.eclipse.EclipsePlugin; //导入依赖的package包/类
private static boolean hasEclipsePlugin(Project project) {
    return project.getPlugins().hasPlugin(EclipsePlugin.class);
}
 

开发者ID:lxxlxx888,
项目名称:Reer,
代码行数:4,
代码来源:EclipseNameDeduper.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)