Gradle Plugin for reporting build time results into internal Automattic systems.
Configure plugin in build.gradle
file:
// settings.gradle
plugins {
id "com.gradle.enterprise" version "latest_version" // optional
}
// build.gradle
plugins {
id "io.github.wzieba.tracks.plugin" version "latest_tag"
}
tracks {
automatticProject.set(io.github.wzieba.tracks.plugin.TracksExtension.AutomatticProject.WooCommerce)
attachGradleScanId.set(true)
// `false`, if no Enterprise plugin applied OR don't want to attach build scan id
}
Property | Required? | Description |
---|---|---|
automatticProject | yes | Project that will determine event name |
attachGradleScanId | yes | Upload metrics after build scan is published, with build scan id attached. If false , metrics will be uploaded upon build finish, without build scan id attached |
enabled | no | Enable plugin (def: false ) |
obfuscateUsername | no | Obfuscate system username with SHA-1 (def: false ) |
After each build you should see
✅ Build time report of 4m 8s has been received by Apps Metrics.
which confirms received report.
This plugin might report different data to what Gradle logs at the end of a build.
The reason is that Gradle log filters
out lifecycle tasks,
while this plugin, cannot do this as it uses configuration-cache
compatible OperationCompletionListener
.
This plugin uses BuildStartedTime
internal service to determine start of the build, the same as
Gradle. The end of the build though is defined
by FlowAction
and might be slightly different than what Gradle uses. The discrepancy is minor, close to
irrelevant.