ExtensionEngine

Discovers and runs the narrative extension points, fail-silent.

The counterpart to CustomMetricEngine for the two SPIs that shape what Aalekh says rather than what it measures: FindingProvider and ModuleClassifier. Discovery is the JDK ServiceLoader, so any jar on the plugin's runtime classpath contributes automatically.

Every failure mode - a class that will not instantiate, a blank or duplicate id, an extension that throws - becomes a note in ExtensionResult.failures rather than an exception. A third party's bug must never break someone else's build, and a report that is missing one section is a far better outcome than a build that does not run.

Functions

Link copied to clipboard
inline fun <T : Any> load(classLoader: ClassLoader): List<T>

Loads every extension of type T visible to classLoader. Never throws.

Link copied to clipboard

Discovers both SPIs on classLoader and runs them in one step.

Link copied to clipboard
fun run(graph: ModuleDependencyGraph, findingProviders: List<FindingProvider>, classifiers: List<ModuleClassifier>): ExtensionResult

Runs the given extensions against graph.