[Gradle] Do not hold a reference to Gradle objects in FUS services
Despite the FUS services are intended to be scoped to a build, the legacy compatibility service wasn't properly managed and that caused a significant memory leak together with changes in KT-59826. #KT-62318 In Progress
This commit is contained in:
committed by
Space Team
parent
197f0112b4
commit
bb23602cb3
+14
-10
@@ -282,18 +282,22 @@ internal abstract class AbstractKotlinBuildStatsService(
|
|||||||
private val logger = Logging.getLogger(AbstractKotlinBuildStatsService::class.java)
|
private val logger = Logging.getLogger(AbstractKotlinBuildStatsService::class.java)
|
||||||
}
|
}
|
||||||
|
|
||||||
private val localProperties = project.localProperties
|
private val forcePropertiesValidation: Boolean
|
||||||
|
|
||||||
private val forcePropertiesValidation = project
|
private val customSessionLoggerRootPath: String?
|
||||||
.loadProperty(FORCE_VALUES_VALIDATION, localProperties)
|
|
||||||
.orNull?.toBoolean() ?: false
|
|
||||||
|
|
||||||
private val customSessionLoggerRootPath: String? = project
|
init {
|
||||||
.loadProperty(CUSTOM_LOGGER_ROOT_PATH, localProperties)
|
val localProperties = project.localProperties
|
||||||
.orNull
|
forcePropertiesValidation = project
|
||||||
?.also {
|
.loadProperty(FORCE_VALUES_VALIDATION, localProperties)
|
||||||
logger.warn("$CUSTOM_LOGGER_ROOT_PATH property for test purpose only")
|
.orNull?.toBoolean() ?: false
|
||||||
}
|
customSessionLoggerRootPath = project
|
||||||
|
.loadProperty(CUSTOM_LOGGER_ROOT_PATH, localProperties)
|
||||||
|
.orNull
|
||||||
|
?.also {
|
||||||
|
logger.warn("$CUSTOM_LOGGER_ROOT_PATH property for test purpose only")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private val sessionLoggerRootPath =
|
private val sessionLoggerRootPath =
|
||||||
customSessionLoggerRootPath?.let { File(it) } ?: project.gradle.gradleUserHomeDir
|
customSessionLoggerRootPath?.let { File(it) } ?: project.gradle.gradleUserHomeDir
|
||||||
|
|||||||
Reference in New Issue
Block a user