From 3232e04f3cd29a4e9b373bb06a2ab2878d52eb2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Merlin=20B=C3=B6gershausen?= Date: Thu, 30 Jan 2025 13:42:42 +0100 Subject: [PATCH] update gradle build --- build.gradle.kts | 7 ------- settings.gradle.kts | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 5776d77..5f92a01 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -22,10 +22,3 @@ dependencies { testImplementation("org.junit.jupiter:junit-jupiter-engine:latest.release") testImplementation("org.junit-pioneer:junit-pioneer:2.3.0") } - -nexusPublishing { - repositories.getByName("sonatype") { - nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) - snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) - } -} diff --git a/settings.gradle.kts b/settings.gradle.kts index 868cc10..903dc47 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1 +1,41 @@ rootProject.name = "rewrite-rewrite" + +pluginManagement { + repositories { + mavenLocal() + gradlePluginPortal() + } +} + +plugins { + id("com.gradle.develocity") version "latest.release" + id("com.gradle.common-custom-user-data-gradle-plugin") version "latest.release" +} + +develocity { + server = "https://ge.openrewrite.org/" + + val isCiServer = System.getenv("CI")?.equals("true") ?: false + val accessKey = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY") + val authenticated = !accessKey.isNullOrBlank() + buildCache { + remote(develocity.buildCache) { + isEnabled = true + isPush = isCiServer && authenticated + } + } + + buildScan { + capture { + fileFingerprints = true + } + + publishing { + onlyIf { + authenticated + } + } + + uploadInBackground = !isCiServer + } +}