org.gradle.api.plugins.PluginContainer Java Examples
The following examples show how to use
org.gradle.api.plugins.PluginContainer.
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: BaseSettings.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
public BaseSettings(ServiceRegistryFactory serviceRegistryFactory, GradleInternal gradle, ClassLoaderScope classLoaderScope, File settingsDir, ScriptSource settingsScript, StartParameter startParameter) { this.gradle = gradle; this.settingsDir = settingsDir; this.settingsScript = settingsScript; this.startParameter = startParameter; this.classLoaderScope = classLoaderScope; ServiceRegistry services = serviceRegistryFactory.createFor(this); this.plugins = services.get(PluginContainer.class); this.fileResolver = services.get(FileResolver.class); this.scriptPluginFactory = services.get(ScriptPluginFactory.class); this.scriptHandlerFactory = services.get(ScriptHandlerFactory.class); this.projectDescriptorRegistry = services.get(ProjectDescriptorRegistry.class); rootProjectDescriptor = createProjectDescriptor(null, settingsDir.getName(), settingsDir); }
Example #2
Source File: DefaultGradle.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
public DefaultGradle(Gradle parent, StartParameter startParameter, ServiceRegistryFactory parentRegistry) { this.parent = parent; this.startParameter = startParameter; this.services = parentRegistry.createFor(this); this.listenerManager = services.get(ListenerManager.class); taskGraph = services.get(TaskGraphExecuter.class); distributionLocator = services.get(GradleDistributionLocator.class); classLoaderScope = services.get(ClassLoaderScopeRegistry.class).getCoreAndPluginsScope(); pluginContainer = services.get(PluginContainer.class); fileResolver = services.get(FileResolver.class); scriptPluginFactory = services.get(ScriptPluginFactory.class); scriptHandlerFactory = services.get(ScriptHandlerFactory.class); buildListenerBroadcast = listenerManager.createAnonymousBroadcaster(BuildListener.class); projectEvaluationListenerBroadcast = listenerManager.createAnonymousBroadcaster(ProjectEvaluationListener.class); buildListenerBroadcast.add(new BuildAdapter() { @Override public void projectsLoaded(Gradle gradle) { rootProjectActions.execute(rootProject); rootProjectActions = null; } }); }
Example #3
Source File: BaseSettings.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
public BaseSettings(ServiceRegistryFactory serviceRegistryFactory, GradleInternal gradle, ClassLoaderScope classLoaderScope, ClassLoaderScope rootClassLoaderScope, File settingsDir, ScriptSource settingsScript, StartParameter startParameter) { this.gradle = gradle; this.rootClassLoaderScope = rootClassLoaderScope; this.settingsDir = settingsDir; this.settingsScript = settingsScript; this.startParameter = startParameter; this.classLoaderScope = classLoaderScope; ServiceRegistry services = serviceRegistryFactory.createFor(this); this.plugins = services.get(PluginContainer.class); this.fileResolver = services.get(FileResolver.class); this.scriptPluginFactory = services.get(ScriptPluginFactory.class); this.scriptHandlerFactory = services.get(ScriptHandlerFactory.class); this.projectDescriptorRegistry = services.get(ProjectDescriptorRegistry.class); rootProjectDescriptor = createProjectDescriptor(null, settingsDir.getName(), settingsDir); }
Example #4
Source File: EarPlugin.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
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 #5
Source File: EarPlugin.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
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 #6
Source File: DefaultGradle.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
public DefaultGradle(Gradle parent, StartParameter startParameter, ServiceRegistryFactory parentRegistry) { this.parent = parent; this.startParameter = startParameter; this.services = parentRegistry.createFor(this); this.listenerManager = services.get(ListenerManager.class); taskGraph = services.get(TaskGraphExecuter.class); distributionLocator = services.get(GradleDistributionLocator.class); classLoaderScope = services.get(ClassLoaderScope.class); pluginContainer = services.get(PluginContainer.class); fileResolver = services.get(FileResolver.class); scriptPluginFactory = services.get(ScriptPluginFactory.class); scriptHandlerFactory = services.get(ScriptHandlerFactory.class); buildListenerBroadcast = listenerManager.createAnonymousBroadcaster(BuildListener.class); projectEvaluationListenerBroadcast = listenerManager.createAnonymousBroadcaster(ProjectEvaluationListener.class); buildListenerBroadcast.add(new BuildAdapter() { @Override public void projectsLoaded(Gradle gradle) { rootProjectActions.execute(rootProject); rootProjectActions = null; } }); }
Example #7
Source File: BaseSettings.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
public BaseSettings(ServiceRegistryFactory serviceRegistryFactory, GradleInternal gradle, ClassLoaderScope classLoaderScope, File settingsDir, ScriptSource settingsScript, StartParameter startParameter) { this.gradle = gradle; this.settingsDir = settingsDir; this.settingsScript = settingsScript; this.startParameter = startParameter; this.classLoaderScope = classLoaderScope; ServiceRegistry services = serviceRegistryFactory.createFor(this); this.plugins = services.get(PluginContainer.class); this.fileResolver = services.get(FileResolver.class); this.scriptPluginFactory = services.get(ScriptPluginFactory.class); this.scriptHandlerFactory = services.get(ScriptHandlerFactory.class); this.projectDescriptorRegistry = services.get(ProjectDescriptorRegistry.class); rootProjectDescriptor = createProjectDescriptor(null, settingsDir.getName(), settingsDir); }
Example #8
Source File: EarPlugin.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
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 #9
Source File: EarPlugin.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
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 #10
Source File: BaseSettings.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
public BaseSettings(ServiceRegistryFactory serviceRegistryFactory, GradleInternal gradle, ClassLoaderScope classLoaderScope, ClassLoaderScope rootClassLoaderScope, File settingsDir, ScriptSource settingsScript, StartParameter startParameter) { this.gradle = gradle; this.rootClassLoaderScope = rootClassLoaderScope; this.settingsDir = settingsDir; this.settingsScript = settingsScript; this.startParameter = startParameter; this.classLoaderScope = classLoaderScope; ServiceRegistry services = serviceRegistryFactory.createFor(this); this.plugins = services.get(PluginContainer.class); this.fileResolver = services.get(FileResolver.class); this.scriptPluginFactory = services.get(ScriptPluginFactory.class); this.scriptHandlerFactory = services.get(ScriptHandlerFactory.class); this.projectDescriptorRegistry = services.get(ProjectDescriptorRegistry.class); rootProjectDescriptor = createProjectDescriptor(null, settingsDir.getName(), settingsDir); }
Example #11
Source File: DefaultGradle.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
public DefaultGradle(Gradle parent, StartParameter startParameter, ServiceRegistryFactory parentRegistry) { this.parent = parent; this.startParameter = startParameter; this.services = parentRegistry.createFor(this); this.listenerManager = services.get(ListenerManager.class); taskGraph = services.get(TaskGraphExecuter.class); distributionLocator = services.get(GradleDistributionLocator.class); classLoaderScope = services.get(ClassLoaderScopeRegistry.class).getCoreAndPluginsScope(); pluginContainer = services.get(PluginContainer.class); fileResolver = services.get(FileResolver.class); scriptPluginFactory = services.get(ScriptPluginFactory.class); scriptHandlerFactory = services.get(ScriptHandlerFactory.class); buildListenerBroadcast = listenerManager.createAnonymousBroadcaster(BuildListener.class); projectEvaluationListenerBroadcast = listenerManager.createAnonymousBroadcaster(ProjectEvaluationListener.class); buildListenerBroadcast.add(new BuildAdapter() { @Override public void projectsLoaded(Gradle gradle) { rootProjectActions.execute(rootProject); rootProjectActions = null; } }); }
Example #12
Source File: DefaultGradle.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
public DefaultGradle(Gradle parent, StartParameter startParameter, ServiceRegistryFactory parentRegistry) { this.parent = parent; this.startParameter = startParameter; this.services = parentRegistry.createFor(this); this.listenerManager = services.get(ListenerManager.class); taskGraph = services.get(TaskGraphExecuter.class); distributionLocator = services.get(GradleDistributionLocator.class); classLoaderScope = services.get(ClassLoaderScope.class); pluginContainer = services.get(PluginContainer.class); fileResolver = services.get(FileResolver.class); scriptPluginFactory = services.get(ScriptPluginFactory.class); scriptHandlerFactory = services.get(ScriptHandlerFactory.class); buildListenerBroadcast = listenerManager.createAnonymousBroadcaster(BuildListener.class); projectEvaluationListenerBroadcast = listenerManager.createAnonymousBroadcaster(ProjectEvaluationListener.class); buildListenerBroadcast.add(new BuildAdapter() { @Override public void projectsLoaded(Gradle gradle) { rootProjectActions.execute(rootProject); rootProjectActions = null; } }); }
Example #13
Source File: EarPlugin.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
private void configureWithJavaPluginApplied(final Project project, final EarPluginConvention earPluginConvention, PluginContainer plugins) { plugins.withType(JavaPlugin.class, new Action<JavaPlugin>() { public void execute(JavaPlugin javaPlugin) { final JavaPluginConvention javaPluginConvention = project.getConvention().findPlugin(JavaPluginConvention.class); SourceSet sourceSet = javaPluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME); sourceSet.getResources().srcDir(new Callable() { public Object call() throws Exception { return earPluginConvention.getAppDirName(); } }); project.getTasks().withType(Ear.class, new Action<Ear>() { public void execute(final Ear task) { task.dependsOn(new Callable<FileCollection>() { public FileCollection call() throws Exception { return javaPluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME) .getRuntimeClasspath(); } }); task.from(new Callable<FileCollection>() { public FileCollection call() throws Exception { return javaPluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME).getOutput(); } }); } }); } }); }
Example #14
Source File: EarPlugin.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
private void configureWithJavaPluginApplied(final Project project, final EarPluginConvention earPluginConvention, PluginContainer plugins) { plugins.withType(JavaPlugin.class, new Action<JavaPlugin>() { public void execute(JavaPlugin javaPlugin) { final JavaPluginConvention javaPluginConvention = project.getConvention().findPlugin(JavaPluginConvention.class); SourceSet sourceSet = javaPluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME); sourceSet.getResources().srcDir(new Callable() { public Object call() throws Exception { return earPluginConvention.getAppDirName(); } }); project.getTasks().withType(Ear.class, new Action<Ear>() { public void execute(final Ear task) { task.dependsOn(new Callable<FileCollection>() { public FileCollection call() throws Exception { return javaPluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME) .getRuntimeClasspath(); } }); task.from(new Callable<FileCollection>() { public FileCollection call() throws Exception { return javaPluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME).getOutput(); } }); } }); } }); }
Example #15
Source File: EarPlugin.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
private void configureWithJavaPluginApplied(final Project project, final EarPluginConvention earPluginConvention, PluginContainer plugins) { plugins.withType(JavaPlugin.class, new Action<JavaPlugin>() { public void execute(JavaPlugin javaPlugin) { final JavaPluginConvention javaPluginConvention = project.getConvention().findPlugin(JavaPluginConvention.class); SourceSet sourceSet = javaPluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME); sourceSet.getResources().srcDir(new Callable() { public Object call() throws Exception { return earPluginConvention.getAppDirName(); } }); project.getTasks().withType(Ear.class, new Action<Ear>() { public void execute(final Ear task) { task.dependsOn(new Callable<FileCollection>() { public FileCollection call() throws Exception { return javaPluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME) .getRuntimeClasspath(); } }); task.from(new Callable<FileCollection>() { public FileCollection call() throws Exception { return javaPluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME).getOutput(); } }); } }); } }); }
Example #16
Source File: EarPlugin.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
private void configureWithJavaPluginApplied(final Project project, final EarPluginConvention earPluginConvention, PluginContainer plugins) { plugins.withType(JavaPlugin.class, new Action<JavaPlugin>() { public void execute(JavaPlugin javaPlugin) { final JavaPluginConvention javaPluginConvention = project.getConvention().findPlugin(JavaPluginConvention.class); SourceSet sourceSet = javaPluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME); sourceSet.getResources().srcDir(new Callable() { public Object call() throws Exception { return earPluginConvention.getAppDirName(); } }); project.getTasks().withType(Ear.class, new Action<Ear>() { public void execute(final Ear task) { task.dependsOn(new Callable<FileCollection>() { public FileCollection call() throws Exception { return javaPluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME) .getRuntimeClasspath(); } }); task.from(new Callable<FileCollection>() { public FileCollection call() throws Exception { return javaPluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME).getOutput(); } }); } }); } }); }
Example #17
Source File: SettingsScopeServices.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
protected PluginContainer createPluginContainer() { return new DefaultPluginContainer(get(PluginRegistry.class), settings); }
Example #18
Source File: DefaultGradle.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public PluginContainer getPlugins() { return pluginContainer; }
Example #19
Source File: ProjectScopeServices.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
protected PluginContainer createPluginContainer() { List<PluginApplicationAction> allPluginApplyActions = getAll(PluginApplicationAction.class); return new DefaultPluginContainer<Project>(get(PluginRegistry.class), project, allPluginApplyActions); }
Example #20
Source File: SettingsScopeServices.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
protected PluginContainer createPluginContainer() { return new DefaultPluginContainer(get(PluginRegistry.class), settings); }
Example #21
Source File: GradleScopeServices.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
PluginContainer createPluginContainer(GradleInternal gradle, PluginRegistry pluginRegistry) { return new DefaultPluginContainer<GradleInternal>(pluginRegistry, gradle); }
Example #22
Source File: AbstractProject.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public PluginContainer getPlugins() { return pluginContainer; }
Example #23
Source File: GradleScopeServices.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
PluginContainer createPluginContainer(GradleInternal gradle, PluginRegistry pluginRegistry) { return new DefaultPluginContainer<GradleInternal>(pluginRegistry, gradle); }
Example #24
Source File: ProjectScopeServices.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
protected PluginContainer createPluginContainer() { return new DefaultPluginContainer(get(PluginRegistry.class), project); }
Example #25
Source File: DefaultGradle.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public PluginContainer getPlugins() { return pluginContainer; }
Example #26
Source File: BaseSettings.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public PluginContainer getPlugins() { return plugins; }
Example #27
Source File: BaseSettings.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public PluginContainer getPlugins() { return plugins; }
Example #28
Source File: AbstractProject.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
@Inject public PluginContainer getPlugins() { // Decoration takes care of the implementation throw new UnsupportedOperationException(); }
Example #29
Source File: GradleScopeServices.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
PluginContainer createPluginContainer(GradleInternal gradle, PluginRegistry pluginRegistry) { return new DefaultPluginContainer<GradleInternal>(pluginRegistry, gradle); }
Example #30
Source File: SettingsScopeServices.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
protected PluginContainer createPluginContainer() { return new DefaultPluginContainer(get(PluginRegistry.class), settings); }