ru.tinkoff.plugins.buildmetrics.api.extensions.BuildMetricsExtension.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of build-metrics-api Show documentation
Show all versions of build-metrics-api Show documentation
Extension for tinkoff build metrics gradle plugin.
The newest version!
package ru.tinkoff.plugins.buildmetrics.api.extensions
import org.gradle.api.Action
import org.gradle.api.model.ObjectFactory
import org.gradle.kotlin.dsl.newInstance
import ru.tinkoff.plugins.buildmetrics.api.extensions.handlers.BuildHandlersHandler
import ru.tinkoff.plugins.buildmetrics.api.extensions.handlers.LabelsHandler
import ru.tinkoff.plugins.buildmetrics.api.extensions.handlers.MetricsHandler
import ru.tinkoff.plugins.buildmetrics.api.extensions.handlers.PublishersHandler
import javax.inject.Inject
open class BuildMetricsExtension @Inject constructor(objectFactory: ObjectFactory) {
val metrics: MetricsHandler = objectFactory.newInstance()
val labels: LabelsHandler = objectFactory.newInstance()
val publishers: PublishersHandler = objectFactory.newInstance()
val buildHandlers: BuildHandlersHandler = objectFactory.newInstance()
fun metrics(action: Action) = action.execute(metrics)
fun labels(action: Action) = action.execute(labels)
fun publishers(action: Action) = action.execute(publishers)
fun buildHandlers(action: Action) = action.execute(buildHandlers)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy