Skip to content

Commit

Permalink
Upgrade conventions plugin and switch to new authentication way (#28132)
Browse files Browse the repository at this point in the history
  • Loading branch information
blindpirate committed Feb 22, 2024
2 parents e646400 + 9beae1e commit 7348398
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 deletions.
4 changes: 1 addition & 3 deletions .teamcity/src/main/kotlin/common/extensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@ fun javaHome(jvm: Jvm, os: Os, arch: Arch = Arch.AMD64) = "%${os.name.lowercase(
fun BuildType.paramsForBuildToolBuild(buildJvm: Jvm = BuildToolBuildJvm, os: Os, arch: Arch = Arch.AMD64) {
params {
param("env.BOT_TEAMCITY_GITHUB_TOKEN", "%github.bot-teamcity.token%")
param("env.GRADLE_CACHE_REMOTE_PASSWORD", "%gradle.cache.remote.password%")
param("env.GRADLE_CACHE_REMOTE_URL", "%gradle.cache.remote.url%")
param("env.GRADLE_CACHE_REMOTE_USERNAME", "%gradle.cache.remote.username%")
param("env.GRADLE_CACHE_REMOTE_URL", "%gradle.cache.remote.server%")

param("env.JAVA_HOME", javaHome(buildJvm, os, arch))
param("env.GRADLE_OPTS", "-Xmx1536m")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ import gradlebuild.performance.generator.tasks.RemoteProject
import org.gradle.api.DefaultTask
import org.gradle.api.file.FileSystemOperations
import org.gradle.api.file.RegularFileProperty
import org.gradle.api.internal.GradleInternal
import org.gradle.api.provider.Property
import org.gradle.api.tasks.CacheableTask
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.Optional
import org.gradle.api.tasks.OutputFile
import org.gradle.api.tasks.TaskAction
import org.gradle.caching.http.HttpBuildCache
import org.gradle.internal.os.OperatingSystem
import org.gradle.process.ExecOperations
import org.gradle.util.GradleVersion
Expand Down Expand Up @@ -176,13 +174,6 @@ abstract class BuildCommitDistribution @Inject internal constructor(

if (project.gradle.startParameter.isBuildCacheEnabled) {
buildCommands.add("--build-cache")

val buildCacheConf = (project.gradle as GradleInternal).settings.buildCache
val remoteCache = buildCacheConf.remote as HttpBuildCache?
if (remoteCache?.url != null) {
buildCommands.add("-Dgradle.cache.remote.url=${remoteCache.url}")
buildCommands.add("-Dgradle.cache.remote.username=${remoteCache.credentials.username}")
}
}

return buildCommands.toTypedArray()
Expand Down
6 changes: 3 additions & 3 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -871,9 +871,9 @@
<pgp value="7186BBF993566D8C2F4F7ED7D945E643368FEF62"/>
</artifact>
</component>
<component group="io.github.gradle" name="gradle-enterprise-conventions-plugin" version="0.7.6">
<artifact name="gradle-enterprise-conventions-plugin-0.7.6.jar">
<sha256 value="b3ff4bba6c5ac6e50e7225c7d1f69c0a9bc2ae9f3ce2bfacdc3f1b3999c2e758" origin="Verified" reason="Artifact is not signed"/>
<component group="io.github.gradle" name="gradle-enterprise-conventions-plugin" version="0.8.0">
<artifact name="gradle-enterprise-conventions-plugin-0.8.0.jar">
<sha256 value="9fb7ce8df50492a462b34f4f009a115932780aaa80658eb6209569827f141042" origin="Verified" reason="Artifact is not signed"/>
</artifact>
</component>
<component group="io.github.java-diff-utils" name="java-diff-utils" version="4.12">
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pluginManagement {

plugins {
id("com.gradle.enterprise").version("3.16.2") // Sync with `build-logic-commons/build-platform/build.gradle.kts`
id("io.github.gradle.gradle-enterprise-conventions-plugin").version("0.7.6")
id("io.github.gradle.gradle-enterprise-conventions-plugin").version("0.8.0")
id("org.gradle.toolchains.foojay-resolver-convention") version ("0.8.0")
// id("net.ltgt.errorprone").version("3.1.0")
}
Expand Down

0 comments on commit 7348398

Please sign in to comment.