Skip to content

Commit

Permalink
[docker] upgrade gradle (no jdk16 support yet)
Browse files Browse the repository at this point in the history
  • Loading branch information
rspilker committed Apr 1, 2021
1 parent baabbd2 commit 72d9bfc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docker/gradle/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04 as downloader
FROM ubuntu:20.04 as downloader

ARG jdk=16
ADD provision/jdk/java-${jdk}.sh provision/jdk/java-${jdk}.sh
Expand All @@ -7,11 +7,11 @@ RUN provision/jdk/java-${jdk}.sh
ARG lombokjar=lombok.jar
ADD https://projectlombok.org/downloads/${lombokjar} /lombok.jar

ARG gradle=6.2.2
ARG gradle=6.8.3
ADD provision/gradle/gradle-${gradle}.sh provision/gradle/gradle-${gradle}.sh
RUN provision/gradle/gradle-${gradle}.sh

FROM ubuntu:18.04
FROM ubuntu:20.04

COPY --from=downloader /opt/gradle/ /opt/gradle/
COPY --from=downloader /opt/jdk/ /opt/jdk/
Expand Down
13 changes: 7 additions & 6 deletions docker/gradle/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

The gradle version to be used. Supported values:

- `6.2.2` (default)
- `6.8.3` (default)
- `6.2.2`
- `6.0.1`
- `5.6`
- `5.1.1`
Expand All @@ -19,21 +20,21 @@ The gradle version to be used. Supported values:
(To be executed from the `<lombokhome>/docker` directory)

```
docker build -t lombok-gradle-jdk13 -f gradle/Dockerfile .
docker build -t lombok-gradle-jdk16 -f gradle/Dockerfile .
docker build -t lombok-gradle-jdk13 --build-arg lombokjar=lombok-1.16.20.jar -f gradle/Dockerfile .
docker build -t lombok-gradle-jdk16 --build-arg lombokjar=lombok-1.18.20.jar -f gradle/Dockerfile .
```

## Example run commands:

```
docker run -it lombok-gradle-jdk13
docker run -it lombok-gradle-jdk16
docker run --rm -it -v /<lombokhome>/dist/lombok.jar:/workspace/classpath/lombok.jar lombok-gradle-jdk13
docker run --rm -it -v /<lombokhome>/dist/lombok.jar:/workspace/classpath/lombok.jar lombok-gradle-jdk16
```

## Example container commands:

```
gradle assemble
```cd ...
```
4 changes: 4 additions & 0 deletions docker/provision/gradle/gradle-6.8.3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apt-get update && apt-get install -y wget unzip
wget https://services.gradle.org/distributions/gradle-6.8.3-bin.zip -O gradle.zip
mkdir /opt/gradle && unzip -d /opt/gradle gradle.zip
mv /opt/gradle/gradle-6.8.3 /opt/gradle/gradle

0 comments on commit 72d9bfc

Please sign in to comment.