Skip to content

Commit

Permalink
Avoid invoking com.gradle.enterprise backwards compat code when using…
Browse files Browse the repository at this point in the history
… develocity (#42)
  • Loading branch information
mcumings authored Oct 4, 2024
1 parent c6d86e2 commit c06554a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ internal class MetricsForDevelocityPlugin @Inject constructor(
// Auto-configure the Gradle Enterprise access if the plugin is applied and has been
// directly configured with a server URL and/or access key.
settings.plugins.withId("com.gradle.enterprise") {
// The Develocity plugin is also registered under this ID so we need to avoid running
// this logic when this is the case.
if (settings.plugins.hasPlugin("com.gradle.develocity")) {
return@withId
}

@Suppress("DEPRECATION") // GradleEnterpriseExtension is deprecated
val gradleExt = settings.extensions.getByType(com.gradle.enterprise.gradleplugin.GradleEnterpriseExtension::class.java)
settings.gradle.afterProject { project ->
Expand Down

0 comments on commit c06554a

Please sign in to comment.