Create FUS Gradle plugin

fus-statistics-gradle-plugin can be used by any other Gradle plugins to
collect additional metrics for FUS.

KT-59627
This commit is contained in:
Nataliya.Valtman
2023-08-14 19:35:12 +02:00
committed by Space Team
parent 4ed7504d87
commit 9de791b9ac
16 changed files with 366 additions and 2 deletions
@@ -0,0 +1,19 @@
## Description
Contains a plugin for Feature Usage Statistics(FUS). fus-statistics-gradle-plugin can be used by other Gradle plugins to
collect additional metrics for FUS.
Statistics will be gathered in **kotlin-fus/<build_uid>** file. It is located in ${GRADLE_USER_HOME} directory by default.
You can modify default directory by using the **kotlin.fus.statistics.path** property (for test purpose only).
Created file will contain **key=value** rows fowled by **BUILD FINISHED**
Collection statistics in a file is enabled by default. Further step is to collect data only after approval - KT-59629.
In any case, collected data will be sent only after user's agreement.
### Collect own data
**org.jetbrains.kotlin.fus-statistics-gradle-plugin** plugin should be applied and a new **UsesGradleBuildFusStatisticsService** task
should be created to be able to collect additional data.
In this case, the task will access **GradleBuildFusStatistics** and be able to report new metrics via **reportMetric**.
Analytics teams' approve is required for any collected data.