Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/automattic/measure-builds-gradle-plugin
Gradle Plugin for reporting build time metrics.
https://github.com/automattic/measure-builds-gradle-plugin
android build buildscan configuration-cache gradle gradle-enterprise metrics
Last synced: 7 days ago
JSON representation
Gradle Plugin for reporting build time metrics.
- Host: GitHub
- URL: https://github.com/automattic/measure-builds-gradle-plugin
- Owner: Automattic
- License: mit
- Created: 2021-10-21T14:42:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-24T11:20:18.000Z (5 months ago)
- Last Synced: 2025-01-30T21:13:09.034Z (7 days ago)
- Topics: android, build, buildscan, configuration-cache, gradle, gradle-enterprise, metrics
- Language: Kotlin
- Homepage:
- Size: 285 KB
- Stars: 83
- Watchers: 4
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# measure-builds Gradle Plugin [![Pre Merge Checks](https://github.com/cortinico/kotlin-gradle-plugin-template/workflows/Pre%20Merge%20Checks/badge.svg)](https://github.com/cortinico/kotlin-gradle-plugin-template/actions?query=workflow%3A%22Pre+Merge+Checks%22) [![Gradle Plugin Portal Version](https://img.shields.io/gradle-plugin-portal/v/com.automattic.android.measure-builds?label=Gradle%20Plugin%20Portal)](https://plugins.gradle.org/plugin/com.automattic.android.measure-builds)
Gradle Plugin for reporting build metrics at the end of the build.
## Features
- Add own, custom reporters and send metrics to any system
- Configuration Cache compatibility
- Gradle Enterprise integration - optionally attach Gradle Scan Id to the metrics## Setup
```groovy
// settings.gradle
plugins {
id "com.gradle.enterprise" version "latest_version" // optional
}// build.gradle
import com.automattic.android.measure.reporters.MetricsReport
import com.automattic.android.measure.reporters.SlowSlowTasksMetricsReporterplugins {
id "com.automattic.android.measure-builds" version "latest_tag"
}measureBuilds {
enable = true
attachGradleScanId = true // `false`, if no Enterprise plugin applied OR don't want to attach build scan id
onBuildMetricsReadyListener { MetricsReport metricsReport ->
// Use ready reporters
SlowSlowTasksMetricsReporter.report(metricsReport)
// or add your own reporters here or use
MyCustomReporter.report(metricsReport)
}
}
```## Configuration
| Property | Default | Description |
|-----------------------------|----|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| enable | `false` | Enable plugin |
| onBuildMetricsReadyListener | | Callback to be called when build metrics are ready to be reported. Use this to add your own reporters. |
| attachGradleScanId | `false` | 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 |
| obfuscateUsername | `false` | Obfuscate system username with SHA-1 |## Demo
![]()