From 1a46f822a471db76be9a4bdd52184f5ffd873da5 Mon Sep 17 00:00:00 2001 From: Adam <152864218+adam-enko@users.noreply.github.com> Date: Wed, 14 Aug 2024 10:18:48 +0200 Subject: [PATCH] Update Gradle Enterprise to Gradle Develocity (#3742) * Update Gradle Enterprise to Gradle Develocity --- build-settings-logic/build.gradle.kts | 2 +- ...ings.gradle-enterprise.settings.gradle.kts | 25 ++++++++++--------- gradle/libs.versions.toml | 8 +++--- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/build-settings-logic/build.gradle.kts b/build-settings-logic/build.gradle.kts index 2c0f13eda2..08c8658973 100644 --- a/build-settings-logic/build.gradle.kts +++ b/build-settings-logic/build.gradle.kts @@ -13,6 +13,6 @@ kotlin { } dependencies { - implementation(libs.gradlePlugin.gradle.enterprise) + implementation(libs.gradlePlugin.gradle.develocity) implementation(libs.gradlePlugin.gradle.customUserData) } diff --git a/build-settings-logic/src/main/kotlin/dokkasettings.gradle-enterprise.settings.gradle.kts b/build-settings-logic/src/main/kotlin/dokkasettings.gradle-enterprise.settings.gradle.kts index 4f8d3101f6..a6a00ed97e 100644 --- a/build-settings-logic/src/main/kotlin/dokkasettings.gradle-enterprise.settings.gradle.kts +++ b/build-settings-logic/src/main/kotlin/dokkasettings.gradle-enterprise.settings.gradle.kts @@ -5,11 +5,11 @@ import DokkaBuildSettingsProperties.Companion.BUILD_SCAN_USERNAME_DEFAULT import DokkaBuildSettingsProperties.Companion.dokkaBuildSettingsProperties /** - * Gradle Enterprise conventions. + * [Gradle Develocity](https://docs.gradle.com/develocity/gradle-plugin/) conventions. * * See [DokkaBuildSettingsProperties] for properties. * - * To use JetBrain's Gradle Enterprise set the URL + * To use JetBrain's Gradle Develocity set the URL * https://ge.jetbrains.com/ * in `$GRADLE_USER_HOME/gradle.properties`† * @@ -23,11 +23,11 @@ import DokkaBuildSettingsProperties.Companion.dokkaBuildSettingsProperties */ plugins { - id("com.gradle.enterprise") + id("com.gradle.develocity") id("com.gradle.common-custom-user-data-gradle-plugin") apply false } -gradleEnterprise { +develocity { val buildSettingsProps = dokkaBuildSettingsProperties val buildScanEnabled = buildSettingsProps.buildScanEnabled.get() @@ -36,16 +36,17 @@ gradleEnterprise { plugins.apply("com.gradle.common-custom-user-data-gradle-plugin") } + server = "https://ge.jetbrains.com/" + buildScan { - if (buildScanEnabled) { - server = "https://ge.jetbrains.com/" - publishAlwaysIf(buildScanEnabled) + publishing { + onlyIf { buildScanEnabled } + } - capture { - isTaskInputFiles = true - isBuildLogging = true - isUploadInBackground = true - } + capture { + buildLogging = buildScanEnabled + fileFingerprints = buildScanEnabled + testLogging = buildScanEnabled } val overriddenName = buildSettingsProps.buildScanUsername.orNull diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4f38689919..11a3e0d53d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -52,9 +52,9 @@ gradlePlugin-shadow = "8.3.0" gradlePlugin-gradlePluginPublish = "1.2.1" gradlePlugin-gradleNode = "7.0.1" -## Gradle enterprise -gradlePlugin-gradle-customUserData = "1.13" -gradlePlugin-gradle-enterprise = "3.16.2" +## Gradle Develocity +gradlePlugin-gradle-customUserData = "2.0.2" +gradlePlugin-gradle-develocity = "3.17.6" ## Test junit = "5.9.3" @@ -83,7 +83,7 @@ gradlePlugin-android = { module = "com.android.tools.build:gradle", version.ref gradlePlugin-shadow = { module = "com.gradleup.shadow:shadow-gradle-plugin", version.ref = "gradlePlugin-shadow" } gradlePlugin-gradlePublish = { module = "com.gradle.publish:plugin-publish-plugin", version.ref = "gradlePlugin-gradlePluginPublish" } gradlePlugin-gradle-customUserData = { module = "com.gradle:common-custom-user-data-gradle-plugin", version.ref = "gradlePlugin-gradle-customUserData" } -gradlePlugin-gradle-enterprise = { module = "com.gradle:gradle-enterprise-gradle-plugin", version.ref = "gradlePlugin-gradle-enterprise" } +gradlePlugin-gradle-develocity = { module = "com.gradle:develocity-gradle-plugin", version.ref = "gradlePlugin-gradle-develocity" } gradlePlugin-androidApi = { module = "com.android.tools.build:gradle-api", version.ref = "gradlePlugin-android" }