Commit d812503f authored by Nick Gaskill's avatar Nick Gaskill

Merge branch 'doc-clarify-gradle-home-dir' into 'master'

Doc: Replace explicit ~/.gradle/ mentions with configurable GRADLE_USER_HOME

See merge request gitlab-org/gitlab!83092
parents 4655b0ab 6088d5b0
...@@ -283,7 +283,8 @@ To authenticate to the Package Registry, you need either a personal access token ...@@ -283,7 +283,8 @@ To authenticate to the Package Registry, you need either a personal access token
### Authenticate with a personal access token in Gradle ### Authenticate with a personal access token in Gradle
Create a file `~/.gradle/gradle.properties` with the following content: In [your `GRADLE_USER_HOME` directory](https://docs.gradle.org/current/userguide/directory_layout.html#dir:gradle_user_home),
create a file `gradle.properties` with the following content:
```groovy ```groovy
gitLabPrivateToken=REPLACE_WITH_YOUR_PERSONAL_ACCESS_TOKEN gitLabPrivateToken=REPLACE_WITH_YOUR_PERSONAL_ACCESS_TOKEN
...@@ -586,7 +587,7 @@ To publish a package by using Gradle: ...@@ -586,7 +587,7 @@ To publish a package by using Gradle:
url "https://gitlab.example.com/api/v4/projects/<PROJECT_ID>/packages/maven" url "https://gitlab.example.com/api/v4/projects/<PROJECT_ID>/packages/maven"
credentials(HttpHeaderCredentials) { credentials(HttpHeaderCredentials) {
name = "Private-Token" name = "Private-Token"
value = gitLabPrivateToken // the variable resides in ~/.gradle/gradle.properties value = gitLabPrivateToken // the variable resides in $GRADLE_USER_HOME/gradle.properties
} }
authentication { authentication {
header(HttpHeaderAuthentication) header(HttpHeaderAuthentication)
...@@ -820,7 +821,7 @@ rm -rf ~/.m2/repository ...@@ -820,7 +821,7 @@ rm -rf ~/.m2/repository
If you're using Gradle, run this command to clear the cache: If you're using Gradle, run this command to clear the cache:
```shell ```shell
rm -rf ~/.gradle/caches rm -rf ~/.gradle/caches # Or replace ~/.gradle with your custom GRADLE_USER_HOME
``` ```
### Review network trace logs ### Review network trace logs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment