Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,18 @@ class MagicUtilsPublishingPlugin : Plugin<Project> {
// unless skipped above, the shadow jar under the `all` classifier —
// one module, variants by classifier, mirroring the Fabric bundle's
// `dev`. No separate `-all` artifactId.
publication.from(project.components.getByName("java"))
//
// Bind the component in afterEvaluate: the shadow plugin registers
// its shadowRuntimeElements variant on the component from its own
// afterEvaluate hook. Reading the component at apply time (or having
// publish compute componentArtifacts before that hook runs, as CI's
// injected plugins reorder it to) throws "Variant for configuration
// 'shadowRuntimeElements' does not exist in component 'java'".
// afterEvaluate runs after shadow's registration, so the component
// is complete.
project.afterEvaluate {
publication.from(project.components.getByName("java"))
}
}
}

Expand Down
Loading