org.gradle.initialization.ProjectAccessListener Java Examples
The following examples show how to use
org.gradle.initialization.ProjectAccessListener.
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: DefaultProjectDependency.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
public DefaultProjectDependency(ProjectInternal dependencyProject, String configuration, ProjectAccessListener projectAccessListener, boolean buildProjectDependencies) { super(configuration); this.dependencyProject = dependencyProject; this.projectAccessListener = projectAccessListener; this.buildProjectDependencies = buildProjectDependencies; }
Example #2
Source File: DependencyManagementBuildScopeServices.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
DependencyFactory createDependencyFactory(Instantiator instantiator, ProjectAccessListener projectAccessListener, StartParameter startParameter, ClassPathRegistry classPathRegistry, FileLookup fileLookup) { DefaultProjectDependencyFactory factory = new DefaultProjectDependencyFactory( projectAccessListener, instantiator, startParameter.isBuildProjectDependencies()); ProjectDependencyFactory projectDependencyFactory = new ProjectDependencyFactory(factory); return new DefaultDependencyFactory( DependencyNotationParser.parser(instantiator, factory, classPathRegistry, fileLookup), new ClientModuleNotationParserFactory(instantiator).create(), projectDependencyFactory); }
Example #3
Source File: DependencyManagementBuildScopeServices.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
DependencyFactory createDependencyFactory(Instantiator instantiator, ProjectAccessListener projectAccessListener, StartParameter startParameter, ClassPathRegistry classPathRegistry, FileLookup fileLookup) { DefaultProjectDependencyFactory factory = new DefaultProjectDependencyFactory( projectAccessListener, instantiator, startParameter.isBuildProjectDependencies()); ProjectDependencyFactory projectDependencyFactory = new ProjectDependencyFactory(factory); return new DefaultDependencyFactory( DependencyNotationParser.parser(instantiator, factory, classPathRegistry, fileLookup), new ClientModuleNotationParserFactory(instantiator).create(), projectDependencyFactory); }
Example #4
Source File: DefaultProjectDependency.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
public DefaultProjectDependency(ProjectInternal dependencyProject, String configuration, ProjectAccessListener projectAccessListener, boolean buildProjectDependencies) { super(configuration); this.dependencyProject = dependencyProject; this.projectAccessListener = projectAccessListener; this.buildProjectDependencies = buildProjectDependencies; }
Example #5
Source File: DependencyManagementBuildScopeServices.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
DependencyFactory createDependencyFactory(Instantiator instantiator, ProjectAccessListener projectAccessListener, StartParameter startParameter, ClassPathRegistry classPathRegistry, FileLookup fileLookup) { DefaultProjectDependencyFactory factory = new DefaultProjectDependencyFactory( projectAccessListener, instantiator, startParameter.isBuildProjectDependencies()); ProjectDependencyFactory projectDependencyFactory = new ProjectDependencyFactory(factory); DependencyProjectNotationParser projParser = new DependencyProjectNotationParser(factory); NotationParser<Object, ? extends Dependency> moduleMapParser = new DependencyMapNotationParser<DefaultExternalModuleDependency>(instantiator, DefaultExternalModuleDependency.class); NotationParser<Object, ? extends Dependency> moduleStringParser = new DependencyStringNotationParser<DefaultExternalModuleDependency>(instantiator, DefaultExternalModuleDependency.class); NotationParser<Object, ? extends Dependency> selfResolvingDependencyFactory = new DependencyFilesNotationParser(instantiator); List<NotationParser<Object, ? extends Dependency>> notationParsers = Arrays.asList( moduleStringParser, moduleMapParser, selfResolvingDependencyFactory, projParser, new DependencyClassPathNotationParser(instantiator, classPathRegistry, fileLookup.getFileResolver())); return new DefaultDependencyFactory( new DependencyNotationParser(notationParsers), new ClientModuleNotationParserFactory(instantiator).create(), projectDependencyFactory); }
Example #6
Source File: DefaultProjectDependency.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
public DefaultProjectDependency(ProjectInternal dependencyProject, String configuration, ProjectAccessListener projectAccessListener, boolean buildProjectDependencies) { super(configuration); this.dependencyProject = dependencyProject; this.projectAccessListener = projectAccessListener; this.buildProjectDependencies = buildProjectDependencies; }
Example #7
Source File: DependencyManagementBuildScopeServices.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
DependencyFactory createDependencyFactory(Instantiator instantiator, ProjectAccessListener projectAccessListener, StartParameter startParameter, ClassPathRegistry classPathRegistry, FileLookup fileLookup) { DefaultProjectDependencyFactory factory = new DefaultProjectDependencyFactory( projectAccessListener, instantiator, startParameter.isBuildProjectDependencies()); ProjectDependencyFactory projectDependencyFactory = new ProjectDependencyFactory(factory); DependencyProjectNotationParser projParser = new DependencyProjectNotationParser(factory); NotationParser<Object, ? extends Dependency> moduleMapParser = new DependencyMapNotationParser<DefaultExternalModuleDependency>(instantiator, DefaultExternalModuleDependency.class); NotationParser<Object, ? extends Dependency> moduleStringParser = new DependencyStringNotationParser<DefaultExternalModuleDependency>(instantiator, DefaultExternalModuleDependency.class); NotationParser<Object, ? extends Dependency> selfResolvingDependencyFactory = new DependencyFilesNotationParser(instantiator); List<NotationParser<Object, ? extends Dependency>> notationParsers = Arrays.asList( moduleStringParser, moduleMapParser, selfResolvingDependencyFactory, projParser, new DependencyClassPathNotationParser(instantiator, classPathRegistry, fileLookup.getFileResolver())); return new DefaultDependencyFactory( new DependencyNotationParser(notationParsers), new ClientModuleNotationParserFactory(instantiator).create(), projectDependencyFactory); }
Example #8
Source File: DefaultProjectDependency.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
public DefaultProjectDependency(ProjectInternal dependencyProject, String configuration, ProjectAccessListener projectAccessListener, boolean buildProjectDependencies) { super(configuration); this.dependencyProject = dependencyProject; this.projectAccessListener = projectAccessListener; this.buildProjectDependencies = buildProjectDependencies; }
Example #9
Source File: DefaultProjectDependencyFactory.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultProjectDependencyFactory(ProjectAccessListener projectAccessListener, Instantiator instantiator, boolean buildProjectDependencies) { this.projectAccessListener = projectAccessListener; this.instantiator = instantiator; this.buildProjectDependencies = buildProjectDependencies; }
Example #10
Source File: DefaultTaskContainerFactory.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultTaskContainerFactory(Instantiator instantiator, ITaskFactory taskFactory, Project project, ProjectAccessListener projectAccessListener) { this.instantiator = instantiator; this.taskFactory = taskFactory; this.project = project; this.projectAccessListener = projectAccessListener; }
Example #11
Source File: DefaultProjectDependency.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultProjectDependency(ProjectInternal dependencyProject, ProjectAccessListener projectAccessListener, boolean buildProjectDependencies) { this(dependencyProject, null, projectAccessListener, buildProjectDependencies); }
Example #12
Source File: ProjectScopeServices.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
protected Factory<TaskContainerInternal> createTaskContainerInternal() { return new DefaultTaskContainerFactory(get(Instantiator.class), get(ITaskFactory.class), project, get(ProjectAccessListener.class)); }
Example #13
Source File: GradleDependencyResolutionHelper.java From thorntail with Apache License 2.0 | 4 votes |
/** * Resolve the given artifact specifications. * * @param project the Gradle project reference. * @param specs the specifications that need to be resolved. * @param transitive should the artifacts be resolved transitively? * @param excludeDefaults should we skip resolving artifacts that belong to the Thorntail group? * @return collection of resolved artifact specifications. */ public static Set<ArtifactSpec> resolveArtifacts(Project project, Collection<ArtifactSpec> specs, boolean transitive, boolean excludeDefaults) { if (project == null) { throw new IllegalArgumentException("Gradle project reference cannot be null."); } if (specs == null) { project.getLogger().warn("Artifact specification collection is null."); return Collections.emptySet(); } // Early return if there is nothing to resolve. if (specs.isEmpty()) { return Collections.emptySet(); } final Configuration config = project.getConfigurations().detachedConfiguration().setTransitive(transitive); final DependencySet dependencySet = config.getDependencies(); final Map<String, Project> projectGAVCoordinates = getAllProjects(project); final ProjectAccessListener listener = new DefaultProjectAccessListener(); Set<ArtifactSpec> result = new HashSet<>(); specs.forEach(s -> { // 1. Do we need to resolve this entry? final String specGAV = String.format(GROUP_ARTIFACT_VERSION_FORMAT, s.groupId(), s.artifactId(), s.version()); boolean resolved = s.file != null; boolean projectEntry = projectGAVCoordinates.containsKey(specGAV); // 2. Should we skip this spec? if (excludeDefaults && FractionDescriptor.THORNTAIL_GROUP_ID.equals(s.groupId()) && !projectEntry) { return; } // 3. Should this entry be resolved? if (!resolved || transitive) { // a.) Does this entry represent a project dependency? if (projectGAVCoordinates.containsKey(specGAV)) { dependencySet.add(new DefaultProjectDependency((ProjectInternal) projectGAVCoordinates.get(specGAV), listener, false)); } else { DefaultExternalModuleDependency d = new DefaultExternalModuleDependency(s.groupId(), s.artifactId(), s.version()); DefaultDependencyArtifact da = new DefaultDependencyArtifact(s.artifactId(), s.type(), s.type(), s.classifier(), null); d.addArtifact(da); dependencySet.add(d); } } else { // 4. Nothing else to do, just add the spec to the result. result.add(s); } }); // 5. Are there any specs that need resolution? if (!dependencySet.isEmpty()) { config.getResolvedConfiguration().getResolvedArtifacts().stream() .map(ra -> asDescriptor("compile", ra).toArtifactSpec()) .forEach(result::add); } return result; }
Example #14
Source File: DefaultTaskContainer.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultTaskContainer(ProjectInternal project, Instantiator instantiator, ITaskFactory taskFactory, ProjectAccessListener projectAccessListener) { super(Task.class, instantiator, project); this.taskFactory = taskFactory; this.projectAccessListener = projectAccessListener; }
Example #15
Source File: DefaultTaskContainerFactory.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultTaskContainerFactory(Instantiator instantiator, ITaskFactory taskFactory, Project project, ProjectAccessListener projectAccessListener) { this.instantiator = instantiator; this.taskFactory = taskFactory; this.project = project; this.projectAccessListener = projectAccessListener; }
Example #16
Source File: DefaultProjectDependency.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultProjectDependency(ProjectInternal dependencyProject, ProjectAccessListener projectAccessListener, boolean buildProjectDependencies) { this(dependencyProject, null, projectAccessListener, buildProjectDependencies); }
Example #17
Source File: ProjectScopeServices.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
protected Factory<TaskContainerInternal> createTaskContainerInternal() { return new DefaultTaskContainerFactory(get(Instantiator.class), get(ITaskFactory.class), project, get(ProjectAccessListener.class)); }
Example #18
Source File: DefaultTaskContainer.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultTaskContainer(ProjectInternal project, Instantiator instantiator, ITaskFactory taskFactory, ProjectAccessListener projectAccessListener) { super(Task.class, instantiator, project); this.taskFactory = taskFactory; this.projectAccessListener = projectAccessListener; }
Example #19
Source File: DefaultProjectDependencyFactory.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultProjectDependencyFactory(ProjectAccessListener projectAccessListener, Instantiator instantiator, boolean buildProjectDependencies) { this.projectAccessListener = projectAccessListener; this.instantiator = instantiator; this.buildProjectDependencies = buildProjectDependencies; }
Example #20
Source File: ProjectScopeServices.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
protected Factory<TaskContainerInternal> createTaskContainerInternal() { return new DefaultTaskContainerFactory(get(Instantiator.class), get(ITaskFactory.class), project, get(ProjectAccessListener.class)); }
Example #21
Source File: DefaultProjectDependency.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultProjectDependency(ProjectInternal dependencyProject, ProjectAccessListener projectAccessListener, boolean buildProjectDependencies) { this(dependencyProject, null, projectAccessListener, buildProjectDependencies); }
Example #22
Source File: DefaultTaskContainerFactory.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultTaskContainerFactory(Instantiator instantiator, ITaskFactory taskFactory, Project project, ProjectAccessListener projectAccessListener) { this.instantiator = instantiator; this.taskFactory = taskFactory; this.project = project; this.projectAccessListener = projectAccessListener; }
Example #23
Source File: DefaultTaskContainer.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultTaskContainer(ProjectInternal project, Instantiator instantiator, ITaskFactory taskFactory, ProjectAccessListener projectAccessListener) { super(Task.class, instantiator, project); this.taskFactory = taskFactory; this.projectAccessListener = projectAccessListener; }
Example #24
Source File: DefaultProjectDependencyFactory.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultProjectDependencyFactory(ProjectAccessListener projectAccessListener, Instantiator instantiator, boolean buildProjectDependencies) { this.projectAccessListener = projectAccessListener; this.instantiator = instantiator; this.buildProjectDependencies = buildProjectDependencies; }
Example #25
Source File: ProjectScopeServices.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
protected Factory<TaskContainerInternal> createTaskContainerInternal() { return new DefaultTaskContainerFactory(get(Instantiator.class), get(ITaskFactory.class), project, get(ProjectAccessListener.class)); }
Example #26
Source File: DefaultProjectDependency.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultProjectDependency(ProjectInternal dependencyProject, ProjectAccessListener projectAccessListener, boolean buildProjectDependencies) { this(dependencyProject, null, projectAccessListener, buildProjectDependencies); }
Example #27
Source File: DefaultTaskContainerFactory.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultTaskContainerFactory(Instantiator instantiator, ITaskFactory taskFactory, Project project, ProjectAccessListener projectAccessListener) { this.instantiator = instantiator; this.taskFactory = taskFactory; this.project = project; this.projectAccessListener = projectAccessListener; }
Example #28
Source File: DefaultTaskContainer.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultTaskContainer(ProjectInternal project, Instantiator instantiator, ITaskFactory taskFactory, ProjectAccessListener projectAccessListener) { super(Task.class, instantiator, project); this.taskFactory = taskFactory; this.projectAccessListener = projectAccessListener; }
Example #29
Source File: DefaultProjectDependencyFactory.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public DefaultProjectDependencyFactory(ProjectAccessListener projectAccessListener, Instantiator instantiator, boolean buildProjectDependencies) { this.projectAccessListener = projectAccessListener; this.instantiator = instantiator; this.buildProjectDependencies = buildProjectDependencies; }