From e7969036b745c1b6a2246ff5892e3e0cd5842d47 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 6 Jul 2026 15:44:18 +0800 Subject: [PATCH 1/6] Use providers.gradleProperty for GitHub Packages Gradle credential examples --- .../working-with-the-gradle-registry.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md b/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md index ee01401ae263..8712f278729c 100644 --- a/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md +++ b/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md @@ -60,8 +60,8 @@ publishing { name = "GitHubPackages" url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") credentials { - username = project.findProperty("gpr.user") ?: System.getenv("USERNAME") - password = project.findProperty("gpr.key") ?: System.getenv("TOKEN") + username = providers.gradleProperty("gpr.user").orNull ?: System.getenv("USERNAME") + password = providers.gradleProperty("gpr.key").orNull ?: System.getenv("TOKEN") } } } @@ -87,8 +87,8 @@ subprojects { name = "GitHubPackages" url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") credentials { - username = project.findProperty("gpr.user") ?: System.getenv("USERNAME") - password = project.findProperty("gpr.key") ?: System.getenv("TOKEN") + username = providers.gradleProperty("gpr.user").orNull ?: System.getenv("USERNAME") + password = providers.gradleProperty("gpr.key").orNull ?: System.getenv("TOKEN") } } } @@ -113,8 +113,8 @@ publishing { name = "GitHubPackages" url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") credentials { - username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME") - password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN") + username = providers.gradleProperty("gpr.user").orNull ?: System.getenv("USERNAME") + password = providers.gradleProperty("gpr.key").orNull ?: System.getenv("TOKEN") } } } @@ -140,8 +140,8 @@ subprojects { name = "GitHubPackages" url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") credentials { - username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME") - password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN") + username = providers.gradleProperty("gpr.user").orNull ?: System.getenv("USERNAME") + password = providers.gradleProperty("gpr.key").orNull ?: System.getenv("TOKEN") } } } @@ -199,8 +199,8 @@ To use a published package from {% data variables.product.prodname_registry %}, maven { url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") credentials { - username = project.findProperty("gpr.user") ?: System.getenv("USERNAME") - password = project.findProperty("gpr.key") ?: System.getenv("TOKEN") + username = providers.gradleProperty("gpr.user").orNull ?: System.getenv("USERNAME") + password = providers.gradleProperty("gpr.key").orNull ?: System.getenv("TOKEN") } } } @@ -213,8 +213,8 @@ To use a published package from {% data variables.product.prodname_registry %}, maven { url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") credentials { - username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME") - password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN") + username = providers.gradleProperty("gpr.user").orNull ?: System.getenv("USERNAME") + password = providers.gradleProperty("gpr.key").orNull ?: System.getenv("TOKEN") } } } From fd1cdbec7deafe6bb2d8ca1f78ccb7424fd33652 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 10 Jul 2026 16:32:05 +0800 Subject: [PATCH 2/6] Use getOrNull() for Gradle property credential lookups Prefer Provider.getOrNull() over the .orNull property accessor so examples match the Provider API method name explicitly. --- .../working-with-the-gradle-registry.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md b/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md index 8712f278729c..de3dd748b23d 100644 --- a/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md +++ b/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md @@ -60,8 +60,8 @@ publishing { name = "GitHubPackages" url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") credentials { - username = providers.gradleProperty("gpr.user").orNull ?: System.getenv("USERNAME") - password = providers.gradleProperty("gpr.key").orNull ?: System.getenv("TOKEN") + username = providers.gradleProperty("gpr.user").getOrNull() ?: System.getenv("USERNAME") + password = providers.gradleProperty("gpr.key").getOrNull() ?: System.getenv("TOKEN") } } } @@ -87,8 +87,8 @@ subprojects { name = "GitHubPackages" url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") credentials { - username = providers.gradleProperty("gpr.user").orNull ?: System.getenv("USERNAME") - password = providers.gradleProperty("gpr.key").orNull ?: System.getenv("TOKEN") + username = providers.gradleProperty("gpr.user").getOrNull() ?: System.getenv("USERNAME") + password = providers.gradleProperty("gpr.key").getOrNull() ?: System.getenv("TOKEN") } } } @@ -113,8 +113,8 @@ publishing { name = "GitHubPackages" url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") credentials { - username = providers.gradleProperty("gpr.user").orNull ?: System.getenv("USERNAME") - password = providers.gradleProperty("gpr.key").orNull ?: System.getenv("TOKEN") + username = providers.gradleProperty("gpr.user").getOrNull() ?: System.getenv("USERNAME") + password = providers.gradleProperty("gpr.key").getOrNull() ?: System.getenv("TOKEN") } } } @@ -140,8 +140,8 @@ subprojects { name = "GitHubPackages" url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") credentials { - username = providers.gradleProperty("gpr.user").orNull ?: System.getenv("USERNAME") - password = providers.gradleProperty("gpr.key").orNull ?: System.getenv("TOKEN") + username = providers.gradleProperty("gpr.user").getOrNull() ?: System.getenv("USERNAME") + password = providers.gradleProperty("gpr.key").getOrNull() ?: System.getenv("TOKEN") } } } @@ -199,8 +199,8 @@ To use a published package from {% data variables.product.prodname_registry %}, maven { url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") credentials { - username = providers.gradleProperty("gpr.user").orNull ?: System.getenv("USERNAME") - password = providers.gradleProperty("gpr.key").orNull ?: System.getenv("TOKEN") + username = providers.gradleProperty("gpr.user").getOrNull() ?: System.getenv("USERNAME") + password = providers.gradleProperty("gpr.key").getOrNull() ?: System.getenv("TOKEN") } } } @@ -213,8 +213,8 @@ To use a published package from {% data variables.product.prodname_registry %}, maven { url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") credentials { - username = providers.gradleProperty("gpr.user").orNull ?: System.getenv("USERNAME") - password = providers.gradleProperty("gpr.key").orNull ?: System.getenv("TOKEN") + username = providers.gradleProperty("gpr.user").getOrNull() ?: System.getenv("USERNAME") + password = providers.gradleProperty("gpr.key").getOrNull() ?: System.getenv("TOKEN") } } } From 662df8d32a75ab285ef73352f92f04218dfffc89 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 20 Jul 2026 14:19:49 +0800 Subject: [PATCH 3/6] Document dependencyResolutionManagement for Gradle package consumers Declare GitHub Packages dependency repositories in settings scripts with dependencyResolutionManagement, and clarify that publishing credentials stay in the build script while consuming uses settings. --- .../working-with-the-gradle-registry.md | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md b/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md index de3dd748b23d..6d941db0a866 100644 --- a/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md +++ b/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md @@ -37,7 +37,7 @@ category: {% data reusables.package_registry.required-scopes %} -You can authenticate to {% data variables.product.prodname_registry %} with Gradle using either Gradle Groovy or Kotlin DSL by editing your _build.gradle_ file (Gradle Groovy) or _build.gradle.kts_ file (Kotlin DSL) file to include your {% data variables.product.pat_v1 %}. You can also configure Gradle Groovy and Kotlin DSL to recognize a single package or multiple packages in a repository. +You can authenticate to {% data variables.product.prodname_registry %} with Gradle using either Gradle Groovy or Kotlin DSL. To publish packages, edit your _build.gradle_ file (Gradle Groovy) or _build.gradle.kts_ file (Kotlin DSL) to include your {% data variables.product.pat_v1 %}. To use packages as dependencies, declare the repository and credentials in your _settings.gradle_ file (Gradle Groovy) or _settings.gradle.kts_ file (Kotlin DSL). You can also configure Gradle Groovy and Kotlin DSL to recognize a single package or multiple packages in a repository. {% ifversion ghes %} Replace REGISTRY_URL with the URL for your instance's Maven registry. If your instance has subdomain isolation enabled, use `maven.HOSTNAME`. If your instance has subdomain isolation disabled, use `HOSTNAME/_registry/maven`. In either case, replace HOSTNAME with the host name of your {% data variables.product.prodname_ghe_server %} instance. @@ -169,7 +169,7 @@ subprojects { ## Using a published package -To use a published package from {% data variables.product.prodname_registry %}, add the package as a dependency and add the repository to your project. For more information, see [Declaring dependencies](https://docs.gradle.org/current/userguide/declaring_dependencies.html) in the Gradle documentation. +To use a published package from {% data variables.product.prodname_registry %}, add the package as a dependency and declare the repository in your project. Gradle recommends declaring repositories in your settings script with `dependencyResolutionManagement`. For more information, see [Declaring dependencies](https://docs.gradle.org/current/userguide/declaring_dependencies.html) and [Centralizing repository declarations](https://docs.gradle.org/current/userguide/centralizing_repositories.html) in the Gradle documentation. {% data reusables.package_registry.authenticate-step %} 1. Add the package dependencies to your _build.gradle_ file (Gradle Groovy) or _build.gradle.kts_ file (Kotlin DSL) file. @@ -190,31 +190,35 @@ To use a published package from {% data variables.product.prodname_registry %}, } ``` -1. Add the repository to your _build.gradle_ file (Gradle Groovy) or _build.gradle.kts_ file (Kotlin DSL) file. +1. Add the repository to your _settings.gradle_ file (Gradle Groovy) or _settings.gradle.kts_ file (Kotlin DSL) using a `dependencyResolutionManagement` block. Example using Gradle Groovy: ```shell - repositories { - maven { - url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") - credentials { - username = providers.gradleProperty("gpr.user").getOrNull() ?: System.getenv("USERNAME") - password = providers.gradleProperty("gpr.key").getOrNull() ?: System.getenv("TOKEN") + dependencyResolutionManagement { + repositories { + maven { + url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") + credentials { + username = providers.gradleProperty("gpr.user").getOrNull() ?: System.getenv("USERNAME") + password = providers.gradleProperty("gpr.key").getOrNull() ?: System.getenv("TOKEN") + } } - } + } } ``` Example using Kotlin DSL: ```shell - repositories { - maven { - url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") - credentials { - username = providers.gradleProperty("gpr.user").getOrNull() ?: System.getenv("USERNAME") - password = providers.gradleProperty("gpr.key").getOrNull() ?: System.getenv("TOKEN") + dependencyResolutionManagement { + repositories { + maven { + url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") + credentials { + username = providers.gradleProperty("gpr.user").getOrNull() ?: System.getenv("USERNAME") + password = providers.gradleProperty("gpr.key").getOrNull() ?: System.getenv("TOKEN") + } } } } From 211eb701e420914d017d79dc2729616b4b604e8e Mon Sep 17 00:00:00 2001 From: Yongshun Ye Date: Wed, 22 Jul 2026 12:15:16 +0800 Subject: [PATCH 4/6] Revert some changes on this branch from `main` to provide configuration for both traditional build scripts and Centralizing Repository Declarations, instead of favoring the latter --- .../working-with-the-gradle-registry.md | 36 +++++++++---------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md b/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md index 6d941db0a866..d7d5b9717dec 100644 --- a/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md +++ b/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md @@ -37,7 +37,7 @@ category: {% data reusables.package_registry.required-scopes %} -You can authenticate to {% data variables.product.prodname_registry %} with Gradle using either Gradle Groovy or Kotlin DSL. To publish packages, edit your _build.gradle_ file (Gradle Groovy) or _build.gradle.kts_ file (Kotlin DSL) to include your {% data variables.product.pat_v1 %}. To use packages as dependencies, declare the repository and credentials in your _settings.gradle_ file (Gradle Groovy) or _settings.gradle.kts_ file (Kotlin DSL). You can also configure Gradle Groovy and Kotlin DSL to recognize a single package or multiple packages in a repository. +You can authenticate to {% data variables.product.prodname_registry %} with Gradle using either Gradle Groovy or Kotlin DSL by editing your _build.gradle_ file (Gradle Groovy) or _build.gradle.kts_ file (Kotlin DSL) file (or _settings.gradle_/_settings.gradle.kts_ if you use [Centralizing Repository Declarations](https://docs.gradle.org/current/userguide/centralizing_repositories.html)) to include your {% data variables.product.pat_v1 %}. You can also configure Gradle Groovy and Kotlin DSL to recognize a single package or multiple packages in a repository. {% ifversion ghes %} Replace REGISTRY_URL with the URL for your instance's Maven registry. If your instance has subdomain isolation enabled, use `maven.HOSTNAME`. If your instance has subdomain isolation disabled, use `HOSTNAME/_registry/maven`. In either case, replace HOSTNAME with the host name of your {% data variables.product.prodname_ghe_server %} instance. @@ -169,10 +169,10 @@ subprojects { ## Using a published package -To use a published package from {% data variables.product.prodname_registry %}, add the package as a dependency and declare the repository in your project. Gradle recommends declaring repositories in your settings script with `dependencyResolutionManagement`. For more information, see [Declaring dependencies](https://docs.gradle.org/current/userguide/declaring_dependencies.html) and [Centralizing repository declarations](https://docs.gradle.org/current/userguide/centralizing_repositories.html) in the Gradle documentation. +To use a published package from {% data variables.product.prodname_registry %}, add the package as a dependency and add the repository to your project. For more information, see [Declaring dependencies](https://docs.gradle.org/current/userguide/declaring_dependencies.html) and [Centralizing Repository Declarations](https://docs.gradle.org/current/userguide/centralizing_repositories.html) in the Gradle documentation. {% data reusables.package_registry.authenticate-step %} -1. Add the package dependencies to your _build.gradle_ file (Gradle Groovy) or _build.gradle.kts_ file (Kotlin DSL) file. +1. Add the package dependencies to your _build.gradle_ file (Gradle Groovy) or _build.gradle.kts_ file (Kotlin DSL). Example using Gradle Groovy: @@ -190,19 +190,17 @@ To use a published package from {% data variables.product.prodname_registry %}, } ``` -1. Add the repository to your _settings.gradle_ file (Gradle Groovy) or _settings.gradle.kts_ file (Kotlin DSL) using a `dependencyResolutionManagement` block. +1. Add the repository to your _build.gradle_ file (Gradle Groovy) or _build.gradle.kts_ file (Kotlin DSL) file, or to your _settings.gradle_ file (Gradle Groovy) or _settings.gradle.kts_ file (Kotlin DSL) in the `dependencyResolutionManagement` block if you [Centralizing Repository Declarations](https://docs.gradle.org/current/userguide/centralizing_repositories.html). Example using Gradle Groovy: ```shell - dependencyResolutionManagement { - repositories { - maven { - url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") - credentials { - username = providers.gradleProperty("gpr.user").getOrNull() ?: System.getenv("USERNAME") - password = providers.gradleProperty("gpr.key").getOrNull() ?: System.getenv("TOKEN") - } + repositories { + maven { + url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") + credentials { + username = providers.gradleProperty("gpr.user").getOrNull() ?: System.getenv("USERNAME") + password = providers.gradleProperty("gpr.key").getOrNull() ?: System.getenv("TOKEN") } } } @@ -211,14 +209,12 @@ To use a published package from {% data variables.product.prodname_registry %}, Example using Kotlin DSL: ```shell - dependencyResolutionManagement { - repositories { - maven { - url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") - credentials { - username = providers.gradleProperty("gpr.user").getOrNull() ?: System.getenv("USERNAME") - password = providers.gradleProperty("gpr.key").getOrNull() ?: System.getenv("TOKEN") - } + repositories { + maven { + url = uri("https://{% ifversion fpt or ghec %}maven.pkg.github.com{% else %}REGISTRY_URL{% endif %}/OWNER/REPOSITORY") + credentials { + username = providers.gradleProperty("gpr.user").getOrNull() ?: System.getenv("USERNAME") + password = providers.gradleProperty("gpr.key").getOrNull() ?: System.getenv("TOKEN") } } } From d44adbdcfc97364bd897e571b10ee747645bf6a3 Mon Sep 17 00:00:00 2001 From: Yongshun Ye Date: Wed, 22 Jul 2026 12:26:00 +0800 Subject: [PATCH 5/6] Add a missing word --- .../working-with-the-gradle-registry.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md b/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md index d7d5b9717dec..42abd2b2ef8a 100644 --- a/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md +++ b/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md @@ -190,7 +190,7 @@ To use a published package from {% data variables.product.prodname_registry %}, } ``` -1. Add the repository to your _build.gradle_ file (Gradle Groovy) or _build.gradle.kts_ file (Kotlin DSL) file, or to your _settings.gradle_ file (Gradle Groovy) or _settings.gradle.kts_ file (Kotlin DSL) in the `dependencyResolutionManagement` block if you [Centralizing Repository Declarations](https://docs.gradle.org/current/userguide/centralizing_repositories.html). +1. Add the repository to your _build.gradle_ file (Gradle Groovy) or _build.gradle.kts_ file (Kotlin DSL) file, or to your _settings.gradle_ file (Gradle Groovy) or _settings.gradle.kts_ file (Kotlin DSL) in the `dependencyResolutionManagement` block if you use [Centralizing Repository Declarations](https://docs.gradle.org/current/userguide/centralizing_repositories.html). Example using Gradle Groovy: From a62e0bc72a6e2f1413fecdac5a3e615982e352ea Mon Sep 17 00:00:00 2001 From: Yongshun Ye Date: Wed, 22 Jul 2026 12:43:10 +0800 Subject: [PATCH 6/6] Avoid repeating mid-sentence Gradle centralization links and fix one more repetitive "file" typo Based on an AI review against GitHub's documentation fundamentals (https://docs.github.com/en/contributing/writing-for-github-docs/about-githubs-documentation-fundamentals) and the linked style guide requirements for links. Co-authored-by: Cursor --- .../working-with-the-gradle-registry.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md b/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md index 42abd2b2ef8a..2e62fe9258e0 100644 --- a/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md +++ b/content/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry.md @@ -37,7 +37,7 @@ category: {% data reusables.package_registry.required-scopes %} -You can authenticate to {% data variables.product.prodname_registry %} with Gradle using either Gradle Groovy or Kotlin DSL by editing your _build.gradle_ file (Gradle Groovy) or _build.gradle.kts_ file (Kotlin DSL) file (or _settings.gradle_/_settings.gradle.kts_ if you use [Centralizing Repository Declarations](https://docs.gradle.org/current/userguide/centralizing_repositories.html)) to include your {% data variables.product.pat_v1 %}. You can also configure Gradle Groovy and Kotlin DSL to recognize a single package or multiple packages in a repository. +You can authenticate to {% data variables.product.prodname_registry %} with Gradle using either Gradle Groovy or Kotlin DSL by editing your _build.gradle_ file (Gradle Groovy) or _build.gradle.kts_ file (Kotlin DSL) (or _settings.gradle_/_settings.gradle.kts_ if you centralize repository declarations in the settings script to use published packages) to include your {% data variables.product.pat_v1 %}. You can also configure Gradle Groovy and Kotlin DSL to recognize a single package or multiple packages in a repository. {% ifversion ghes %} Replace REGISTRY_URL with the URL for your instance's Maven registry. If your instance has subdomain isolation enabled, use `maven.HOSTNAME`. If your instance has subdomain isolation disabled, use `HOSTNAME/_registry/maven`. In either case, replace HOSTNAME with the host name of your {% data variables.product.prodname_ghe_server %} instance. @@ -190,7 +190,7 @@ To use a published package from {% data variables.product.prodname_registry %}, } ``` -1. Add the repository to your _build.gradle_ file (Gradle Groovy) or _build.gradle.kts_ file (Kotlin DSL) file, or to your _settings.gradle_ file (Gradle Groovy) or _settings.gradle.kts_ file (Kotlin DSL) in the `dependencyResolutionManagement` block if you use [Centralizing Repository Declarations](https://docs.gradle.org/current/userguide/centralizing_repositories.html). +1. Add the repository to your _build.gradle_ file (Gradle Groovy) or _build.gradle.kts_ file (Kotlin DSL) file, or to your _settings.gradle_ file (Gradle Groovy) or _settings.gradle.kts_ file (Kotlin DSL) in the `dependencyResolutionManagement` block if you centralize repository declarations in the settings script. For more information, see [Centralizing Repository Declarations](https://docs.gradle.org/current/userguide/centralizing_repositories.html) in the Gradle documentation. Example using Gradle Groovy: