diff --git a/java/gradle/README.md b/java/gradle/README.md index a67bb7ce..56aaf733 100644 --- a/java/gradle/README.md +++ b/java/gradle/README.md @@ -5,22 +5,30 @@ See [prerequisites](https://paketo.io/docs/howto/java/#prerequisites) of this sa ## Building ```bash -pack build applications/gradle --env BP_JVM_VERSION=17 +pack build applications/gradle ``` -Alternatively, if you want to attach a `gradle.properties` file to pass additional configuration to Gradle. +Alternatively, if you want to attach a `gradle.properties` and/or a `gradle-wrapper.properties` file to pass additional configuration to Gradle (Wrapper). ```bash -pack build applications/gradle --volume $(pwd)/bindings:/platform/bindings --env BP_JVM_VERSION=17 +pack build applications/gradle --volume $(pwd)/bindings:/platform/bindings ``` -The command above will use the sample `gradle.properties` file from this repo. It may be more useful to copy your local `gradle.properties` file first. +The command above will use: + +* the sample `gradle.properties` file from this repo. It may be more useful to copy your local `gradle.properties` file first. ```bash cp ~/.gradle/gradle.properties java/gradle/bindings/gradle/gradle.properties -pack build applications/gradle --volume $(pwd)/bindings:/platform/bindings --env BP_JVM_VERSION=17 +pack build applications/gradle --volume $(pwd)/bindings:/platform/bindings ``` +* the sample `gradle-wrapper.properties` file from this repo. It may be more useful to copy your local `gradle-wrapper.properties` file first. + +```bash +cp ~/gradle/wrapper/gradle-wrapper.properties java/gradle/bindings/gradle-wrapper/gradle-wrapper.properties +pack build applications/gradle --volume $(pwd)/bindings:/platform/bindings + ## Running ```bash diff --git a/java/gradle/bindings/gradle-wrapper/gradle-wrapper.properties b/java/gradle/bindings/gradle-wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..c7f216f6 --- /dev/null +++ b/java/gradle/bindings/gradle-wrapper/gradle-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +networkTimeout=60000 \ No newline at end of file diff --git a/java/gradle/bindings/gradle-wrapper/type b/java/gradle/bindings/gradle-wrapper/type new file mode 100644 index 00000000..f9033942 --- /dev/null +++ b/java/gradle/bindings/gradle-wrapper/type @@ -0,0 +1 @@ +gradle-wrapper \ No newline at end of file diff --git a/java/gradle/gradle/wrapper/gradle-wrapper.properties b/java/gradle/gradle/wrapper/gradle-wrapper.properties index f398c33c..7c825554 100644 --- a/java/gradle/gradle/wrapper/gradle-wrapper.properties +++ b/java/gradle/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip -networkTimeout=10000 +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip +networkTimeout=1 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists