Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump gradle wrapper version to 8.2.1 #1341

Merged
merged 2 commits into from
Aug 3, 2023
Merged

Bump gradle wrapper version to 8.2.1 #1341

merged 2 commits into from
Aug 3, 2023

Conversation

dehall
Copy link
Contributor

@dehall dehall commented Jul 25, 2023

Bump the gradle wrapper version to 8.2.1 (latest as of July 10, 2023 - https://gradle.org/releases/)

This will enable support up through JDK 20 yet. (Note JDK 21 LTS is also right around the corner.) (An earlier version of this said JDK 20 was not yet supported, that was a mistake I'm not sure why I thought that)
Gradle/JDK compatibility is described here: https://docs.gradle.org/current/userguide/compatibility.html
Also see the JDK support matrix at https://endoflife.date/java

The changes to build.gradle are required to get past some errors, I guess they changed the gradle DSL:

* What went wrong:
A problem occurred evaluating root project 'synthea'.
> Could not find method classifier() for arguments [sources] on task ':sourceJar' of type org.gradle.api.tasks.bundling.Jar.

I tested this with Docker, across JDKs 11, 16, 17, 18, 19, and 20. For posterity:

Dockerfile:

ARG JAVAVERSION=20
FROM alpine:3.18.2 as downloader
# used only for zip/unzip

# --insecure is for mitre only
# -L means follow redirects
RUN apk add --no-cache --allow-untrusted --repository http://dl-cdn.alpinelinux.org/alpine/v3.15/main zip unzip curl && curl --insecure -L -O https://github.com/synthetichealth/synthea/archive/refs/heads/bump_gradle.zip && unzip bump_gradle.zip

FROM eclipse-temurin:${JAVAVERSION}-jdk

# RUN curl -ksSL https://gitlab.mitre.org/mitre-scripts/mitre-pki/raw/master/os_scripts/install_certs.sh | MODE=ubuntu sh

COPY --from=downloader /synthea-bump_gradle/ /synthea-bump_gradle/

WORKDIR "/synthea-bump_gradle"

RUN ./gradlew compileJava

CMD java -version && ./gradlew test concepts uberJar javadoc graphviz run --console=plain

Script to build and run it for the various java versions:

#!/bin/bash

# build images separately from running them
# see https://hub.docker.com/_/eclipse-temurin/tags -- there are no images for 12 thru 15
for VERSION in 20 19 18 17 16 11
do
  docker build --build-arg "JAVAVERSION=$VERSION" --tag syntheagradle:$VERSION - < Dockerfile.1
done

# echo Done Building.

for VERSION in 20 19 18 17 16 11
do
  docker run -it syntheagradle:$VERSION | tee gradledockertest_${VERSION}.txt
done

@sonatype-lift
Copy link
Contributor

sonatype-lift bot commented Jul 25, 2023

Sonatype Lift is retiring

Sonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console.
We are extremely grateful and thank you for your support over the years.

📖 Read about the impacts and timeline

@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Merging #1341 (c884f24) into master (9f7c6cc) will decrease coverage by 1%.
Report is 3 commits behind head on master.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master   #1341    +/-   ##
=========================================
- Coverage        77%     77%    -1%     
+ Complexity     3728    3706    -22     
=========================================
  Files           170     170            
  Lines         23981   23981            
  Branches       3325    3325            
=========================================
- Hits          18654   18545   -109     
- Misses         4314    4415   +101     
- Partials       1013    1021     +8     

see 18 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@dehall dehall changed the title WIP: Bump gradle wrapper version to 8.2.1 Bump gradle wrapper version to 8.2.1 Aug 3, 2023
@dehall dehall marked this pull request as ready for review August 3, 2023 18:56
@dehall dehall merged commit a0a3b68 into master Aug 3, 2023
6 checks passed
@dehall dehall deleted the bump_gradle branch August 8, 2023 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant