commonMain.co.touchlab.skie.plugin.analytics.project.ProjectAnalytics.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-plugin-impl-jvm Show documentation
Show all versions of gradle-plugin-impl-jvm Show documentation
Internal implementation for SKIE Gradle plugin.
package co.touchlab.skie.plugin.analytics.project
import co.touchlab.skie.configuration.SkieConfigurationFlag
import co.touchlab.skie.plugin.analytics.AnalyticsProducer
import co.touchlab.skie.plugin.util.toPrettyJson
import co.touchlab.skie.util.hash.hashed
data class ProjectAnalytics(
val projectId: String,
) {
class Producer(
private val rootProjectName: String,
private val projectPath: String,
private val projectGroup: Any,
) : AnalyticsProducer {
override val configurationFlag: SkieConfigurationFlag = SkieConfigurationFlag.Analytics_Project
override val name: String = "project"
override fun produce(): String =
ProjectAnalytics(
projectId = "${rootProjectName}${projectPath}${projectGroup}".hashed(),
).toPrettyJson()
}
}