Report new IC usage in FUS

#KT-55000 Fixed
This commit is contained in:
Andrey Uskov
2022-12-16 13:49:55 +03:00
parent 4c80538a78
commit 70db910767
2 changed files with 5 additions and 1 deletions
@@ -156,19 +156,22 @@ internal class PropertiesProvider private constructor(private val project: Proje
val useClasspathSnapshot: Boolean
get() {
val reporter = KotlinBuildStatsService.getInstance()
// The feature should be controlled by a Gradle property.
// Currently, we also allow it to be controlled by a system property to make it easier to test the feature during development.
// TODO: Remove the system property later.
val gradleProperty = booleanProperty(CompilerSystemProperties.COMPILE_INCREMENTAL_WITH_ARTIFACT_TRANSFORM.property)
if (gradleProperty != null) {
reporter?.report(StringMetrics.USE_CLASSPATH_SNAPSHOT, gradleProperty.toString())
return gradleProperty
}
val systemProperty = CompilerSystemProperties.COMPILE_INCREMENTAL_WITH_ARTIFACT_TRANSFORM.value?.toBooleanLenient()
if (systemProperty != null) {
reporter?.report(StringMetrics.USE_CLASSPATH_SNAPSHOT, systemProperty.toString())
return systemProperty
}
// Default value
reporter?.report(StringMetrics.USE_CLASSPATH_SNAPSHOT, "default-true")
return true
}
@@ -105,6 +105,7 @@ enum class StringMetrics(val type: StringOverridePolicy, val anonymization: Stri
// Features
KOTLIN_LANGUAGE_VERSION(OVERRIDE, ComponentVersionAnonymizer()),
KOTLIN_API_VERSION(OVERRIDE, ComponentVersionAnonymizer()),
USE_CLASSPATH_SNAPSHOT(CONCAT, AllowedListAnonymizer(listOf("true", "false", "default-true"))),
JS_GENERATE_EXECUTABLE_DEFAULT(CONCAT, AllowedListAnonymizer(listOf("true", "false"))),
JS_TARGET_MODE(CONCAT, AllowedListAnonymizer(listOf("both", "browser", "nodejs", "none"))),
JS_OUTPUT_GRANULARITY(OVERRIDE, RegexControlled("(whole_program|per_module|per_file)", false)),