Class AbstractDetectResolution
java.lang.Object
build.spin.module.java.AbstractDetectResolution
- All Implemented Interfaces:
build.spin.Task<build.spin.module.modulesystem.CompilationResolution>
- Direct Known Subclasses:
Java25CompilerPlugin.DetectCompilationResolution, Java8CompilerPlugin.DetectCompilationResolution
public abstract class AbstractDetectResolution
extends Object
implements build.spin.Task<build.spin.module.modulesystem.CompilationResolution>
An abstract
Task that resolves the source-graph dependency closure for a
JavaPlugin Project, partitioning all candidates into a
CompilationResolution (module-path vs classpath).
The algorithm has three steps:
- Walk the workspace-sibling transitive closure starting from the injected
the injected
JDKModuleDescriptor'srequiresClauses(). - Resolve each external require transitively via Aether (
Artifact.Resolver.resolveTransitive(Artifact)), so artifact-graph cycles are handled by the resolver rather than a hand-rolled BFS. - Classify all candidates via
ModuleGraphClassifier.classify(List, Set, Consumer)with the three-tier split-package policy (required-module preference → proper-over-automatic → demote-all).
Concrete subclasses are empty inner classes of the enclosing plugin, which is what
causes the DI framework to bind JDKModuleDescriptor to the correct plugin-scoped
descriptor (main vs test).
-
Nested Class Summary
Nested classes/interfaces inherited from interface build.spin.Task
build.spin.Task.Pattern -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stream<build.spin.module.modulesystem.Artifact> Subclasses may override this to supply additional infrastructureArtifacts that are always resolved transitively and included as classification candidates, regardless of whether the project explicitly declares them as dependencies.Subclasses may override this to inject additional candidate paths (e.g. the main compiled classes directory for a JUnit test plugin running in the same project).build.spin.module.modulesystem.CompilationResolutioncreate()Resolves the compilation dependency closure and classifies all candidates.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface build.spin.Task
dependencies, execute
-
Constructor Details
-
AbstractDetectResolution
public AbstractDetectResolution()
-
-
Method Details
-
additionalSiblingCandidates
Subclasses may override this to inject additional candidate paths (e.g. the main compiled classes directory for a JUnit test plugin running in the same project). These paths are prepended to the sibling candidates before classification. -
additionalArtifacts
Subclasses may override this to supply additional infrastructureArtifacts that are always resolved transitively and included as classification candidates, regardless of whether the project explicitly declares them as dependencies.This is the right place for build-tool runner JARs (e.g. the JUnit Platform ConsoleLauncher) that spin provides itself rather than expecting the project to declare.
- Returns:
- a
Streamof additionalArtifacts to resolve
-
create
public build.spin.module.modulesystem.CompilationResolution create()Resolves the compilation dependency closure and classifies all candidates.- Returns:
- the
CompilationResolution
-