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 @@ -58,7 +58,9 @@ class ProjectExtensionsPlugin : Plugin<Project> {
sharedServices.registerIfAbsent(
buildServiceId,
BuildFailurePrintService::class,
)
) {
// Older Gradle versions always need configuration action parameter
}
if (GradleVersion.current() >= GradleVersion.version("8.1")) {
reportBuildFailure(target, enableStyle, fullTrace)
} else if (!target.gradle.configurationCacheEnabled) {
Expand Down Expand Up @@ -94,11 +96,9 @@ class ProjectExtensionsPlugin : Plugin<Project> {
private fun reportBuildFailure(target: Project, enableStyle: Boolean, fullTrace: Boolean) {
val flowScopeServices = target.objects.newInstance<FlowScopedServices>()
flowScopeServices.flowScope.always(BuildFailurePrintFlowAction::class) {
parameters {
this.enableStyle.set(enableStyle)
this.fullTrace.set(fullTrace)
this.buildWorkResult.set(flowScopeServices.flowProviders.buildWorkResult)
}
parameters.enableStyle.set(enableStyle)
parameters.fullTrace.set(fullTrace)
parameters.buildWorkResult.set(flowScopeServices.flowProviders.buildWorkResult)
}
}
}
Expand Down
Loading