org.gradle.api.artifacts.ResolveException Java Examples
The following examples show how to use
org.gradle.api.artifacts.ResolveException.
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: PluginResolutionServiceResolver.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
private ClassPath resolvePluginDependencies(final PluginUseMetaData metadata) { DependencyResolutionServices resolution = dependencyResolutionServicesFactory.create(); RepositoryHandler repositories = resolution.getResolveRepositoryHandler(); final String repoUrl = metadata.implementation.get("repo"); repositories.maven(new Action<MavenArtifactRepository>() { public void execute(MavenArtifactRepository mavenArtifactRepository) { mavenArtifactRepository.setUrl(repoUrl); } }); Dependency dependency = resolution.getDependencyHandler().create(metadata.implementation.get("gav")); ConfigurationContainerInternal configurations = (ConfigurationContainerInternal) resolution.getConfigurationContainer(); ConfigurationInternal configuration = configurations.detachedConfiguration(dependency); try { Set<File> files = configuration.getResolvedConfiguration().getFiles(Specs.satisfyAll()); return new DefaultClassPath(files); } catch (ResolveException e) { throw new DependencyResolutionException("Failed to resolve all plugin dependencies from " + repoUrl, e.getCause()); } }
Example #2
Source File: PluginResolutionServiceResolver.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
private ClassPath resolvePluginDependencies(final PluginUseMetaData metadata) { DependencyResolutionServices resolution = dependencyResolutionServicesFactory.create(); RepositoryHandler repositories = resolution.getResolveRepositoryHandler(); final String repoUrl = metadata.implementation.get("repo"); repositories.maven(new Action<MavenArtifactRepository>() { public void execute(MavenArtifactRepository mavenArtifactRepository) { mavenArtifactRepository.setUrl(repoUrl); } }); Dependency dependency = resolution.getDependencyHandler().create(metadata.implementation.get("gav")); ConfigurationContainerInternal configurations = (ConfigurationContainerInternal) resolution.getConfigurationContainer(); ConfigurationInternal configuration = configurations.detachedConfiguration(dependency); try { Set<File> files = configuration.getResolvedConfiguration().getFiles(Specs.satisfyAll()); return new DefaultClassPath(files); } catch (ResolveException e) { throw new DependencyResolutionException("Failed to resolve all plugin dependencies from " + repoUrl, e.getCause()); } }
Example #3
Source File: CacheLockingArtifactDependencyResolver.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
public void resolve(final ConfigurationInternal configuration, final List<? extends ResolutionAwareRepository> repositories, final GlobalDependencyResolutionRules metadataHandler, final ResolverResults results) throws ResolveException { lockingManager.useCache(String.format("resolve %s", configuration), new Runnable() { public void run() { resolver.resolve(configuration, repositories, metadataHandler, results); } }); }
Example #4
Source File: CacheLockingArtifactDependencyResolver.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
public void resolve(final ConfigurationInternal configuration, final List<? extends ResolutionAwareRepository> repositories, final ModuleMetadataProcessor metadataProcessor, final ResolverResults results) throws ResolveException { lockingManager.useCache(String.format("resolve %s", configuration), new Runnable() { public void run() { resolver.resolve(configuration, repositories, metadataProcessor, results); } }); }
Example #5
Source File: CacheLockingArtifactDependencyResolver.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
public void resolve(final ConfigurationInternal configuration, final List<? extends ResolutionAwareRepository> repositories, final GlobalDependencyResolutionRules metadataHandler, final ResolverResults results) throws ResolveException { lockingManager.useCache(String.format("resolve %s", configuration), new Runnable() { public void run() { resolver.resolve(configuration, repositories, metadataHandler, results); } }); }
Example #6
Source File: DependencyTaskTest.java From play-services-plugins with Apache License 2.0 | 5 votes |
@Test public void testGetResolvedArtifacts_ResolveException() { ResolvedConfiguration resolvedConfiguration = mock(ResolvedConfiguration.class); when(resolvedConfiguration.getLenientConfiguration()).thenThrow(ResolveException.class); Configuration configuration = mock(Configuration.class); when(configuration.getName()).thenReturn("compile"); when(configuration.isCanBeResolved()).thenReturn(true); when(configuration.getResolvedConfiguration()).thenReturn(resolvedConfiguration); assertThat(dependencyTask.getResolvedArtifacts(configuration), is(nullValue())); }
Example #7
Source File: CacheLockingArtifactDependencyResolver.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
public void resolve(final ConfigurationInternal configuration, final List<? extends ResolutionAwareRepository> repositories, final ModuleMetadataProcessor metadataProcessor, final ResolverResults results) throws ResolveException { lockingManager.useCache(String.format("resolve %s", configuration), new Runnable() { public void run() { resolver.resolve(configuration, repositories, metadataProcessor, results); } }); }
Example #8
Source File: DefaultConfigurationResolver.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public ResolverResults resolve(ConfigurationInternal configuration) throws ResolveException { List<ResolutionAwareRepository> resolutionAwareRepositories = CollectionUtils.collect(repositories, Transformers.cast(ResolutionAwareRepository.class)); ResolverResults results = new ResolverResults(); resolver.resolve(configuration, resolutionAwareRepositories, metadataProcessor, results); return results; }
Example #9
Source File: ArtifactDependencyResolver.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
void resolve(ConfigurationInternal configuration, List<? extends ResolutionAwareRepository> repositories, ModuleMetadataProcessor metadataProcessor, ResolverResults results) throws ResolveException;
Example #10
Source File: ResolverResults.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public void failed(ResolvedConfiguration resolvedConfiguration, ResolveException failure) { this.resolvedConfiguration = resolvedConfiguration; this.resolutionResult = null; this.fatalFailure = failure; }
Example #11
Source File: DefaultConfigurationResolver.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public ResolverResults resolve(ConfigurationInternal configuration) throws ResolveException { List<ResolutionAwareRepository> resolutionAwareRepositories = CollectionUtils.collect(repositories, Transformers.cast(ResolutionAwareRepository.class)); ResolverResults results = new ResolverResults(); resolver.resolve(configuration, resolutionAwareRepositories, metadataProcessor, results); return results; }
Example #12
Source File: DefaultConfigurationResolver.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public ResolverResults resolve(ConfigurationInternal configuration) throws ResolveException { List<ResolutionAwareRepository> resolutionAwareRepositories = CollectionUtils.collect(repositories, Transformers.cast(ResolutionAwareRepository.class)); ResolverResults results = new ResolverResults(); resolver.resolve(configuration, resolutionAwareRepositories, metadataHandler, results); return results; }
Example #13
Source File: ArtifactDependencyResolver.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
void resolve(ConfigurationInternal configuration, List<? extends ResolutionAwareRepository> repositories, GlobalDependencyResolutionRules metadataHandler, ResolverResults results) throws ResolveException;
Example #14
Source File: ResolverResults.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public void failed(ResolvedConfiguration resolvedConfiguration, ResolveException failure) { this.resolvedConfiguration = resolvedConfiguration; this.resolutionResult = null; this.fatalFailure = failure; }
Example #15
Source File: DefaultConfigurationResolver.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public ResolverResults resolve(ConfigurationInternal configuration) throws ResolveException { List<ResolutionAwareRepository> resolutionAwareRepositories = CollectionUtils.collect(repositories, Transformers.cast(ResolutionAwareRepository.class)); ResolverResults results = new ResolverResults(); resolver.resolve(configuration, resolutionAwareRepositories, metadataHandler, results); return results; }
Example #16
Source File: ResolverResults.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public void failed(ResolvedConfiguration resolvedConfiguration, ResolveException failure) { this.resolvedConfiguration = resolvedConfiguration; this.resolutionResult = null; this.fatalFailure = failure; }
Example #17
Source File: ArtifactDependencyResolver.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
void resolve(ConfigurationInternal configuration, List<? extends ResolutionAwareRepository> repositories, GlobalDependencyResolutionRules metadataHandler, ResolverResults results) throws ResolveException;
Example #18
Source File: ArtifactDependencyResolver.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
void resolve(ConfigurationInternal configuration, List<? extends ResolutionAwareRepository> repositories, ModuleMetadataProcessor metadataProcessor, ResolverResults results) throws ResolveException;
Example #19
Source File: ResolverResults.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public void failed(ResolvedConfiguration resolvedConfiguration, ResolveException failure) { this.resolvedConfiguration = resolvedConfiguration; this.resolutionResult = null; this.fatalFailure = failure; }
Example #20
Source File: ConfigurationResolver.java From Pushjet-Android with BSD 2-Clause "Simplified" License | votes |
ResolverResults resolve(ConfigurationInternal configuration) throws ResolveException;
Example #21
Source File: ConfigurationResolver.java From pushfish-android with BSD 2-Clause "Simplified" License | votes |
ResolverResults resolve(ConfigurationInternal configuration) throws ResolveException;
Example #22
Source File: ConfigurationResolver.java From pushfish-android with BSD 2-Clause "Simplified" License | votes |
ResolverResults resolve(ConfigurationInternal configuration) throws ResolveException;
Example #23
Source File: ConfigurationResolver.java From Pushjet-Android with BSD 2-Clause "Simplified" License | votes |
ResolverResults resolve(ConfigurationInternal configuration) throws ResolveException;