With Develocity 2024.1, this plugin has been deprecated in favor of the new Develocity Gradle plugin. With Develocity 2024.3, there will be no further releases of this plugin. It’s recommended to upgrade to the Develocity Gradle plugin as soon as possible. Please refer to the Migrating to the Develocity plugin section for details. |
The Gradle Enterprise Gradle plugin enables integration with Develocity and scans.gradle.com.
This plugin was previously named and referred to as the “Build Scan” plugin. With the release of Gradle 6.0 and version 3.0 of this plugin, it has been renamed to the “Gradle Enterprise” plugin. As such, when discussing older versions this document uses the term “Build Scan” when referring to the plugin. |
Getting set up
Version 3.19 is the latest version and is compatible with all Gradle 5.x and later versions. See Gradle 4.x and earlier if you are using an earlier version of Gradle.
The instructions in this section describe applying and configuring the plugin for a single Gradle project. See Integrating your CI tool for help with integrating all projects built within an environment.
Applying the plugin
Gradle 6.x and later
This version of Gradle uses com.gradle.enterprise
as the plugin ID. The plugin must be applied in the settings file of the build.
plugins {
id("com.gradle.enterprise") version("3.19")
}
gradleEnterprise {
// configuration
}
plugins {
id "com.gradle.enterprise" version "3.19"
}
gradleEnterprise {
// configuration
}
The plugin is configured via the gradleEnterprise
extension available in the settings script, which is also available via the root project in project build scripts. The same instance is used for the settings extension and root project extension.
The Direct use of |
Gradle 5.x
This version of Gradle uses com.gradle.build-scan
as the plugin ID. The plugin must be applied to the root project of the build.
plugins {
id("com.gradle.build-scan").version("3.19")
}
gradleEnterprise {
// configuration
}
plugins {
id "com.gradle.build-scan" version "3.19"
}
gradleEnterprise {
// configuration
}
The plugin is configured via the gradleEnterprise
extension of the root project in project build scripts.
The Direct use of |
Connecting to Develocity
To connect to a Develocity instance, you must configure the location of the Develocity server.
Gradle 6.x and later
gradleEnterprise {
server = "https://develocity.mycompany.com"
}
gradleEnterprise {
server = "https://develocity.mycompany.com"
}
Prior to version 3.2 of this plugin, the server address must be set via the buildScan configuration object. |
Gradle 5.x
If using plugin 3.2+:
gradleEnterprise {
server = "https://develocity.mycompany.com"
}
gradleEnterprise {
server = "https://develocity.mycompany.com"
}
Prior to version 3.2 of this plugin, the server address must be set via the buildScan configuration object. |
Allowing untrusted SSL communication
If your Develocity server uses an SSL certificate that is not trusted by your build’s Java runtime, you will not be able to publish Build Scans without explicitly allowing untrusted servers.
To do this, set the allowUntrustedServer
option to true
:
gradleEnterprise {
server = "https://develocity.mycompany.com"
allowUntrustedServer = true
}
gradleEnterprise {
server = "https://develocity.mycompany.com"
allowUntrustedServer = true
}
Use of this configuration is a security risk as it makes it easier for a third party to intercept your Build Scan data. It should only be used as a short term workaround until the server can be configured with a trusted certificate.
Prior to version 3.2 of this plugin, this setting must be set via the buildScan configuration object. |
Authenticating
(plugin 3.1+, Develocity 2019.4+)
Develocity installations may be configured to require Build Scan publishing to be authenticated. Additionally, installations may be configured to only allow certain users to publish Build Scans.
Develocity access keys should be treated with the same secrecy as passwords. They are used to authorize access to Develocity from a build. |
Automated access key provisioning
The easiest way to configure a build environment to authenticate with Develocity is to use the provisionGradleEnterpriseAccessKey
task.
$ ./gradlew provisionGradleEnterpriseAccessKey
When executed, it opens your web browser and asks to confirm provisioning of a new access key. You will be asked to sign in to Develocity in your browser first if you are not already signed in.
When confirmed, a new access key will be generated and stored in the develocity/keys.properties
(or enterprise/keys.properties
for plugin versions prior to 3.17) file within the Gradle user home directory (~/.gradle
by default).
Any existing access key for the same server will be replaced in the file, but will not be revoked at the server for use elsewhere. To revoke old access keys, sign in to Develocity and access “My settings” via the user menu at the top right of the page.
If your browser cannot be opened automatically at the correct page, you will be asked to manually open a link provided in the build console. |
Manual access key configuration
Access keys can also be configured manually for an environment, when automated provisioning is not suitable.
Creating access keys
To create a new access key, sign in to Develocity and access “My settings” via the user menu at the top right of the page. From there, use the “Access keys” section to generate an access key.
The access key value should then be copied and configured in your build environment via file, environment variable or the settings file.
Via file
Develocity access keys are stored inside the Gradle user home directory (~/.gradle
by default), at develocity/keys.properties
(or enterprise/keys.properties
for plugin versions prior to 3.17), in a Java properties file. The property name refers to the host name of the server, and the value is the access key.
develocity.mycompany.com=7w5kbqqjea4vonghohvuyra5bnvszop4asbqee3m3sm6dbjdudtq
The file may contain multiple entries. The first entry for a given host value will be used.
Via environment variable
The access key may also be specified via the GRADLE_ENTERPRISE_ACCESS_KEY
environment variable. This is typically more suitable for CI build environments.
The environment variable value format is «server host name»=«access key»
.
$ export GRADLE_ENTERPRISE_ACCESS_KEY=develocity.mycompany.com=7w5kbqqjea4vonghohvuyra5bnvszop4asbqee3m3sm6dbjdudtq && \
./gradlew build
The server host name is specified in order to prevent the access key being transmitted to a different server than intended. In the rare case that you require access keys for multiple servers, you can specify multiple entries separated by semicolons (requires plugin 3.6+, Develocity 2021.1+).
$ export GRADLE_ENTERPRISE_ACCESS_KEY=ge1.mycompany.com=7w5kbqqjea4vonghohvuyra5bnvszop4asbqee3m3sm6dbjdudtq;ge2.mycompany.com=9y4agfiubqqjea4vonghohvuyra5bnvszop4asbqee3m3sm67w5k && \
./gradlew build
Via settings file
(plugin 3.7+, Develocity 2021.1+)
The accessKey
option of the plugin allows the access key to be set via the settings file.
gradleEnterprise {
server = "https://develocity.mycompany.com"
accessKey = "7w5kbqqjea4vonghohvuyra5bnvszop4asbqee3m3sm6dbjdudtq"
}
gradleEnterprise {
server = "https://develocity.mycompany.com"
accessKey = "7w5kbqqjea4vonghohvuyra5bnvszop4asbqee3m3sm6dbjdudtq"
}
An access key configured for the server this way will take precedence over an access key set via the environment variable or access key file.
Short-lived access tokens
Develocity access keys are long-lived, creating risks if they are leaked. To avoid this, users can use short-lived access tokens to authenticate with Develocity. Access tokens can be used wherever an access key would be used. Access tokens are only valid for the Develocity instance that created them.
Develocity server version 2024.1+ supports access tokens. |
Changing a Develocity instance’s hostname will cause all existing access tokens to become invalid. |
To create an access token:
-
Get an access key or access token for the user you wish to create a token for.
-
Decide which permissions the new access token should have.
-
If project-level access control is enabled, decide which projects the new access token should be able to access.
-
Decide how long the new access token should live.
-
Make a POST request to
/api/auth/token
, optionally with the following parameters. The response will be the access token.-
A
permissions=
query parameter with the config values of each permission you wish to grant. By default, all permissions for the credential used to authenticate the token request are granted to the created token. -
If project-level access control is enabled, a
projectIds=
query parameter with the ID of each project you wish to grant access to. By default, all projects for the credential used to authenticate the token request are granted to the created token. -
An
expiresInHours=
query parameter with the token’s intended lifetime in hours, with a maximum of 24. The default is two hours, or the remaining lifetime of the credential used to authenticate the request, whichever is smaller.
-
The requested permissions and project ids can be specified as comma-seperated lists or repeated parameters. For example, ?projectIds=a,b&projectIds=c
is valid and will request projects a
, b
, and c
.
If project-level access control is not enabled, all access tokens will be granted the “Access all data without an associated project” permission even if it is not explicitly requested. |
If the user creating the token does not have one of the requested permissions or projects, Develocity will respond with a 403 Forbidden error. If an access token is used to authenticate the creation request, its permissions and projects will be used for this check instead of the user’s. The request will also error if the requested lifetime would cause the new access token to expire after the one used to authenticate the request. Together, this means you cannot create an access token with more access or a later expiration than the credentials used to authenticate the request.
See the API documentation for more details on the /api/auth/token endpoint. |
Here is an example using CURL to create an access token:
$ curl -X POST https://ge.mycompany.com/api/auth/token?permissions=publishScan,writeCache,accessDataWithoutAssociatedProject&projectIds=project-a,project-b&expiresInHours=1 \
-H "Authorization: Bearer 7asejatf24zun43yshqufp7qi4ovcefxpykbwzqbzilcpwzb52ja"
eyJraWQiOiJ0ZXN0LWtleSIsImFsZyI6IlJTMjU2IiwidHlwIjoiSldUIn0.eyJpc19hbm9ueW1vdXMiOmZhbHNlLCJwZXJtaXNzaW9ucyI6WyJSRUFEX1ZFUlNJT04iLCJFWFBPUlRfREFUQSIsIkFDQ0VTU19EQVRBX1dJVEhPVVRfQVNTT0NJQVRFRF9QUk9KRUNUIl0sInByb2plY3RzIjp7ImEiOjEsImIiOjJ9LCJ1c2VyX2lkIjoic29tZS1pZCIsInVzZXJuYW1lIjoidGVzdCIsImZpcnN0X25hbWUiOiJhIiwibGFzdF9uYW1lIjoidXNlciIsImVtYWlsIjoiYkBncmFkbGUuY29tIiwic3ViIjoidGVzdCIsImV4cCI6NzIwMCwibmJmIjowLCJpYXQiOjAsImF1ZCI6ImV4YW1wbGUuZ3JhZGxlLmNvbSIsImlzcyI6ImV4YW1wbGUuZ3JhZGxlLmNvbSIsInRva2VuX3R5cGUiOiJhY2Nlc3NfdG9rZW4ifQ.H1_NEG1xuleP-WIAY_uvSmdd2o7i_-Ko3qhlo04zvCgrElJe7_F5jNuqsyDfnb5hvKlOe5UKG_7QPTgY9-3pFQ
The resulting token would have the following permissions:
-
“Publish Build Scans”
-
“Read and write Build Cache data”
-
“Access all data without an associated project”
And it would have access to these projects:
-
“project-a”
-
“project-b”
The token would only be usable for one hour.
Connecting to scans.gradle.com
If the location of a Develocity server is not specified, Build Scans will be published to scans.gradle.com. This requires agreeing the terms of use, which can be found at https://gradle.com/help/legal-terms-of-use.
You can agree to the terms of use by adding the following configuration to your build.
gradleEnterprise {
buildScan {
termsOfServiceUrl = "https://gradle.com/help/legal-terms-of-use"
termsOfServiceAgree = "yes"
}
}
gradleEnterprise {
buildScan {
termsOfServiceUrl = "https://gradle.com/help/legal-terms-of-use"
termsOfServiceAgree = "yes"
}
}
If you do not agree to the terms of use in your build, you will be asked interactively when trying to publish a Build Scan to scans.gradle.com each time you try to publish.
Be careful not to commit agreement to the terms of use into a project that may be built by others. |
Using Build Scans
Controlling when Build Scans are published
Build Scans are not automatically published after applying the plugin. The following describes the options available for controlling when to publish a Build Scan.
For Develocity users, it is recommended that builds be configured to publish a Build Scan for every build. This allows Develocity to provide more insight on your organization’s builds. |
Publishing on demand
You can add the --scan
argument to any Gradle build to publish a Build Scan.
$ ./gradlew assemble --scan
If the build does not apply the plugin, Gradle will automatically apply the most recent version available at the time that version of Gradle was released. |
You can also publish a Build Scan for the most recently run build by invoking the buildScanPublishPrevious
task added by the plugin.
$ ./gradlew buildScanPublishPrevious
Since the task name is quite long, it’s worth taking advantage of Gradle’s abbreviated command line notation for tasks:
$ ./gradlew bSPP
Publishing every build
In order to publish a Build Scan for every build, you can use the publishAlways()
directive:
gradleEnterprise {
buildScan {
publishAlways()
}
}
gradleEnterprise {
buildScan {
publishAlways()
}
}
Publishing based on criteria
In order to publish a Build Scan automatically for some builds, you can use the following directives:
Option | Description |
---|---|
|
Publish a Build Scan if the given condition is |
|
Publish a Build Scan only when the build fails. |
|
Publish a Build Scan only if the condition is |
For example, if you only want to publish Build Scans from your CI system, which is identified by having a CI
environment variable, you can do the following:
gradleEnterprise {
buildScan {
publishAlwaysIf(!System.getenv("CI").isNullOrEmpty())
}
}
gradleEnterprise {
buildScan {
publishAlwaysIf(System.getenv("CI"))
}
}
You can use the other options in the same way. If you want to configure several things based on a set of criteria, you can use an if
condition instead:
gradleEnterprise {
buildScan {
if (!System.getenv("CI").isNullOrEmpty()) {
publishAlways()
tag("CI")
}
}
}
gradleEnterprise {
buildScan {
if (System.getenv("CI")) {
publishAlways()
tag "CI"
}
}
}
Configuring background uploading
(plugin 3.3+, Develocity 2020.2+)
By default, Build Scans are uploaded in the background after the build has finished. This allows the build to finish sooner, but can be problematic in build environments (e.g. ephemeral CI agents) that terminate as soon as the build is finished, as the upload may be terminated before it completes. Background uploading should be disabled for such environments.
Prior to version 3.3 of this plugin, Build Scans are always uploaded before the build finishes. |
Disabling programmatically
The gradleEnterprise.buildScan.uploadInBackground
property can be set to false
.
gradleEnterprise {
buildScan {
isUploadInBackground = false
}
}
gradleEnterprise {
buildScan {
uploadInBackground = false
}
}
It may be desirable to conditionally set the value based on the environment.
gradleEnterprise {
buildScan {
isUploadInBackground = System.getenv("CI") == null
}
}
gradleEnterprise {
buildScan {
uploadInBackground = System.getenv("CI") == null
}
}
Disabling via system property
Background uploading can be disabled by setting the scan.uploadInBackground
system property to false
. The system property setting always takes precedence over the programmatic setting.
The system property may be specified when invoking the build:
$ ./gradlew build -Dscan.uploadInBackground=false
Or, can be set as part of the environment with the JAVA_OPTS
or GRADLE_OPTS
environment variables:
$ export GRADLE_OPTS=-Dscan.uploadInBackground=false
Or, can be set in the user’s gradle.properties
file (i.e. ~/.gradle/gradle.properties
).
systemProp.scan.uploadInBackground=false
Configuring project identifier
(plugin 3.15+, Develocity 2023.3+)
Detailed information regarding project-level access control can be found here.
Versions before 3.15 of this plugin do not allow specifying project identifier |
Setting programmatically
The gradleEnterprise.projectId
property can be set to a necessary value.
gradleEnterprise {
projectId = "myProject"
}
gradleEnterprise {
projectId = "myProject"
}
Setting via system property
Project identifier can be also set using the develocity.projectId
system property. The system property setting always takes precedence over the programmatic setting.
The system property may be specified when invoking the build:
$ ./gradlew build -Ddevelocity.projectId=myProject
Or, can be set as part of the environment with the JAVA_OPTS
or GRADLE_OPTS
environment variables:
$ export GRADLE_OPTS=-Ddevelocity.projectId=myProject
Or, can be set in the user’s gradle.properties
file (i.e. ~/.gradle/gradle.properties
).
systemProp.develocity.projectId=myProject
Capturing task input files
(plugin 2.1+)
Build Scans capture hashes of inputs of tasks (and other units of work), to enable identifying changes to inputs when comparing builds, among other features. The overall hash value of each input property enables identifying which properties changed for a task (e.g. the source or the classpath for Java compilation). Since Gradle plugin 3.17, the paths and content hashes of individual task input files of each property are also captured by default. For older versions, this can be enabled on an opt-in basis. They allow identifying which individual files changed for a task when comparing two builds.
When to enable/disable
Capturing task input files increases the amount of data transmitted to the Build Scan server at the end of the build. If the network connection to the Build Scan server is poor, it may increase the time required to transmit. Additionally, it may also increase the data storage requirements for a Build Scan server. In such cases, capturing task input files can be disabled.
However, if you are using Develocity and utilising its Build Cache to accelerate your builds, it is strongly recommended to enable it as identifying which files have changed between builds with build comparison is extremely effective for diagnosing unexpected Build Cache misses.
If you are using Develocity for Predictive Test Selection enabling capture of task input files is a prerequisite.
How to enable/disable
Task input files capture can be enabled/disabled programmatically via the buildScan
extension, or via a system property.
Programmatically
To enable/disable programmatically, use the buildScan
extension added by the Build Scan plugin.
gradleEnterprise {
buildScan {
isCaptureTaskInputFiles = true // for plugin < 3.7
capture { // for plugin in [3.7,3.17[
isTaskInputFiles = true
}
}
}
gradleEnterprise {
buildScan {
captureTaskInputFiles = true // for plugin < 3.7
capture { // for plugin >= 3.7
taskInputFiles = true
}
}
}
See the task input files API reference.
Via system property
To enable/disable without modifying the build script, supply a scan.capture-task-input-files
system property to the build. If the property is set to false
, capture is disabled. Otherwise, capture is enabled. The environmental setting always takes precedence over the programmatic setting.
The system property may be specified when invoking the build:
$ ./gradlew build -Dscan.capture-task-input-files
Or, can be set as part of the environment with the JAVA_OPTS
or GRADLE_OPTS
environment variables:
$ export GRADLE_OPTS=-Dscan.capture-task-input-files
Or, can be set in the project’s gradle.properties
file, or the user’s gradle.properties
file (i.e. ~/.gradle/gradle.properties
).
systemProp.scan.capture-task-input-files
See the Build Environment chapter of the Gradle User Manual for more information on specifying system properties.
Capturing build and test outputs
(plugin 3.7+)
By default, outputs generated during the build are captured and displayed in Build Scans.
Note that when disabling test output capturing, test failures will still be captured.
When to disable
You may want to skip capturing build or test outputs for security/privacy reasons (i.e., some outputs may leak sensitive data), or performance/storage reasons (i.e., some tasks/tests may produce a lot of outputs that are irrelevant for your usage of Build Scans).
How to disable
Output capture can be disabled programmatically via the buildScan
extension, or via a system property.
Programmatically
To disable programmatically, use the buildScan
extension added by the Build Scan plugin.
gradleEnterprise {
buildScan {
capture {
isBuildLogging = false
isTestLogging = false
}
}
}
gradleEnterprise {
buildScan {
capture {
buildLogging = false
testLogging = false
}
}
}
See the build logging API reference and the test logging API reference.
Via system property
To disable without modifying the build script, supply the scan.capture-build-logging
and/or scan.capture-test-logging
system properties to the build. If the property is set to false
, capture is disabled. Otherwise, capture is enabled. The environmental setting always takes precedence over the programmatic setting.
The system property may be specified when invoking the build:
$ ./gradlew build -Dscan.capture-build-logging=false -Dscan.capture-test-logging=false
Or, can be set as part of the environment with the JAVA_OPTS
or GRADLE_OPTS
environment variables:
$ export GRADLE_OPTS="-Dscan.capture-build-logging=false -Dscan.capture-test-logging=false"
Or, can be set in the project’s gradle.properties
file, or the user’s gradle.properties
file (i.e. ~/.gradle/gradle.properties
).
systemProp.scan.capture-build-logging=false
systemProp.scan.capture-test-logging=false
See the Build Environment chapter of the Gradle User Manual for more information on specifying system properties.
Capturing resource usage
(plugin 3.18+)
Build Scans capture information on key resources of the machine executing the build. This includes CPU load, memory, disk usage, network activity, and the names of the most CPU-intensive processes. These insights can help analyze poor build performance, whether due to the build needing too many resources or factors external to the build. It can also help understand if the machine is underutilized and if it could do more work.
By default, resource usage is captured and displayed in Build Scans.
Users of Gradle’s configuration cache feature must use version 7.6 of Gradle or later to benefit from resource usage capturing. When using plugin 3.18+ with earlier versions of Gradle and configuration caching turned on, resource usage capturing will be automatically disabled, and a warning message will be printed. |
When to disable
You may want to skip capturing resource usage for security/privacy reasons. Note that the names of processes external to the build (i.e. not the build process nor its descendants) can be obfuscated.
How to disable
Resource usage capture can be enabled/disabled programmatically via the buildScan
extension, or via a system property.
Programmatically
To enable/disable programmatically, use the buildScan
extension added by the Develocity Gradle plugin.
gradleEnterprise {
buildScan {
capture {
isResourceUsage = false
}
}
}
gradleEnterprise {
buildScan {
capture {
resourceUsage = false
}
}
}
See the resource usage API reference.
Via system property
To enable/disable without modifying the build script, supply the scan.capture-resource-usage
system properties to the build. If the property is set to false
, capture is disabled. Otherwise, capture is enabled. The environmental setting always takes precedence over the programmatic setting.
The system property may be specified when invoking the build:
$ ./gradlew build -Dscan.capture-resource-usage=false
Or, can be set as part of the environment with the JAVA_OPTS
or GRADLE_OPTS
environment variables:
$ export GRADLE_OPTS="-Dscan.capture-resource-usage=false"
Or, can be set in the project’s gradle.properties
file, or the user’s gradle.properties
file (i.e. ~/.gradle/gradle.properties
).
systemProp.scan.capture-resource-usage=false
See the Build Environment chapter of the Gradle User Manual for more information on specifying system properties.
Extending Build Scans
(plugin 1.1+)
You can easily include extra custom information in your Build Scans in the form of tags, links and values. This is a very powerful mechanism for capturing and sharing information that is important to your build and development process.
This information can be anything you like. You can tag all builds run by your continuous integration tool with a CI
tag. You can capture the name of the environment that the build published to as a value. You can link to the source revision for the build in an online tool such as GitHub. The possibilities are endless.
You can see how the custom data appears in figures 1 and 2:
Develocity allows listing and searching across all of the Build Scans in the system. You can find and filter Build Scans by tags and custom values, in addition to project name, outcome and other properties. In figure 3, for example, we are filtering for all Build Scans that have the tag "CI" and a git branch name of "master":
Adding tags
Tags are typically used to indicate the type or class of a build, or a key characteristic. They are prominent in the user interface and quickly inform a user about the nature of a build. A build can have zero or more tags.
They can be added at build time via the tag()
method:
gradleEnterprise {
buildScan {
tag(if (System.getenv("CI").isNullOrEmpty()) "Local" else "CI")
tag(System.getProperty("os.name"))
}
}
gradleEnterprise {
buildScan {
if (System.getenv("CI")) {
tag "CI"
} else {
tag "Local"
}
tag System.getProperty("os.name")
}
}
As demonstrated by the example above, tags are typically applied either as fixed strings within a condition or evaluated at runtime from the environment. But there are no set rules that you need to follow—these are only suggestions.
The syntax for adding a tag is:
tag(<tag>)
where the <tag> is a string.
Note that the order in which you declare the tags doesn’t affect the Build Scan view. They are displayed in alphabetical order, with any all-caps labels displayed before the rest.
Build Scan plugin v1.9.1+ impose limits on captured tags:
|
Adding links
Builds rarely live in isolation. Where does the project source live? Is there online documentation for the project? Where can you find the project"s issue tracker? If these exist and have a URL, you can add them to the Build Scan.
They can be added at build time via the link()
method:
gradleEnterprise {
buildScan {
link("VCS", "https://github.com/myorg/sample/tree/${System.getProperty("vcs.branch")}")
}
}
gradleEnterprise {
buildScan {
link "VCS", "https://github.com/myorg/sample/tree/${System.getProperty("vcs.branch")}"
}
}
The above example demonstrates how you can attach a link to an online VCS repository that points to a specific branch provided as a system property.
The syntax for adding a link is:
link(<label>, <URL>)
The <label> is simply a string identifier that you choose and that means something to you.
You can see the effect of a custom link in figure 1, which shows how a label Source becomes a hyperlink that anyone viewing the Build Scan can follow.
Build scan plugin v1.9.1+ impose limits on captured links:
|
Adding custom values
Some information just isn’t useful without context. What does "1G" mean? You might guess that it represents 1 gigabyte, but of what? It’s only when you attach the label "Max heap size for build" that it makes sense. The same applies to git commit IDs, for example, which could be interpreted as some other checksum without a suitable label.
Custom values are designed for these cases that require context. They’re standard key-value pairs, in which the key is a string label of your choosing and the values are also strings, often evaluated from the build environment.
They can be added at build time via the value()
method:
gradleEnterprise {
buildScan {
value("Build Number", project.buildNumber)
}
}
gradleEnterprise {
buildScan {
value "Build Number", project.buildNumber
}
}
The above example demonstrates how you can read the build number from a project property—assuming you have your build set up for this—and attach it to the Build Scans as a custom value.
The syntax for adding a value is:
value(<key>, <value>)
where both the <key>
and the <value>
are strings.
As with tags, you can filter Build Scans by custom values in Develocity.
Build Scan plugin v1.9.1+ impose limits on captured custom values:
|
Adding data at the end of the build
(plugin 1.2+)
The examples you have seen so far work well if when the custom data is available at the beginning of the build. But what if you want to attach data that’s only available later? For example, you might want to label a build as "built-from-clean" if the clean
task was run. But you don’t know if that’s the case until the task execution graph is ready.
The Build Scan plugin provides a buildFinished()
hook that you can use for these situations. It defers attaching custom data until the build has finished running. As an example, imagine you want to report how much disk space was taken up by the output build
directory. The build doesn’t know this until it’s finished, so the solution is to calculate the disk space and attach it to a custom value in the buildFinished()
hook:
gradleEnterprise {
buildScan {
buildFinished {
value("Disk usage (output dir)", buildDir.walkTopDown().map { it.length() }.sum().toString())
}
}
}
gradleEnterprise {
buildScan {
buildFinished {
value "Disk usage (output dir)", buildDir.directorySize().toString()
}
}
}
The buildFinished()
action has access to the rest of the build, including the Project
instance, so it can extract all sorts of information. It also has access to a BuildResult
instance that you can use to determine whether the build failed or not, like so:
buildFinished()
gradleEnterprise {
buildScan {
buildFinished {
if (this.failure != null) {
value("Failed with", this.failure.message)
}
}
}
}
buildFinished()
import com.gradle.scan.plugin.BuildResult
gradleEnterprise {
buildScan {
buildFinished { BuildResult result ->
if (result.failure) {
value "Failed with", result.failure.message
}
}
}
}
The Gradle build tool has a |
Adding expensive data
(plugin 1.15+)
Some data that you may wish to add to your Build Scan can be expensive to capture. For example, capturing the Git commit ID may require executing the git
command as an external process, which is expensive. To do this without slowing your build down, you can use the buildScan.background()
method:
background()
to capture an expensive custom value with Gradle 6.2+ and Configuration Cache compatibility.
import org.gradle.kotlin.dsl.support.serviceOf
import java.io.ByteArrayOutputStream
...
gradleEnterprise {
buildScan {
val execOps = serviceOf<ExecOperations>()
background {
val os = ByteArrayOutputStream()
execOps.exec {
commandLine("git", "rev-parse", "--verify", "HEAD")
standardOutput = os
}
value("Git Commit ID", os.toString())
}
}
}
background()
to capture an expensive custom value with Gradle 5.x
import java.io.ByteArrayOutputStream
...
gradleEnterprise {
buildScan {
background {
val os = ByteArrayOutputStream()
exec {
commandLine("git", "rev-parse", "--verify", "HEAD")
standardOutput = os
}
value("Git Commit ID", os.toString())
}
}
}
background()
to capture an expensive custom value
gradleEnterprise {
buildScan {
background {
def commitId = "git rev-parse --verify HEAD".execute().text.trim()
value "Git Commit ID", commitId
}
}
}
This method takes a function that will be executed on a separate thread, which allows Gradle to continue without waiting for the expensive work to complete.
All background work will be completed before finishing the build and publishing the Build Scan.
Any errors that are thrown by the background action will be logged and captured in the Build Scan.
See the buildScan.background() API reference for more information.
Providing custom data via system properties
(plugin 1.3+)
The examples up to this point have shown how your build file or init script can pull information from the environment, via environment variables and system properties. The Build Scan plugin also allows you to inject any form of custom data through the use of specially named system properties. This can help you keep your build files clean of too much environment-specific information that may not be relevant to most of the users of the build.
These system properties take the following forms, depending on whether you want to inject a link, a tag or a custom value:
-Dscan.tag.<tag> -Dscan.link.<label>=<URL> -Dscan.value.<key>=<value>
Here are some concrete examples, which assume that the build has been configured to publish Build Scans automatically:
$ ./gradlew build -Dscan.tag.CI
$ ./gradlew build -Dscan.link.VCS=https://github.com/myorg/my-super-project/tree/my-new-feature
$ ./gradlew build "-Dscan.value.CIBuildType=QA_Build"
This feature is particularly useful for continuous integration builds as you can typically easily configure your CI tool to specify system properties for a build. It’s even common for CI tools to be able to inject system properties into a build that are interpolated with information from the CI system, such as build number.
$ ./gradlew build "-Dscan.value.buildNumber=$CI_BUILD_NUMBER"
Capturing the Build Scan ID or address
(plugin 1.9+)
The address of the Build Scan is included in the output at the end of the build. However, you may wish to record the ID or URL of the Build Scan in some other way. The Build Scan plugin allows you to register a callback that will receive this information. The callback is invoked after a Build Scan has been successfully published.
The example build script snippet below shows this feature being used to maintain a journal of created Build Scans.
Develocity provides the ability to search for Build Scans created by a certain user and/or from a particular host (along with other search criteria). |
import java.util.Date
gradleEnterprise {
buildScan {
buildScanPublished {
file("scan-journal.log").appendText("${Date()} - ${this.buildScanId} - ${this.buildScanUri}\n")
}
}
}
import com.gradle.scan.plugin.PublishedBuildScan
gradleEnterprise {
buildScan {
buildScanPublished { PublishedBuildScan scan ->
file("scan-journal.log") << "${new Date()} - ${scan.buildScanId} - ${scan.buildScanUri}\n"
}
}
}
Please see the buildScan.buildScanPublished() method for API details.
Obfuscating identifying data
(plugin 2.4.2+)
Build Scans capture certain identifying information such as the operating system username, hostname, network addresses, and CPU-intensive process names. You may choose to obfuscate this data so that it is not decipherable in Build Scans when viewed, by registering obfuscation functions as part of the Build Scan plugin configuration.
The following examples show registering obfuscation functions for the different identifying data.
gradleEnterprise {
buildScan {
obfuscation {
username { name -> name.reversed() }
}
}
}
gradleEnterprise {
buildScan {
obfuscation {
username { name -> name.reverse() }
}
}
}
gradleEnterprise {
buildScan {
obfuscation {
hostname { host -> host.toCharArray().map { character -> Character.getNumericValue(character) }.joinToString("-") }
}
}
}
gradleEnterprise {
buildScan {
obfuscation {
hostname { host -> host.collect { character -> Character.getNumericValue(character as char) }.join("-") }
}
}
}
gradleEnterprise {
buildScan {
obfuscation {
ipAddresses { addresses -> addresses.map { _ -> "0.0.0.0" } }
}
}
}
gradleEnterprise {
buildScan {
obfuscation {
ipAddresses { addresses -> addresses.collect { address -> "0.0.0.0" } }
}
}
}
gradleEnterprise {
buildScan {
obfuscation {
externalProcessName { processName -> "non-build-process" }
}
}
}
gradleEnterprise {
buildScan {
obfuscation {
externalProcessName { processName -> 'non-build-process' }
}
}
}
Integrating your CI tool
Jenkins
The Gradle Jenkins plugin prominently displays links to the Build Scan for any Gradle or Maven build that produce Build Scans, which makes it convenient to access the Build Scans. See the following screenshot for an example:
Besides that, the plugin allows you to instrument all CI jobs and to publish a Build Scan without modifying the underlying projects. This eases the adoption of Build Scans within the company and allows configuring the Develocity Gradle plugin or Develocity Maven extension in a central place. For more information please read the documentation here.
TeamCity
The TeamCity Build Scan plugin prominently displays links to the Build Scan for any Gradle or Maven build that produce Build Scans, which makes it convenient to access the Build Scans. See the following screenshot for an example:
Besides that, the plugin allows you to instrument all CI jobs and to publish a Build Scan without modifying the underlying projects. This eases the adoption of Build Scans within the company and allows configuring the Develocity Gradle plugin or Develocity Maven extension in a central place. For more information please read the documentation here.
Bamboo
The Develocity Bamboo plugin prominently displays links to the Build Scan for any Gradle or Maven build that produce Build Scans, which makes it convenient to access the Build Scans. See the following screenshot for an example:
Besides that, the plugin allows you to instrument all CI jobs and to publish a Build Scan without modifying the underlying projects. This eases the adoption of Build Scans within the company and allows configuring the Develocity Gradle plugin or Develocity Maven extension in a central place. For more information please read the documentation here.
GitLab templates
The Develocity GitLab templates allow you to instrument CI jobs and to publish a Build Scan without modifying the project’s build scripts. This eases the adoption of Build Scans within the company and allows configuring the Develocity Gradle plugin or Develocity Maven extension at the CI level. For more information please read the documentation here.
GitHub Actions
The Gradle GitHub Action prominently displays links to the Build Scan for any Gradle build that produces Build Scans, which makes them convenient to access. See the following screenshot for an example:
Besides that, the plugin allows you to instrument all CI jobs and to publish a Build Scan without modifying the underlying Gradle build, via environment variables defined in your GitHub Actions workflow. This eases the adoption of Build Scans within the company and allows configuring the Develocity Gradle plugin at the CI level. For more information please read the documentation here.
Using Build Caching
The Gradle Enterprise Gradle plugin, since version 3.11, provides a build cache connector that can be used to leverage the build cache provided by Develocity. Gradle’s out-of-the-box support for generic HTTP build cache servers is also compatible with the build cache provided by Develocity, and can be used when the Develocity specific connector can not be used.
The Develocity specific connector should be preferred, and can be used whenever all of the following conditions are met:
-
You are using Gradle version >= 6.0
-
You are using Develocity plugin version >= 3.11
-
You are using Develocity version >= 2022.3
-
You are using Develocity Build Cache Nodes of version >= 13
Using the Develocity connector
(plugin 3.11+, Develocity 2022.3+, Gradle 6+)
Users of Gradle’s configuration cache feature must use version 7.5.1 of Gradle or later when using the Develocity build cache connector. Earlier versions of Gradle will fail with an error message stating “Could not create service of type BuildCacheController”. |
The Develocity build cache connector can be used by registering the connector with Gradle and configuring it:
gradleEnterprise {
server = "https://develocity.mycompany.com"
}
buildCache {
remote(gradleEnterprise.buildCache) {
// configure
}
}
gradleEnterprise {
server = "https://develocity.mycompany.com"
}
buildCache {
remote(gradleEnterprise.buildCache) {
// configure
}
}
The buildCache {}
method is provided by Gradle, with the gradleEnterprise.buildCache
method being provided by the Develocity plugin extension.
Without further configuration, the build will now attempt to read entries from the built-in build cache of the specified Develocity server. The connector of type GradleEnterpriseBuildCache can be configured inside the configuration block.
Credentials
If an access key has been configured for the specified Develocity server (see Authenticating), it will be used. Otherwise, requests will be sent anonymously.
Develocity also allows build caches to be configured with username and password credentials separate to access-key-based access control. To connect with a username and password credential, use the usernameAndPassword()
method. The username and password will be used instead of any configured access key.
gradleEnterprise {
server = "https://develocity.mycompany.com"
}
buildCache {
remote(gradleEnterprise.buildCache) {
usernameAndPassword("user", "pass")
}
}
gradleEnterprise {
server = "https://develocity.mycompany.com"
}
buildCache {
remote(gradleEnterprise.buildCache) {
usernameAndPassword("user", "pass")
}
}
Writing to the build cache
By default, Gradle will only attempt to read from the build cache. To also write to the build cache, the push
property of the connector must be configured to true
.
gradleEnterprise {
server = "https://develocity.mycompany.com"
}
buildCache {
remote(gradleEnterprise.buildCache) {
isPush = true
}
}
gradleEnterprise {
server = "https://develocity.mycompany.com"
}
buildCache {
remote(gradleEnterprise.buildCache) {
push = true
}
}
The write attempt may be rejected due to insufficient permissions depending on the Develocity server’s access control settings.
Using Expect-Continue
(plugin 3.12+)
The Develocity Build Cache client allows opt-in use of HTTP Expect-Continue. This causes PUT requests to happen in two parts: first a check whether a body would be accepted, then transmission of the body if the server indicates it will accept it. This is particularly suitable for Build Cache servers that routinely redirect or reject PUT requests, as it avoids transmitting the cache entry just to have it rejected (e.g. the cache entry is larger than the Build Cache will allow). This additional check incurs extra latency when the server accepts the request, but reduces latency when the request is rejected or redirected.
While the Develocity Build Cache Node supports Expect-Continue, not all HTTP servers and proxies reliably do. Be sure to check that your Build Cache server does support it before enabling.
gradleEnterprise {
server = "https://develocity.mycompany.com"
}
buildCache {
remote(gradleEnterprise.buildCache) {
useExpectContinue = true
}
}
gradleEnterprise {
server = "https://develocity.mycompany.com"
}
buildCache {
remote(gradleEnterprise.buildCache) {
useExpectContinue = true
}
}
Using a non-built-in cache
Develocity provides a built-in build cache, but can also leverage separately deployed build cache nodes for geographical distribution and horizontal scaling. If you are using such a non-built-in node, you must configure its address with the build cache connector.
gradleEnterprise {
server = "https://develocity.mycompany.com"
}
buildCache {
remote(gradleEnterprise.buildCache) {
server = "https://develocity-cache-1.mycompany.com"
}
}
gradleEnterprise {
server = "https://develocity.mycompany.com"
}
buildCache {
remote(gradleEnterprise.buildCache) {
server = "https://develocity-cache-1.mycompany.com"
}
}
Note that the server address should be specified without any request path component.
If using access-key-based authentication, the given build cache server must be of version 13 or later and be connected with the Develocity server specified by the gradleEnterprise {}
extension.
Similar to the Develocity server configuration, the remote Build Cache server configuration also provides an
settings.gradle.kts
settings.gradle
|
This is a convenient workaround during the initial evaluation, but it is a serious security issue and should not be used in production. |
Using Gradle’s built-in HTTP connector
Gradle’s out-of-the-box support for generic HTTP build cache servers is also compatible with the build cache provided by Develocity, and can be used when the Develocity specific connector can not be used.
gradleEnterprise {
server = "https://develocity.mycompany.com"
}
buildCache {
remote(HttpBuildCache::class) {
url = uri("https://develocity.mycompany.com/cache/")
}
}
gradleEnterprise {
server = "https://develocity.mycompany.com"
}
buildCache {
remote(HttpBuildCache) {
url = 'https://develocity.mycompany.com/cache/'
}
}
When using this connector, access-key-based access control cannot be used. Instead, username and password based access control must be used which is also supported by the Develocity build cache and can be configured by administrators.
Using Predictive Test Selection
(plugin 3.11+, Develocity 2022.3+)
Develocity Predictive Test Selection allows developers to get faster feedback by running only tests that are likely to provide useful feedback on a particular code change using a probabilistic machine learning model.
For information on how to use Predictive Test Selection, please consult the Predictive Test Selection User Manual. |
Using Test Distribution
(plugin 3.11+, Develocity 2022.3+)
Develocity Test Distribution takes your existing test suites and distributes them across remote agents to execute them faster.
For information on how to use Test Distribution, please consult the Test Distribution User Manual. |
Using Test Retry
(plugin 3.12+, Develocity 2022.4+)
When test retry is enabled, any failed tests are retried after all the tests have been executed. The process repeats with tests that continue to fail until the maximum specified number of retries has been attempted, or there are no more failing tests.
By default, the test task does not fail when all failed tests pass after a retry. This setting can be changed so that tests that pass on retry cause the task to fail.
Tests that initially fail but pass on retry are considered “flaky” by Develocity. For information on how to detect flaky tests with test retry, please consult the Develocity Flaky Test Detection Guide.
Configuration
Test retry is not enabled by default. It can be enabled and configured via the retry
extension added to each Test
task by the plugin.
import com.gradle.enterprise.gradleplugin.testretry.retry (1)
tasks.test {
retry {
maxRetries.set(3) (2)
maxFailures.set(20) (3)
failOnPassedAfterRetry.set(true)(4)
}
}
tasks.named('test', Test) {
retry {
maxRetries = 3 (2)
maxFailures = 20 (3)
failOnPassedAfterRetry = true (4)
}
}
1 | For a Kotlin-based build script, you have to include the retry DSL extension provided by the Gradle Enterprise Gradle plugin. |
2 | The maximum number of times to retry an individual test. |
3 | The maximum number of test failures allowed before retrying is disabled for the current test run. |
4 | Whether tests that initially fail and then pass on retry should fail the task. |
See the retry extension API reference.
Retrying only some tests
By default, all tests are eligible for retrying. The filter
component of the test retry extension can be used to control which tests should be retried and which should not.
The decision to retry a test or not is based on the tests reported class name, regardless of the name of the test case or method. The annotations present or not on this class can also be used as the criteria.
import com.gradle.enterprise.gradleplugin.testretry.retry
tasks.test {
retry {
maxRetries.set(3)
filter {
// filter by qualified class name (* matches zero or more of any character)
includeClasses.add("*IntegrationTest")
excludeClasses.add("*DatabaseTest")
// filter by class level annotations
// Note: @Inherited annotations are respected
includeAnnotationClasses.add("*Retryable")
excludeAnnotationClasses.add("*NonRetryable")
}
}
}
tasks.named('test', Test) {
retry {
maxRetries = 3
filter {
// filter by qualified class name (* matches zero or more of any character)
includeClasses.add("*IntegrationTest")
excludeClasses.add("*DatabaseTest")
// filter by class level annotations
// Note: @Inherited annotations are respected
includeAnnotationClasses.add("*Retryable")
excludeAnnotationClasses.add("*NonRetryable")
}
}
}
Retrying on class-level
By default, individual tests are retried. The classRetry
component of the test retry extension can be used to control which test classes must be retried as a whole unit. To retry a class as a whole, the class must also satisfy the configured filter.
import com.gradle.enterprise.gradleplugin.testretry.retry
tasks.test {
retry {
maxRetries.set(3)
classRetry {
// configure by qualified class name (* matches zero or more of any character)
includeClasses.add("*StepWiseIntegrationTest")
// configure by class level annotations
// Note: @Inherited annotations are respected
includeAnnotationClasses.add("*ClassRetry")
}
}
}
tasks.named('test', Test) {
retry {
maxRetries.set(3)
classRetry {
// configure by qualified class name (* matches zero or more of any character)
includeClasses.add("*StepWiseIntegrationTest")
// configure by class level annotations
// Note: @Inherited annotations are respected
includeAnnotationClasses.add("*ClassRetry")
}
}
}
You can also use the ClassRetry annotation from the develocity-testing-annotations project without any additional configuration other than the dependency (version 1.x of the annotations is supported starting with 3.12, 2.x starting with 3.16). |
Retrying only for CI builds
You may find that local developer builds do not benefit much from retry behaviour, particularly when those tests are invoked via your IDE. In that case we recommend enabling retry only for CI builds.
import com.gradle.enterprise.gradleplugin.testretry.retry
val isCiServer = System.getenv().containsKey("CI")
tasks.test {
retry {
if (isCiServer) { (1)
maxRetries.set(3)
maxFailures.set(20)
failOnPassedAfterRetry.set(true)
}
}
}
boolean isCiServer = System.getenv().containsKey("CI")
tasks.named('test', Test) {
retry {
if (isCiServer) {
maxRetries = 3
maxFailures = 20
failOnPassedAfterRetry = true
}
}
}
1 | Only configure retrying tests, when running on CI |
Migrating from Test Retry Gradle plugin
Prior to version 3.12 of this plugin, enabling test retries required the org.gradle.test-retry
plugin. It is recommended that Develocity users adopt the Develocity plugin’s retry functionality for ensured future compatibility and easier adoption of future Develocity specific features.
This plugin offers effectively the same API as the org.gradle.test-retry
plugin, making migrating simple:
-
Builds using Groovy build scripts need to just remove reference to the
org.gradle.test-retry
plugin. -
Builds using Kotlin DSL build scripts need to remove reference to the
org.gradle.test-retry
plugin and add an import ofcom.gradle.enterprise.gradleplugin.testretry.retry
.
If you cannot easily remove the org.gradle.test-retry
plugin from your build, you can disable the test retry functionality provided by the Gradle Enterprise Gradle plugin by setting the system property gradle.enterprise.testretry.enabled
to false
.
The system property can be specified in the user’s or build’s gradle.properties
file (i.e. ~/.gradle/gradle.properties
).
systemProp.gradle.enterprise.testretry.enabled=false
See the Build Environment chapter of the Gradle User Manual for more information on specifying system properties.
Migrating to the Develocity plugin
There will be no further releases of the Gradle Enterprise Gradle plugin starting with Develocity 2024.3. It’s recommended to upgrade to the Develocity Gradle plugin as soon as possible. |
Starting with version 3.17, the plugin is available under the “Develocity” brand. Please see the Develocity Gradle Plugin User Manual for the latest documentation. Several core functionalities have been deprecated with the rebranding and will be removed in a future plugin version. Therefore, upgrading to the 3.17+ version of the plugin requires more than just updating the version number.
Recommended migration path
Assume the following example configuration of the Gradle Enterprise plugin:
plugins {
id("com.gradle.enterprise") version "3.16.2"
id("com.gradle.common-custom-user-data-gradle-plugin") version "1.13"
}
val isCI = !System.getenv("CI").isNullOrEmpty()
gradleEnterprise {
server = "https://develocity-samples.gradle.com"
buildScan {
capture { isTaskInputFiles = true }
isUploadInBackground = !isCI
publishAlways()
}
}
buildCache {
remote(gradleEnterprise.buildCache) {
isEnabled = true
isPush = isCI
}
}
plugins {
id 'com.gradle.enterprise' version '3.16.2'
id 'com.gradle.common-custom-user-data-gradle-plugin' version '1.13'
}
def isCI = System.getenv('CI') != null
gradleEnterprise {
server = 'https://develocity-samples.gradle.com'
buildScan {
capture { taskInputFiles = true }
uploadInBackground = !isCI
publishAlways()
}
}
buildCache {
remote(gradleEnterprise.buildCache) {
enabled = true
push = isCI
}
}
Start by updating the plugin’s version to 3.17+
and changing the plugin ID to com.gradle.develocity
. If you are using the common-custom-user-data-gradle-plugin
, update the plugin’s version to 2.0+
. After running a simple task like ./gradlew help
you will be informed about the usage of the deprecated APIs:
WARNING: The following functionality has been deprecated and will be removed in the next major release of the Develocity Gradle plugin. Run with '-Ddevelocity.deprecation.captureOrigin=true' to see where the deprecated functionality is being used. For assistance with migration, see https://gradle.com/help/gradle-plugin-develocity-migration.
- The deprecated "gradleEnterprise.buildScan.tag" API has been replaced by "develocity.buildScan.tag"
- The deprecated "gradleEnterprise.buildScan.buildFinished" API has been replaced by "develocity.buildScan.buildFinished"
- The deprecated "gradleEnterprise.buildScan.background" API has been replaced by "develocity.buildScan.background"
- The deprecated "gradleEnterprise.server" API has been replaced by "develocity.server"
- The deprecated "gradleEnterprise.buildScan.capture.taskInputFiles" API has been replaced by "develocity.buildScan.capture.fileFingerprints"
- The deprecated "gradleEnterprise.buildScan.uploadInBackground" API has been replaced by "develocity.buildScan.uploadInBackground"
- The deprecated "gradleEnterprise.buildCache" API has been replaced by "develocity.buildCache"
- The deprecated "gradleEnterprise.buildScan.value" API has been replaced by "develocity.buildScan.value"
- The "buildScan.publishAlways" API has been removed, the updated Develocity "buildScan.publishing" API publishes a Build Scan by default
Most of the violations can be fixed by replacing references of gradleEnterprise
with develocity
. Some APIs have been replaced by more descriptive and idiomatic alternatives. In this example, those APIs are taskInputFiles
and publishAlways()
. See Breaking API changes section for this and other examples. After these changes, your build script should look like the following:
plugins {
id("com.gradle.develocity") version "3.17"
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0"
}
val isCI = !System.getenv("CI").isNullOrEmpty()
develocity {
server.set("https://develocity-samples.gradle.com")
buildScan.uploadInBackground.set(!isCI)
}
buildCache {
remote(develocity.buildCache) {
isEnabled = true
isPush = isCI
}
}
plugins {
id 'com.gradle.develocity' version '3.17'
id 'com.gradle.common-custom-user-data-gradle-plugin' version '2.0'
}
def isCI = System.getenv('CI') != null
develocity {
server = 'https://develocity-samples.gradle.com'
buildScan.uploadInBackground = !isCI
}
buildCache {
remote(develocity.buildCache) {
enabled = true
push = isCI
}
}
After running another build, you may still see some unresolved deprecation warnings. To identify the origin of the deprecated API usage, re-run the build with the develocity.deprecation.captureOrigin
system property set to true
. Usually, these warnings would originate from a conventions plugin that configures Develocity. Ensure you are using the latest version of any plugin that may be configuring Develocity.
Deprecation warnings from transitive dependencies can be muted by setting the develocity.deprecation.muteWarnings system property to true . |
Updating access keys
Starting with version 3.17, access keys are stored in new locations:
-
The
GRADLE_ENTERPRISE_ACCESS_KEY
environment variable has been replaced withDEVELOCITY_ACCESS_KEY
-
The
~/.gradle/enterprise
directory has been replaced with~/.gradle/develocity
Any access keys stored at ~/.gradle/enterprise
will be automatically migrated to ~/.gradle/develocity
the first time a build is run after upgrading. However, the GRADLE_ENTERPRISE_ACCESS_KEY
environment variable will need to be renamed to DEVELOCITY_ACCESS_KEY
manually.
A deprecation warning will be printed if an access key is used from an old location.
To retain backwards compatibility, the plugin will continue to look up access keys in the legacy locations, but future versions of the plugin will drop support for them. |
Breaking API changes
In addition to the rename of the root API namespace to develocity
, certain APIs received more significant updates. See the API reference for complete overview of the updated API.
Deprecated gradle-enterprise
extension
The gradle-enterprise
shorthand that applied the Gradle Enterprise plugin in the plugins
block has been deprecated. In case you used this syntax, please migrate to the syntax that specifies the version explicitly:
// <3.17 (shorthand syntax)
plugins {
`gradle-enterprise`
}
// 3.17+
plugins {
id("com.gradle.develocity") version "3.17"
}
Gradle providers instead of setters and getters for configuration properties
The plugin API no longer exposes getters and setters for configuration properties like develocity.buildScan.server
. Instead, the latest version of the plugin adopts Gradle’s providers API. Build script developers should not notice any significant differences due to convenience methods provided by Gradle for property access.
However, if you are using the Kotlin DSL on a version of Gradle older than 8.2, you will need to use .set()
when configuring Develocity extension properties. Similarly, Kotlin DSL users need to update accessors for boolean properties, for example, gradleEnterprise.buildScan.isUploadInBackground
should be changed to develocity.buildScan.uploadInBackground
.
Convention plugins developers should replace code snippets like buildScan.setServer("value")
with buildScan.getServer().set("value")
.
Updated file fingerprints capturing API
The legacy APIs for enabling file fingerprints capturing gradleEnterprise.buildScan.captureTaskInputFiles
and gradleEnterprise.buildScan.capture.taskInputFiles
have been replaced by develocity.buildScan.capture.fileFingerprints
.
If you previously configured gradleEnterprise.buildScan.capture.taskInputFiles = true
, then the explicit configuration can be removed as starting with plugin version 3.17, hashes of inputs of tasks (and other units of work) will be captured by default.
Updated terms of use API
Starting with plugin version 3.17, the legacy API for accepting terms of service gradleEnterprise.buildScan.termsOfServiceUrl / termsOfServiceAgree
has been replaced by develocity.buildScan.termsOfUseUrl / termsOfUseAgree
. Additionally, the URL of terms of service has changed from https://gradle.com/terms-of-service
to https://gradle.com/help/legal-terms-of-use
.
Updated Build Scan publication behavior
The Build Scan publication API has received a significant overhaul in the 3.17 version of the plugin. In the following examples, we provide an overview of how to represent common publication scenarios using the new API. Refer to the Develocity Gradle Plugin User Manual for a complete guide on the new publication API.
Publishing every build
Starting with 3.17, a Build Scan is published by default to the configured Develocity instance. Remove all usages of publishAlways()
in your build configuration.
Publishing based on criteria
Strict conditional publication APIs like publishAlwaysIf(boolean)
or publishOnFailureIf(boolean)
have been replaced by a more flexible publishing.onlyIf(condition)
API.
// <3.17
gradleEnterprise {
buildScan {
publishOnFailureIf(!System.getenv("CI").isNullOrEmpty())
}
}
// 3.17+
develocity {
buildScan {
publishing.onlyIf { it.buildResult.failures.isNotEmpty() && !System.getenv("CI").isNullOrEmpty() }
}
}
// <3.17
gradleEnterprise {
buildScan {
publishOnFailureIf(System.getenv("CI"))
}
}
// 3.17+
develocity {
buildScan {
publishing.onlyIf { !it.buildResult.failures.empty && System.getenv("CI") }
}
}
Publishing on demand
To enable publishing on demand, you need to disable unconditional Build Scan publication and add the --scan
argument to any Gradle build you want to publish.
develocity {
buildScan {
publishing.onlyIf { false }
}
}
develocity {
buildScan {
publishing.onlyIf { false }
}
}
Gradle versions older than 8.4 do not recognize the Develocity plugin as a replacement for the Gradle Enterprise plugin. As a result, when a build is run with the --scan
argument, Gradle applies the bundled version of the plugin which may conflict with the Develocity plugin configured in your build. To resolve this issue, consider upgrading to a newer Gradle version or configuring the on-demand publication explicitly using a custom system property, like in the following example.
develocity {
buildScan {
publishing.onlyIf { System.getProperty("publishBuildScan") != null }
}
}
develocity {
buildScan {
publishing.onlyIf { System.getProperty("publishBuildScan") }
}
}
Consolidated test task configuration
Starting with 3.17, all test task extensions for test acceleration and analytics features are grouped under a develocity
root extension. Please see the corresponding feature sections for a detailed overview of the new API.
// <3.17
tasks.test {
useJUnitPlatform()
retry.maxRetries.set(3)
distribution.enabled.set(true)
predictiveSelection.enabled.set(true)
}
// 3.17+
tasks.test {
useJUnitPlatform()
develocity {
testRetry.maxRetries.set(3)
testDistribution.enabled.set(true)
predictiveTestSelection.enabled.set(true)
}
}
// <3.17
tasks.named('test', Test) {
useJUnitPlatform()
retry.maxRetries = 3
distribution.enabled = true
predictiveSelection.enabled = true
}
// 3.17+
tasks.named('test', Test) {
useJUnitPlatform()
develocity {
testRetry.maxRetries = 3
testDistribution.enabled = true
predictiveTestSelection.enabled = true
}
}
Developing convention plugins
If you own a convention plugin that should work both with the Gradle Enterprise plugins <3.17 and new Develocity plugins 3.17+, use the Common Custom User Data Gradle plugin as a reference. The plugin uses an adapters library that simplifies the configuration of the Develocity plugin when either the old or the new API is exposed.
Upgrading to Gradle 6
If you were previously using the Build Scan plugin 2.x with Gradle 5, upgrading to the 3.x plugin requires more than just updating the version number. The ID of the plugin has changed, and it now must be applied in the build’s settings file.
To upgrade, first locate where the 2.x plugin is being applied and remove it. This is likely to be in the root build.gradle
or build.gradle.kts
file, and will look similar to the following:
plugins {
id("com.gradle.build-scan").version("2.4.2")
}
plugins {
id "com.gradle.build-scan" version "2.4.2"
}
Then, add the following to the settings.gradle
or settings.gradle.kts
file for the build:
plugins {
id("com.gradle.enterprise") version("3.19")
}
plugins {
id "com.gradle.enterprise" version "3.19"
}
Any buildScan {}
configuration should be enclosed in a gradleEnterprise {}
block, or be moved to the settings file inside a gradleEnterprise {}
block. Please see the Gradle 6.x section above for more information.
gradleEnterprise {
server = "https://develocity.mycompany.com"
buildScan {
// tags and other settings
}
}
gradleEnterprise {
server = "https://develocity.mycompany.com"
buildScan {
// tags and other settings
}
}
Gradle 4.x and earlier
Gradle 2.1 - 4.10.3
Gradle versions earlier than 5.0 are not compatible with the latest plugin and features. plugin 1.16 is the best available version for such builds. The plugin must be applied to the root project of the build, with ID com.gradle.build-scan
.
plugins {
id("com.gradle.build-scan") version "1.16"
}
plugins {
id "com.gradle.build-scan" version "1.16"
}
Gradle 2.0
Gradle 2.0 does not support the plugins {}
syntax that was introduced in Gradle 2.1. As such, the plugin must be applied differently.
buildscript {
repositories {
maven(url = "https://plugins.gradle.org/m2/")
}
dependencies {
classpath("com.gradle:build-scan-plugin:1.16")
}
}
apply(plugin = "com.gradle.build-scan")
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "com.gradle:build-scan-plugin:1.16"
}
}
apply plugin: "com.gradle.build-scan"
Troubleshooting
Failed background Build scan uploads
When using background Build Scan uploading (default behaviour since plugin version 3.3, see this section for configuration options) upload failures are not visible in the build logging due to occurring in a background process after the build has finished. Instead, errors are logged to a file located at ~/.gradle/build-scan-data/upload-failure.log
. If this additional information does not help to resolve the failure, please contact technical support and include the contents of this log file.
If the background upload process fails to start, a warning is shown in the build console and uploading is performed in the build process. If this occurs, please contact technical support with the log files located at ~/.gradle/build-scan-data/<<plugin-version>>/pending-uploads/*.log
.
Slow resolution of host name
Build Scans attempt to determine the host name of the machine. An issue affecting macOS can cause a delay when doing this in some environments.
If you see a warning during your build that resolving the local host name is slow, you can workaround the problem by adding a host name mapping to your /etc/hosts
file.
Add these lines to your /etc/hosts
file, substituting your computer name for 'mbpro' in the below snippet:
127.0.0.1 localhost mbpro.local
::1 localhost mbpro.local
Late application
When using a Gradle version earlier than 4.3 or a Build Scan plugin version earlier than 1.10, you should declare the Build Scan plugin before any other plugin. This ensures that any relevant configuration data from those plugins is included in the Build Scans.
plugins {
id("com.gradle.build-scan") version "1.16" // apply before any other plugins
id("java")
}
plugins {
id "com.gradle.build-scan" version "1.16" // apply before any other plugins
id "java"
}
Appendix A: API reference
Please see the API reference for more details about programmatic configuration of the Build Scan plugin.
The Common Custom User Data Gradle Plugin provided by Gradle Inc. provides an example. This plugin can be applied directly to your project, or can serve as a template project for your own plugin implementation.
Appendix B: Captured information
The Build Scan plugin captures information while the build is running and transmits it to a server after the build has completed.
Most of the information captured can be considered to be build data. This includes the name of the projects in your build, the tasks, plugins, dependencies, names and results of tests and other things of this nature. Some more general environmental information is also captured. This includes your Java version, operating system, hardware, country, timezone and other things of this nature.
Notably, the actual source code being built and the output artifacts are not captured. However, error messages emitted by compilers or errors in tests may reveal aspects of the source code.
Listing
The list below details the notable information captured by the Build Scan plugin and transmitted in a Build Scan.
-
Environment
-
User home (system property
'user.home'
) -
Username (system property
'user.name'
) (Can be obfuscated) -
Local hostname (environment variable
'COMPUTERNAME'
/'HOSTNAME'
) (Can be obfuscated) -
Public hostname (Can be obfuscated)
-
Local IP addresses (Can be obfuscated)
-
-
Build
-
Build invocation options (e.g. requested tasks, switches)
-
Build console output
-
Build failure exception messages and stacktraces
-
Project names and structure
-
Build Cache configuration
-
Background Build Scan publication
-
Gradle Daemon operational data (e.g. start time, build count)
-
Gradle lifecycle callbacks
-
File system watching
-
Configuration cache
-
Access
Build Scans published to a Develocity installation are viewable by all users that can reach the server. Develocity provides a search interface for discovering and finding individual Build Scans.
Build Scans published to scans.gradle.com are viewable by anyone with the link assigned when publishing the Build Scan. Links to individual Build Scans are not discoverable and cannot be guessed, but may be shared.
Appendix C: Release history
Please refer to the Develocity Gradle Plugin User Manual for the release history starting with version 3.17. |
3.16.2
-
[FIX] Test Distribution: File transfer start/finish events are sometimes ordered incorrectly
Compatible with scans.gradle.com and Develocity 2023.4 or later.
3.16.1
-
[FIX] Build Scan: Transform execution action duration is incorrectly captured
-
[FIX] Test Distribution: Executor requirements are not tracked as inputs
Compatible with scans.gradle.com and Develocity 2023.4 or later.
3.16
-
[NEW] Build Scan: capture artifact transform execution data
-
[NEW] Predictive Test Selection: Selection profile can be configured via new
pts.profile
system property -
[NEW] Test Distribution/Predictive Test Selection: Add support for develocity-testing-annotations version 2.0
-
[NEW] Test Distribution/Predictive Test Selection: Support for OpenTest4J file comparison failures when using Gradle 8.3+ via Tooling API clients
-
[NEW] Test Distribution/Predictive Test Selection: Fall back to regular execution if
fallbackToRegularExecutionOnMissingJUnitPlatform
property is set and JUnit Platform is not available -
[FIX] Predictive Test Selection: Selection mode can not be configured via build script
-
[FIX] Test Distribution: Retry filters are not respected if tests are configured to be retried in a new JVM
-
[FIX] Test Distribution/Predictive Test Selection: JUnit’s parallel execution configuration is not respected if a single test executor is used
Compatible with scans.gradle.com and Develocity 2023.4 or later.
3.15.1
-
[FIX] Test Distribution: Classpath conflict with the Gradle Enterprise plugin artifact added to the test runtime classpath/module path
-
[FIX] Test retry: Fix an issue that prevented configuration cache from being used with the bundled retry plugin
Compatible with scans.gradle.com and Develocity 2023.3 or later.
3.15
-
[NEW] Add support for project-level access control
-
[NEW] Add safe mode when the plugin is injected via init scripts on CI
-
[NEW] Predictive Test Selection: Add
pts.enabled
system property to enable / disable PTS -
[NEW] Predictive Test Selection:
pts.mode
system property takes precedence over configuration in the build -
[FIX] Plugin application fails because Test Acceleration is not compatible with Isolated Projects
-
[FIX] Build Scan: Unscheduled planned transform steps are captured as scheduled ones
Compatible with scans.gradle.com and Develocity 2023.3 or later.
3.14.1
-
[NEW] Test Distribution/Predictive Test Selection: Add support for Gradle 8.3’s and JUnit 5.10’s new test dry run mode
-
[NEW] Test Retry: Retry Spock 2 parameterized methods individually rather than the entire test class
-
[FIX] Test Distribution: Finish event for test execution may have an older timestamp than the corresponding start event
-
[FIX] Test Distribution: Local test executors are reported as released after test task has finished
-
[FIX] Test Distribution: Re-scheduled tests are reported after the test executor has been released
Compatible with scans.gradle.com and Develocity 2023.2 or later.
3.14
-
[NEW] Build Cache: Avoid trying to upload too-large cache entries to build cache nodes
-
[NEW] Test Distribution: Capture configuration and runtime insights in Build Scans
-
[NEW] Predictive Test Selection: Introduce mode to run remaining tests, i.e. tests that haven’t been executed for the same inputs
-
[NEW] Predictive Test Selection: Introduce selection profiles (conservative/standard/fast) to influence how many tests are selected
-
[FIX] Build Scan: Outcomes of planned transform nodes with avoided executions are not accurate
-
[FIX] Build Scan: Task is reported as created twice during configuration cache store run
-
[FIX] Predictive Test Selection: Selection requests failing due to sporadic network issues are not retried
-
[FIX] Subclasses of VerificationException are not classified as verification failures
Compatible with scans.gradle.com and Develocity 2023.2 or later.
3.13.4
-
[FIX] Test Distribution: Response timeout too short when under heavy load
-
[FIX] Test Distribution/Predictive Test Selection: Test Discovery results with failures are incorrectly cached
-
[FIX] Predictive Test Selection/Test Retry: Confusing failure message when tests could not be retried
Compatible with scans.gradle.com and Develocity 2023.1 or later.
3.13.3
-
[FIX] Test Retry: Update ASM to 9.5 for Java 21 compatibility
Compatible with scans.gradle.com and Develocity 2023.1 or later.
3.13.2
-
[NEW] Improve reporting of plugin-caused errors to distinguish them from regular build failures
Compatible with scans.gradle.com and Develocity 2023.1 or later.
3.13.1
-
[NEW] Predictive Test Selection: Allow loading test task outputs from the Build Cache when Predictive Test Selection is enabled in Gradle 8.2 and later
-
[FIX] Build Scan: Do no emit deprecation warnings when used together with Gradle 8.2
-
[FIX] Test Distribution: Test task fails if partition-level failure is successfully retried in a new JVM
-
[FIX] Test Distribution: Upload of input files with very long names sporadically fails
-
[FIX] Predictive Test Selection: Changed must-run configuration not applied when rerunning test task
Compatible with scans.gradle.com and Develocity 2023.1 or later.
3.13
-
[NEW] Build Scan: Capture planned artifact transform steps data
-
[FIX] Build Scan:
javax.net.ssl.* properties
are not forwarded to the background upload process -
[FIX] Build Scan: Ineligible build cache operations are not properly filtered out when using configuration-cache
-
[FIX] Build cache connector cannot be used for settings plugin included builds
Compatible with scans.gradle.com and Develocity 2023.1 or later.
3.12.6
-
[FIX] Test Distribution: classpath conflict with Apache commons-lang and commons-io
Compatible with scans.gradle.com and Develocity 2022.4 or later.
3.12.5
-
[FIX] Test Retry: configuration cache incompatibility with Gradle 8.1
-
[FIX] Build Cache: incorrect server address may yield “Invalid cookie header” warning in build logs
Compatible with scans.gradle.com and Develocity 2022.4 or later.
3.12.4
-
[FIX] IDE sync builds might fail due to Kotlin script compilation capturing error
-
[FIX] Test Distribution: Build fails if remote executors are preferred but the initial request to Develocity times out
-
[FIX] Test Retry: Failed test methods are not re-executed if class-level failure occurs on retry
Compatible with scans.gradle.com and Develocity 2022.4 or later.
3.12.3
-
[NEW] Test Distribution: Add support for 'filter' and 'classRetry' configuration of 'retry' extension
-
[NEW] Test Retry: Add support for JDK 19
Compatible with scans.gradle.com and Develocity 2022.4 or later.
3.12.2
-
[FIX] Test Distribution: Unnecessary connection attempts to Develocity server despite Test Distribution being disabled
Compatible with scans.gradle.com and Develocity 2022.4 or later.
3.12.1
-
[NEW] Do not wait for remote executors when
remoteExecutionPreferred=true
but no Develocity server is configured -
[FIX] Incompatibility with Kotlin Multiplatform Test tasks
Compatible with scans.gradle.com and Develocity 2022.4 or later.
3.12
-
[NEW] Add built-in support for develocity-testing-annotations
-
[NEW] Captures
skipReasonMessage
when specified for the task -
[NEW] Support to configure HTTP
Expect-Continue
on the Develocity build cache connector -
[NEW] Test Retry: Test retry functionality provided by the org.gradle.test-retry Gradle plugin is integrated
-
[NEW] Predictive Test Selection: Test discovery results are cached locally
-
[FIX] Remote HTTP build cache
allowUntrustedServer
is ignored ifgradleEnterprise.allowUntrustedServer
istrue
-
[FIX] Deprecation warning for undeclared usage of build service when Test Distribution or Predictive Test Selection are enabled
-
[FIX] Predictive Test Selection: Fails with a misleading "internal error" if test task input files could not be determined
Compatible with scans.gradle.com and Develocity 2022.4 or later.
3.11.4
-
[FIX] Since
3.11.3
, scans.gradle.com terms of use acceptance is requested regardless of whether a Build Scan is being published or not
Compatible with scans.gradle.com and Develocity 2022.3 or later.
3.11.3
-
[NEW] Test Distribution: Retry file upload on content digest mismatch
-
[FIX] Plugin is not compatible with Gradle’s “stable” configuration cache feature
-
[FIX] Predictive Test Selection: Handling of multiple unique IDs per fully-qualified test class name
Compatible with scans.gradle.com and Develocity 2022.3 or later.
3.11.2
-
[NEW] Test Distribution: Delete remaining files in temporary workspaces on remote agents in case of failures
-
[NEW] Test Distribution: Use
gradle-enterprise-maven-extension/<version>
asUser-Agent
for HTTP requests -
[NEW] Test Distribution/Predictive Test Selection: Detect and fail for unsupported test engines
-
[FIX] Test Distribution: Test tasks failing with
CancellationException
due to concurrency issue -
[FIX] Test Distribution: Log misleading ClassNotFoundException message on Test Distribution agents when stopping worker while session is being opened
-
[FIX] Test Distribution: Write to temporary workspaces after worker on Test Distribution agents was asked to stop
-
[FIX] Predictive Test Selection: Show misleading warning when running with
--scan
without havingpublishAlways()
configured
Compatible with scans.gradle.com and Develocity 2022.3 or later.
3.11.1
-
[FIX] Develocity Gradle plugin 3.11 is incompatible with Java < 11
-
[FIX] Test Distribution: Displayed total number of test classes in progress reporting does not account for executor restrictions
Compatible with scans.gradle.com and Develocity 2022.3 or later.
3.11
-
[NEW] Build Scans display Java toolchain usage for tasks (requires Gradle 7.6)
-
[NEW] Develocity Test Distribution Gradle plugin has been merged into this plugin
-
[NEW] Tests can be configured as local-only or remote-only when using Test Distribution
-
[NEW] Access key authentication to Develocity build caches
-
[FIX] Prevent enabling or disabling Test Distribution or Predictive Test Selection during task execution
-
[FIX] User data capture settings are not respected on very early build failures
Compatible with scans.gradle.com and Develocity 2022.3 or later.
3.10.3
-
[FIX] Improved warning message when a Build Scan can’t be published
Compatible with scans.gradle.com and Develocity 2022.2 or later.
3.10.2
-
[FIX] Improve Gradle plugin ID lookups from JAR files
Compatible with scans.gradle.com and Develocity 2022.2 or later.
3.10.1
-
[FIX]
buildScanPublishPrevious
does not capture Gradle version with which the original Build Scan was produced -
[FIX] Events may be captured out of order under certain circumstances
Compatible with scans.gradle.com and Develocity 2022.2 or later.
3.10
-
[NEW] Configuration cache store/load metrics are captured for Gradle
7.5+
-
[NEW] Build Scans are captured for builds declaring a
Settings
plugin usingpluginManagement#includeBuild
-
[NEW] Build Scans are captured for builds declaring a Git source dependency for Gradle
6.0+
-
[FIX] Captured build cache enabled-ness may be incorrect when build’s start parameters are modified programmatically
Compatible with scans.gradle.com and Develocity 2022.2 or later.
3.9
-
Capture the user home directory in order to normalize paths
-
Improve test ingestion support
Compatible with scans.gradle.com and Develocity 2022.1 or later.
3.8.1
-
Improve error handling around user callbacks
-
Improve SOCKS proxy server support
Compatible with scans.gradle.com and Develocity 2021.4 or later.
3.8
-
Capture directory sensitivity and line-ending sensitivity of task file inputs
-
Improve message when running build offline and trying to publish a Build Scan
Compatible with scans.gradle.com and Develocity 2021.4 or later.
3.7.2
-
Minor performance improvements
Compatible with scans.gradle.com and Develocity 2021.3 or later.
3.7.1
-
Properly capture OS name and version for macOS 11+
-
Handle early use of background for conf cache builds
Compatible with scans.gradle.com and Develocity 2021.3 or later.
3.7
-
Allow configuring access key programmatically
-
Allow capturing links with up to 100000 characters
-
Allow opt-out from build and test log capturing
Compatible with scans.gradle.com and Develocity 2021.3 or later.
3.6.4
-
Do not capture identical tags
-
Minor internal performance improvements
Compatible with scans.gradle.com and Develocity 2021.1 or later.
3.6.3
-
Restore support for custom locales (e.g.
tr-TR
) -
Make programmatically configured access key readable by Test Distribution plugin
Compatible with scans.gradle.com and Develocity 2021.1 or later.
3.6.2
-
Access key can be configured programmatically
Compatible with scans.gradle.com and Develocity 2021.1 or later.
3.6.1
-
Reduced memory usage for when capturing task file inputs in very large builds
Compatible with scans.gradle.com and Develocity 2021.1 or later.
3.6
-
Avoid occasional Build Scan capture errors during IDE sync
-
The
GRADLE_ENTERPRISE_ACCESS_KEY
environment variable allows specifying the access keys for multiple hosts -
Reduced memory usage for builds with lots of input files
Compatible with scans.gradle.com and Develocity 2021.1 or later.
3.5.2
-
Ignore Build Cache operations related to artifact transforms (This restriction will be lifted when artifact transforms are supported in Build Scans)
-
Properly capture scripts or plugins applied to multiple Gradle types or multiple included builds
-
Properly capture custom links, tags and values concurrently
-
Fix deduplication of deprecated usages
Compatible with scans.gradle.com and Develocity 2020.4 or later.
3.5.1
-
Improve file path normalization to properly capture file roots (e.g. workspace, Gradle user home etc.)
Compatible with scans.gradle.com and Develocity 2020.4 or later.
3.5
-
Compatibility with HTTP proxies requiring content-length header for requests potentially having a body
-
More effective compression of Build Scan data during publishing
Compatible with scans.gradle.com and Develocity 2020.4 or later.
3.4.1
-
Include diagnostics in error message when failing to load a Gradle service
-
Error in Gradle configuration capturing is fixed
Compatible with scans.gradle.com and Develocity 2020.3 or later.
3.4
-
Add support for Gradle configuration cache
-
Expose Gradle
Configuration Cache
andFile system watching
start parameters -
Expose
Background Build Scan publication
flag -
Include third party license files and notice file
Compatible with scans.gradle.com and Develocity 2020.3 or later.
3.3.4
-
Add support for basic authentication for HTTPS proxying
-
Error when using
null
values in proxy configuration is fixed -
Add support for Gradle’s upcoming
PlaceholderExceptionSupport
in exception capturing
Compatible with scans.gradle.com and Develocity 2020.2 or later.
3.3.3
-
Problems launching the background upload process are logged to the upload failure log file
Compatible with scans.gradle.com and Develocity 2020.2 or later.
3.3.2
-
Stale Build Scan files are cleaned up
-
Dock icon is not shown on macOS when provisioning an access key
-
Problems launching the background upload process are logged to the upload failure log file
-
The Develocity Gradle Plugin jar is now digitally signed. Check the documentation’s appendix section on how to verify the signature
Compatible with scans.gradle.com and Develocity 2020.2 or later.
3.3.1
-
Fix Build Scan background uploading for Gradle 6.5+
-
Support
http.nonProxyHosts
system property for https proxies -
Capture concurrently used project configurations with identical names
-
Capture tasks that failed under special circumstances
Compatible with scans.gradle.com and Develocity 2020.2 or later.
3.3
-
Uploads Build Scans in the background after the build has finished
-
Documentation improvements
Compatible with scans.gradle.com and Develocity 2020.2 or later.
3.2.1
-
Improved task dependencies capturing for composite builds
Compatible with scans.gradle.com and Develocity 2020.1 or later.
3.2
-
Added support for capturing task execution plan
-
Gradle-defined proxy settings are used when publishing Build Scans
-
General performance improvements in dependencies capturing
Compatible with scans.gradle.com and Develocity 2020.1 or later.
3.1.1
-
Improved help message when authentication is required for Build Scan publishing
-
Excessive logging in Build Scans from use of artifact transforms is suppressed
-
Mitigation if slow local host name resolution on macOS
Compatible with scans.gradle.com and Develocity 2019.4 or later.
3.1
-
Support access key provisioning
-
Change response mime types from 'text/*' to 'application/*'
-
Fixed events ordering in special circumstances
Compatible with scans.gradle.com and Develocity 2019.4 or later.
3.0
-
Renamed to Gradle Enterprise plugin
-
Compatibility with Gradle 6
Compatible with scans.gradle.com and Develocity 2019.3.3 or later.
2.4.2
-
Added support for username, hostname and ip-addresses obfuscation
Compatible with scans.gradle.com and Develocity 2019.3 or later.
2.4.1
-
More reliable capture of logging output
-
Handle overlapping IDs in dependency resolution
-
More stable end-of-build handling
Compatible with scans.gradle.com and Develocity 2019.3 or later.
2.4
-
Added support for capturing all dependency selection reasons
-
Added support for capturing dependency variant details
-
Added support for capturing rich dependency version constraint information
-
Added support for capturing dependency platform and constraint details
Compatible with scans.gradle.com and Develocity 2019.3 or later.
2.3
-
Added support for plugin composite builds
-
Added support for continuous builds
-
Added support for capturing the details of annotation processors used during Java compilation
Compatible with scans.gradle.com and Develocity 2019.2 or later.
2.2.1
-
More reliable capture of task input files for buildSrc
Compatible with scans.gradle.com and Develocity 2019.1 or later.
2.2
-
Capture collection callback executions
-
Capture deprecation traces more compactly
-
General performance improvements in task inputs capturing
Compatible with scans.gradle.com and Develocity 2019.1 or later.
2.1
-
This version is compatible with Java 8 and later
-
Capture task input files
Compatible with scans.gradle.com and Develocity 2018.5 or later.
2.0.2
-
This version is compatible with Gradle 5.0 and later
-
Removed deprecated -Dscan and -Dscan=false system property, use --scan and --no-scan, respectively
-
Avoid memory leak when connecting to HTTPS server with often changing build classpath
Compatible with scans.gradle.com and Develocity 2018.4.2 or later.
2.0.1
-
This version was released for compatibility with Gradle 5.0-rc-1, but is not compatible with subsequent Gradle 5.0 releases. Please use version 2.0.2 or later instead
Compatible with scans.gradle.com and Develocity 2018.4.2 or later.
2.0
-
This version was released for compatibility with Gradle 5.0-milestone-1, but is not compatible with subsequent Gradle 5.0 releases. Please use version 2.0.2 or later instead
Compatible with scans.gradle.com and Develocity 2018.4.2 or later.
1.16
-
Capture repositories and source repository for a resolved module component
-
Capture individual lifecycle listeners and attribute to code unit application
-
Capture Gradle build script compilation details
-
Capture deprecated usage notifications
-
Capture source of included build
Compatible with scans.gradle.com and Develocity 2018.4 or later.
1.15.2
-
Fix for Kotlin script build caching
Compatible with scans.gradle.com and Develocity 2018.4 or later.
1.15.1
-
Fix for potential classloader leak when using buildScan.background()
Compatible with scans.gradle.com and Develocity 2018.3 or later.
1.15
-
Support capturing expensive custom values/tags/links in the background
-
Task buildScanPublishPrevious is created lazily
-
Fixed error when using included build as plugin and in main build
Compatible with scans.gradle.com and Develocity 2018.3 or later.
1.14
-
Further performance improvements
-
Removal of unnecessary implicit continuous Build Scan suppression
-
Capture information on lifecycle hook execution
Compatible with scans.gradle.com and Develocity 2018.3 or later.
1.13.4
-
Improved performance of Build Scan plugin, particularly during configuration time
Compatible with scans.gradle.com and Develocity 2018.2 or later.
1.13.3
-
Fix incompatibility with new continuous build features in Gradle 4.7
Compatible with scans.gradle.com and Develocity 2018.2 or later.
1.13.2
-
Do not show Build Scan publishing information when
--quiet
or-q
argument is present -
Retry likely temporary network errors while publishing a Build Scan
Compatible with scans.gradle.com and Develocity 2018.2 or later.
1.13.1
-
Improve performance of plugin data capture
Compatible with scans.gradle.com and Develocity 2018.2 or later.
1.13
-
Capture console log from beginning of the build
Compatible with scans.gradle.com and Develocity 2018.2 or later.
1.12.1
-
Fix message when terms of use are declined
Compatible with scans.gradle.com and Develocity 2018.1 or later.
1.12
-
Capture Build Scans for composite builds
-
Capture original task execution time
Compatible with scans.gradle.com and Develocity 2018.1 or later.
1.11
-
Capture test execution, dependency resolution, and project structure data from the beginning of the build
-
Improve performance of plugin data capture
-
Enhance Gradle version compatibility check
Compatible with scans.gradle.com and Develocity 2017.7 or later.
1.10.3
-
Fix incompatibility with Android Plugin for Gradle 3.0.0
Compatible with scans.gradle.com and Develocity 2017.6 or later.
1.10.2
-
Fix incompatibility with development builds of Gradle 4.4
Compatible with scans.gradle.com and Develocity 2017.6 or later.
1.10.1
-
Fix incompatibility with development builds of Gradle 4.4
Compatible with scans.gradle.com and Develocity 2017.6 or later.
1.10
-
Detect when build was run by a single-use daemon
-
Capture default charset of the JVM that executed the build
-
Capture build path of each project
Compatible with scans.gradle.com and Develocity 2017.6 or later.
1.9.1
-
Prompt user for license agreement acceptance, if needed
-
Capture console output and network activity until closer to the end of the build
-
Limit the number and length of captured custom tags, custom links, and custom values
Compatible with scans.gradle.com and Develocity 2017.5 or later.
1.9
-
Capture task graph calculation
-
Capture more fine-grained project configuration
-
Capture Build Cache interactions including artifact packing and unpacking
Compatible with scans.gradle.com and Develocity 2017.5 or later.
1.8
-
Capture resolved requested tasks
-
Capture Build Cache configuration when Build Cache is enabled
-
Capture task inputs for each task when Build Cache is enabled
-
Capture origin build invocation id for tasks with up-to-date and from-cache outcome
-
Capture reasons why a task was not up-to-date
-
Capture GC and peak heap memory statistics
-
Capture more network download activities
-
Get notified after successful Build Scan publication via buildScan.buildScanPublished()
-
Build Scan plugin logs at quiet level
Compatible with scans.gradle.com and Develocity 2017.4 or later.
1.7.4
-
Fix incompatibility with development builds of Gradle 4.0
Compatible with scans.gradle.com and Develocity 2017.3 or later.
1.7.3
-
Fix incompatibility with development builds of Gradle 4.0
Compatible with scans.gradle.com and Develocity 2017.3 or later.
1.7.2
-
Fix incompatibility with development builds of Gradle 4.0
Compatible with scans.gradle.com and Develocity 2017.3 or later.
1.7.1
-
Fix incompatibility with development builds of Gradle 4.0
Compatible with scans.gradle.com and Develocity 2017.3 or later.
1.7
-
Fix NPE when specifying buildScan "server" URL without schema or host
-
Overlapping output is captured as a non-cacheable reason for a task
Compatible with scans.gradle.com and Develocity 2017.3 or later.
1.6
-
Capture whether task outputs are cacheable and the reason if they are not
-
Capture network download activities
Compatible with scans.gradle.com and Develocity 2017.1 or later.
1.5
-
Capture whether tasks were skipped due to having no source
-
Capture whether tasks are lifecycle tasks (i.e. no actions)
-
Add "mailto:" link as custom Build Scan links
Compatible with scans.gradle.com and Develocity 2017.1 or later.
1.4
-
Performance improvements when executing many tests
Compatible with scans.gradle.com and Develocity 2017.1 or later.
1.3
-
Capture tags, links and/or values via conventional system properties
-
Reduced payload size when publishing large dependency graphs
Compatible with scans.gradle.com and Develocity 2016.4 or later.
1.2
-
Capture tags, links and/or values at the end of the build via buildScan.buildFinished()
Compatible with scans.gradle.com and Develocity 2016.4 or later.
1.1.1
-
Fixed issues with creating Build Scans for some projects via Android Studio
Compatible with scans.gradle.com and Develocity 2016.3 or later.
1.1
-
Capture user-defined tags, links and arbitrary values
-
Create a Build Scan for every build, or every failed build
-
Create a Build Scan for the immediately previous build
-
Publishing a Build Scan is implicitly disabled when build with --offline
-
Publish a Build Scan over an untrusted HTTPS connection, if explicitly configured
-
Several fixes for creating Build Scans when executing a build through an IDE
Compatible with scans.gradle.com and Develocity 2016.3 or later.
1.0
-
Initial release
Compatible with scans.gradle.com and Develocity 2016.3 or later.
Appendix D: Compatibility with Gradle Build Tool and Develocity
Compatibility between versions of Gradle, Develocity, and the Gradle Enterprise Gradle plugin can be found here.
Appendix E: Verifying the signature of the plugin jar
(plugin 3.15+)
The plugin jar is published to plugins.gradle.org alongside its signature. The public key is published to https://keys.openpgp.org. You can verify the signature as follows:
$ curl -OL https://plugins.gradle.org/m2/com/gradle/gradle-enterprise-gradle-plugin/3.19/gradle-enterprise-gradle-plugin-3.19.jar && \
curl -OL https://plugins.gradle.org/m2/com/gradle/gradle-enterprise-gradle-plugin/3.19/gradle-enterprise-gradle-plugin-3.19.jar.asc && \
gpg --keyserver keys.openpgp.org --recv-key 7B79ADD11F8A779FE90FD3D0893A028475557671 && \
gpg --verify gradle-enterprise-gradle-plugin-3.19.jar.asc gradle-enterprise-gradle-plugin-3.19.jar
The output of the last command should look similar to the following:
gpg: Signature made Thu Sep 28 16:17:46 2023 CEST gpg: using RSA key 893A028475557671 gpg: Good signature from "Gradle Inc. <info@gradle.com>" [unknown] gpg: aka "Gradle Inc. <maven-publishing@gradle.com>" [unknown] gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 7B79 ADD1 1F8A 779F E90F D3D0 893A 0284 7555 7671
This verifies that the artifact was signed with the private key that corresponds to the imported public key. The warning is emitted because you haven’t explicitly trusted the imported key (hence [unknown]
). One way of establishing trust is to verify the fingerprint over a secure channel. Please contact technical support should you wish to do so.
The access key used to sign older versions of Gradle Enterprise Gradle Plugin is revoked. Verifying the signature of these prior versions is no longer possible. |