diff --git a/build.gradle b/build.gradle index 79c007f6..31676d7c 100644 --- a/build.gradle +++ b/build.gradle @@ -9,8 +9,6 @@ buildscript { // Note: Since Jackson 2.14, Android SDK 26 is required // https://github.com/FasterXML/jackson/wiki/Jackson-Releases jacksonVersion = '2.16.1' // https://github.com/FasterXML/jackson-databind/tags - // retrofit is why we need allow-opens. context: https://stackoverflow.com/questions/60915381/retrofit2-maven-project-illegal-reflective-access-warning // https://github.com/square/retrofit/issues/3341 - // Note that after Java 14, this isn't a problem, so I'm not inclined to keep having add-opens because of retrofit retrofitVersion = "2.9.0" // https://github.com/square/retrofit/tags shadowVersion = '8.1.1' // https://github.com/johnrengelman/shadow/releases ioLibVersion = '2.3.0' // https://github.com/retrodaredevil/io-lib/releases diff --git a/client/build.gradle b/client/build.gradle index c0ffb963..3121089e 100644 --- a/client/build.gradle +++ b/client/build.gradle @@ -3,8 +3,8 @@ plugins { id 'java' } -sourceCompatibility = JavaVersion.VERSION_11 -targetCompatibility = JavaVersion.VERSION_11 +sourceCompatibility = JavaVersion.VERSION_17 +targetCompatibility = JavaVersion.VERSION_17 version '0.0.1-SNAPSHOT' diff --git a/common/build.gradle b/common/build.gradle index eb552aa4..884d121e 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -2,8 +2,8 @@ plugins { id 'java' } -sourceCompatibility = JavaVersion.VERSION_11 -targetCompatibility = JavaVersion.VERSION_11 +sourceCompatibility = JavaVersion.VERSION_17 +targetCompatibility = JavaVersion.VERSION_17 version = '0.0.1-SNAPSHOT' diff --git a/docker/solarthing-server/Dockerfile b/docker/solarthing-server/Dockerfile index 63bd4302..82fa8747 100644 --- a/docker/solarthing-server/Dockerfile +++ b/docker/solarthing-server/Dockerfile @@ -1,10 +1,10 @@ -FROM eclipse-temurin:19-jre-jammy as builder +FROM ghcr.io/retrodaredevil/lavender-jre:21-ubuntu-jammy as builder ARG JAR_LOCATION COPY ${JAR_LOCATION} application.jar RUN java -Djarmode=layertools -jar application.jar extract -FROM eclipse-temurin:19-jre-jammy +FROM ghcr.io/retrodaredevil/lavender-jre:21-ubuntu-jammy RUN ["mkdir", "/solarthing"] WORKDIR "/solarthing" diff --git a/docker/solarthing/Dockerfile b/docker/solarthing/Dockerfile index ad12b93f..940f128b 100644 --- a/docker/solarthing/Dockerfile +++ b/docker/solarthing/Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:19-jre-jammy +FROM ghcr.io/retrodaredevil/lavender-jre:21-ubuntu-jammy ARG JAR_LOCATION ARG COMMIT_HASH="" ARG REF="" @@ -11,8 +11,4 @@ ENV REF="$REF" RUN ["mkdir", "/app"] WORKDIR "/app" -# Currently this entry point does not need any allow opens. -# The default raw_solarthing will run solarthing.jar with `--add-opens=java.base/java.lang.invoke=ALL-UNNAMED` -# Because Retrofit (https://stackoverflow.com/a/61259233/5434860) -# However, that bug/workaround only affects Java versions [9, 13], but we are running a higher Java version so we are unaffected. ENTRYPOINT ["java", "-XX:ErrorFile=/app/jvmlog/hs_err_pid%p.log", "-jar", "/solarthing/solarthing.jar"] diff --git a/process-annotations/build.gradle b/process-annotations/build.gradle index 0ced4633..f87af31c 100644 --- a/process-annotations/build.gradle +++ b/process-annotations/build.gradle @@ -2,8 +2,8 @@ plugins { id 'java' } -sourceCompatibility = JavaVersion.VERSION_11 -targetCompatibility = JavaVersion.VERSION_11 +sourceCompatibility = JavaVersion.VERSION_17 +targetCompatibility = JavaVersion.VERSION_17 version '0.0.1-SNAPSHOT' diff --git a/program/.bin/raw_solarthing b/program/.bin/raw_solarthing index 2bc0fa37..66663afc 100755 --- a/program/.bin/raw_solarthing +++ b/program/.bin/raw_solarthing @@ -2,10 +2,6 @@ BASEDIR=$(dirname "$0") -if java --add-opens 2>&1 | grep 'requires modules' >/dev/null; then - java --add-opens=java.base/java.lang.invoke=ALL-UNNAMED -jar "$BASEDIR/../solarthing.jar" "$@" -else - java -jar "$BASEDIR/../solarthing.jar" "$@" -fi +java -jar "$BASEDIR/../solarthing.jar" "$@" # It is important that we do not have any more commands after this because we want the exit code # to be the same as the exit code of the java command diff --git a/program/graphql/run.sh b/program/graphql/run.sh index 715aed5f..b3d044b8 100755 --- a/program/graphql/run.sh +++ b/program/graphql/run.sh @@ -9,8 +9,4 @@ cd "$BASEDIR" || exit 1 export SOLARTHING_ROOT="../.." source ../.scripts/use_sdkman_if_available.sh # requires bash -if java --add-opens 2>&1 | grep 'requires modules' >/dev/null; then - java --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED -jar ../solarthing-graphql.jar --spring.config.location=config/application.properties -else - java -jar ../solarthing-graphql.jar --spring.config.location=config/application.properties -fi +java -jar ../solarthing-graphql.jar --spring.config.location=config/application.properties diff --git a/server/build.gradle b/server/build.gradle index cb09fb99..e5b8f531 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -15,8 +15,8 @@ apply plugin: 'java' apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' -sourceCompatibility = JavaVersion.VERSION_17 -targetCompatibility = JavaVersion.VERSION_17 +sourceCompatibility = JavaVersion.VERSION_21 +targetCompatibility = JavaVersion.VERSION_21 version = '0.0.1-SNAPSHOT'