Skip to content

Commit

Permalink
Init configurationMetrics parameter with a default value
Browse files Browse the repository at this point in the history
#KTI-1611 Fixed

(cherry picked from commit 3a2dd1b)
  • Loading branch information
nav-nav committed Jul 5, 2024
1 parent d0984cc commit ae44265
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ abstract class BuildFusService : BuildService<BuildFusService.Parameters>, AutoC
})
spec.parameters.useBuildFinishFlowAction.set(GradleVersion.current().baseVersion >= GradleVersion.version("8.1"))
spec.parameters.buildStatisticsConfiguration.set(KotlinBuildStatsConfiguration(project))
//init value to avoid `java.lang.IllegalStateException: GradleScopeServices has been closed` exception on close
spec.parameters.configurationMetrics.add(MetricContainer())
}.also { buildService ->
//DO NOT call buildService.get() before all parameters.configurationMetrics are set.
// buildService.get() call will cause parameters calculation and configuration cache storage.
Expand Down

0 comments on commit ae44265

Please sign in to comment.