Skip to content

Commit

Permalink
Add documentation for gradle-wrapper.properties binding
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonydahanne committed Jul 17, 2023
1 parent 790bbec commit 8f1b94d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
18 changes: 13 additions & 5 deletions java/gradle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions java/gradle/bindings/gradle-wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
networkTimeout=60000
1 change: 1 addition & 0 deletions java/gradle/bindings/gradle-wrapper/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gradle-wrapper
4 changes: 2 additions & 2 deletions java/gradle/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8f1b94d

Please sign in to comment.