use of org.gradle.api.internal.plugins.PluginDescriptor in project gradle by gradle.
the class NotNonCorePluginOnClasspathCheckPluginResolver method resolve.
public void resolve(PluginRequestInternal pluginRequest, PluginResolutionResult result) {
PluginId pluginId = pluginRequest.getId();
PluginDescriptor pluginDescriptor = pluginDescriptorLocator.findPluginDescriptor(pluginId.toString());
if (pluginDescriptor == null || isCorePlugin(pluginId)) {
delegate.resolve(pluginRequest, result);
} else {
throw new InvalidPluginRequestException(pluginRequest, pluginOnClasspathErrorMessage(pluginId.toString()));
}
}
use of org.gradle.api.internal.plugins.PluginDescriptor in project gradle by gradle.
the class JavaGradlePluginPlugin method configureJarTask.
private void configureJarTask(Project project, GradlePluginDevelopmentExtension extension) {
Jar jarTask = (Jar) project.getTasks().findByName(JAR_TASK);
List<PluginDescriptor> descriptors = new ArrayList<PluginDescriptor>();
Set<String> classList = new HashSet<String>();
PluginDescriptorCollectorAction pluginDescriptorCollector = new PluginDescriptorCollectorAction(descriptors);
ClassManifestCollectorAction classManifestCollector = new ClassManifestCollectorAction(classList);
PluginValidationAction pluginValidationAction = new PluginValidationAction(extension.getPlugins(), descriptors, classList);
jarTask.filesMatching(PLUGIN_DESCRIPTOR_PATTERN, pluginDescriptorCollector);
jarTask.filesMatching(CLASSES_PATTERN, classManifestCollector);
jarTask.appendParallelSafeAction(pluginValidationAction);
}
Aggregations