Java Code Examples for org.gradle.api.project#getPlugins()

The following examples show how to use org.gradle.api.project#getPlugins() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EarPlugin.java    From pushfish-android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public void apply(final Project project) {
    project.getPlugins().apply(BasePlugin.class);

    final EarPluginConvention earPluginConvention = instantiator.newInstance(EarPluginConvention.class, fileResolver, instantiator);
    project.getConvention().getPlugins().put("ear", earPluginConvention);
    earPluginConvention.setLibDirName("lib");
    earPluginConvention.setAppDirName("src/main/application");

    wireEarTaskConventions(project, earPluginConvention);
    configureConfigurations(project);

    PluginContainer plugins = project.getPlugins();

    setupEarTask(project, earPluginConvention);

    configureWithJavaPluginApplied(project, earPluginConvention, plugins);
    configureWithNoJavaPluginApplied(project, earPluginConvention);
}
 
Example 2
Source File: EarPlugin.java    From pushfish-android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public void apply(final Project project) {
    project.getPlugins().apply(BasePlugin.class);

    final EarPluginConvention earPluginConvention = instantiator.newInstance(EarPluginConvention.class, fileResolver);
    project.getConvention().getPlugins().put("ear", earPluginConvention);
    earPluginConvention.setLibDirName("lib");
    earPluginConvention.setAppDirName("src/main/application");

    wireEarTaskConventions(project, earPluginConvention);
    configureConfigurations(project);

    PluginContainer plugins = project.getPlugins();

    setupEarTask(project, earPluginConvention);

    configureWithJavaPluginApplied(project, earPluginConvention, plugins);
    configureWithNoJavaPluginApplied(project, earPluginConvention);
}
 
Example 3
Source File: EarPlugin.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public void apply(final Project project) {
    project.getPlugins().apply(BasePlugin.class);

    final EarPluginConvention earPluginConvention = instantiator.newInstance(EarPluginConvention.class, fileResolver, instantiator);
    project.getConvention().getPlugins().put("ear", earPluginConvention);
    earPluginConvention.setLibDirName("lib");
    earPluginConvention.setAppDirName("src/main/application");

    wireEarTaskConventions(project, earPluginConvention);
    configureConfigurations(project);

    PluginContainer plugins = project.getPlugins();

    setupEarTask(project, earPluginConvention);

    configureWithJavaPluginApplied(project, earPluginConvention, plugins);
    configureWithNoJavaPluginApplied(project, earPluginConvention);
}
 
Example 4
Source File: EarPlugin.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
public void apply(final Project project) {
    project.getPlugins().apply(BasePlugin.class);

    final EarPluginConvention earPluginConvention = instantiator.newInstance(EarPluginConvention.class, fileResolver);
    project.getConvention().getPlugins().put("ear", earPluginConvention);
    earPluginConvention.setLibDirName("lib");
    earPluginConvention.setAppDirName("src/main/application");

    wireEarTaskConventions(project, earPluginConvention);
    configureConfigurations(project);

    PluginContainer plugins = project.getPlugins();

    setupEarTask(project, earPluginConvention);

    configureWithJavaPluginApplied(project, earPluginConvention, plugins);
    configureWithNoJavaPluginApplied(project, earPluginConvention);
}
 
Example 5
Source File: PluginManager.java    From atlas with Apache License 2.0 3 votes vote down vote up
public static void addPluginIfNot(Project project, Class<? extends Plugin> pluginClazz){

        PluginContainer pluginManager = project.getPlugins();

        if (pluginManager.hasPlugin(pluginClazz)){
            return;
        }

        pluginManager.apply(pluginClazz);


    }