org.gradle.tooling.model.idea.IdeaModuleDependency Java Examples
The following examples show how to use
org.gradle.tooling.model.idea.IdeaModuleDependency.
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: GradleDependencyAdapter.java From thorntail with Apache License 2.0 | 6 votes |
/** * Compute the dependencies of a given {@code IdeaModule} and group them by their scope. * * Note: This method does not follow project->project dependencies. It just makes a note of them in a separate collection. * * @param module the IdeaModule reference. */ @SuppressWarnings("UnstableApiUsage") private void computeProjectDependencies(IdeaModule module) { ARTIFACT_DEPS_OF_PRJ.computeIfAbsent(module.getName(), moduleName -> { Map<String, Set<ArtifactSpec>> dependencies = new HashMap<>(); module.getDependencies().forEach(dep -> { if (dep instanceof IdeaModuleDependency) { // Add the dependency to the list. String name = ((IdeaModuleDependency) dep).getTargetModuleName(); PRJ_DEPS_OF_PRJ.computeIfAbsent(moduleName, key -> new HashSet<>()).add(name); } else if (dep instanceof ExternalDependency) { ExternalDependency extDep = (ExternalDependency) dep; GradleModuleVersion gav = extDep.getGradleModuleVersion(); ArtifactSpec spec = new ArtifactSpec("compile", gav.getGroup(), gav.getName(), gav.getVersion(), "jar", null, extDep.getFile()); String depScope = dep.getScope().getScope(); dependencies.computeIfAbsent(depScope, s -> new HashSet<>()).add(spec); } }); return dependencies; }); }
Example #2
Source File: ConsumerTargetTypeProvider.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public ConsumerTargetTypeProvider() { configuredTargetTypes.put(IdeaSingleEntryLibraryDependency.class.getCanonicalName(), IdeaSingleEntryLibraryDependency.class); configuredTargetTypes.put(IdeaModuleDependency.class.getCanonicalName(), IdeaModuleDependency.class); configuredTargetTypes.put(GradleFileBuildOutcome.class.getCanonicalName(), GradleFileBuildOutcome.class); }
Example #3
Source File: ConsumerTargetTypeProvider.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public ConsumerTargetTypeProvider() { configuredTargetTypes.put(IdeaSingleEntryLibraryDependency.class.getCanonicalName(), IdeaSingleEntryLibraryDependency.class); configuredTargetTypes.put(IdeaModuleDependency.class.getCanonicalName(), IdeaModuleDependency.class); configuredTargetTypes.put(GradleFileBuildOutcome.class.getCanonicalName(), GradleFileBuildOutcome.class); }
Example #4
Source File: ConsumerTargetTypeProvider.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public ConsumerTargetTypeProvider() { configuredTargetTypes.put(IdeaSingleEntryLibraryDependency.class.getCanonicalName(), IdeaSingleEntryLibraryDependency.class); configuredTargetTypes.put(IdeaModuleDependency.class.getCanonicalName(), IdeaModuleDependency.class); configuredTargetTypes.put(GradleFileBuildOutcome.class.getCanonicalName(), GradleFileBuildOutcome.class); }
Example #5
Source File: ConsumerTargetTypeProvider.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public ConsumerTargetTypeProvider() { configuredTargetTypes.put(IdeaSingleEntryLibraryDependency.class.getCanonicalName(), IdeaSingleEntryLibraryDependency.class); configuredTargetTypes.put(IdeaModuleDependency.class.getCanonicalName(), IdeaModuleDependency.class); configuredTargetTypes.put(GradleFileBuildOutcome.class.getCanonicalName(), GradleFileBuildOutcome.class); }