From 42488153cbe0f1f121e0a8799272185024175a9e Mon Sep 17 00:00:00 2001 From: ooknight Date: Tue, 15 Nov 2022 18:00:06 +0800 Subject: [PATCH] gradle: Set GRADLE_USER_HOME and persist .gradle (#4103) Set the environment variable GRADLE_USER_HOME to the .gradle directory and persist this directory as per https://docs.gradle.org/current/userguide/build_environment.html --- bucket/gradle-bin.json | 4 ++++ bucket/gradle.json | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bucket/gradle-bin.json b/bucket/gradle-bin.json index 116af92244..b6698ea8bb 100644 --- a/bucket/gradle-bin.json +++ b/bucket/gradle-bin.json @@ -9,6 +9,10 @@ "url": "https://services.gradle.org/distributions/gradle-7.5.1-bin.zip", "hash": "f6b8596b10cce501591e92f229816aa4046424f3b24d771751b06779d58c8ec4", "extract_dir": "gradle-7.5.1", + "env_set": { + "GRADLE_USER_HOME": "$dir\\.gradle" + }, + "persist": ".gradle", "bin": "bin\\gradle.bat", "checkver": { "url": "https://gradle.org/install/", diff --git a/bucket/gradle.json b/bucket/gradle.json index 66b5053a63..3e013bd6c1 100644 --- a/bucket/gradle.json +++ b/bucket/gradle.json @@ -1,6 +1,6 @@ { "version": "7.5.1", - "description": "An open-source build automation tool focused on flexibility and performance. (Source code and documentation boundled)", + "description": "An open-source build automation tool focused on flexibility and performance. (Source code and documentation bundled)", "homepage": "https://gradle.org", "license": "Apache-2.0", "suggest": { @@ -9,6 +9,10 @@ "url": "https://services.gradle.org/distributions/gradle-7.5.1-all.zip", "hash": "db9c8211ed63f61f60292c69e80d89196f9eb36665e369e7f00ac4cc841c2219", "extract_dir": "gradle-7.5.1", + "env_set": { + "GRADLE_USER_HOME": "$dir\\.gradle" + }, + "persist": ".gradle", "bin": "bin\\gradle.bat", "checkver": { "url": "https://gradle.org/install/",