Skip to content

Commit 7a0e418

Browse files
committed
Update/Migrate to DV Gradle plugin 3.17
1 parent d8eef86 commit 7a0e418

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

build.gradle.kts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import com.gradle.enterprise.gradleplugin.testretry.retry
2-
import com.gradle.enterprise.gradleplugin.testselection.PredictiveTestSelectionProfile.FAST
3-
import com.gradle.enterprise.gradleplugin.testselection.PredictiveTestSelectionProfile.STANDARD
2+
import com.gradle.develocity.agent.gradle.test.PredictiveTestSelectionProfile.FAST
3+
import com.gradle.develocity.agent.gradle.test.PredictiveTestSelectionProfile.STANDARD
44
import groovy.json.JsonSlurper
55

66
// Upgrade transitive dependencies in plugin classpath
@@ -122,18 +122,18 @@ tasks.withType<Test>().configureEach {
122122
systemProperty("pluginGroupId", pluginGroupId)
123123
systemProperty("org.gradle.android.cache-fix.version", version)
124124
useJUnitPlatform()
125-
retry {
125+
develocity.testRetry {
126126
maxRetries = if (isCI) 1 else 0
127127
maxFailures = 20
128128
}
129129

130-
predictiveSelection {
130+
develocity.predictiveTestSelection {
131131
enabled = providers.gradleProperty("isPTSEnabled").map { it != "false" }.orElse(true)
132132
}
133133
}
134134

135135
tasks.test {
136-
predictiveSelection {
136+
develocity.predictiveTestSelection {
137137
profile = STANDARD
138138
}
139139
}
@@ -157,7 +157,7 @@ getSupportedVersions().keys.forEach { androidVersion ->
157157
}
158158
}
159159

160-
predictiveSelection {
160+
develocity.predictiveTestSelection {
161161
profile = FAST
162162
}
163163
}

settings.gradle.kts

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
1-
import com.gradle.enterprise.gradleplugin.internal.extension.BuildScanExtensionWithHiddenFeatures
2-
31
plugins {
4-
id("com.gradle.enterprise") version "3.16.2"
2+
id("com.gradle.enterprise") version "3.17"
53
id("com.gradle.common-custom-user-data-gradle-plugin") version "1.13"
64
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
75
}
86

97
val isCI = providers.environmentVariable("CI").isPresent
108

11-
gradleEnterprise {
9+
develocity {
1210
server = "https://ge.solutions-team.gradle.com"
1311
buildScan {
14-
capture { isTaskInputFiles = true }
15-
isUploadInBackground = !isCI
16-
publishAlways()
17-
this as BuildScanExtensionWithHiddenFeatures
18-
publishIfAuthenticated()
12+
uploadInBackground = !isCI
13+
publishing.onlyIf { it.isAuthenticated }
1914
obfuscation {
2015
ipAddresses { addresses -> addresses.map { "0.0.0.0" } }
2116
}
@@ -27,7 +22,7 @@ buildCache {
2722
isEnabled = true
2823
}
2924

30-
remote(gradleEnterprise.buildCache) {
25+
remote(develocity.buildCache) {
3126
isEnabled = true
3227
val accessKey = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY")
3328
isPush = isCI && !accessKey.isNullOrEmpty()

0 commit comments

Comments
 (0)