Skip to content

Commit

Permalink
Update Java version and dependencies across project
Browse files Browse the repository at this point in the history
Updated the Java version from 19 to 21 in Gradle, GitHub workflows, and SDKMAN config files. Multiple dependencies were updated in the build.gradle file and a method invocation was changed in MindergasnlService.java to match the new library version. The Gradle version was also updated. These changes were necessary to maintain compatibility with the latest Java features and remain up to date with the newest versions of dependencies.
  • Loading branch information
bassages committed Nov 26, 2023
1 parent 4941791 commit eb69383
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 19
java-version: 21

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 19
java-version: 21

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
Expand Down
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.5'
id 'io.spring.dependency-management' version '1.1.3'
id 'com.github.ben-manes.versions' version '0.49.0'
id 'org.springframework.boot' version '3.2.0'
id 'io.spring.dependency-management' version '1.1.4'
id 'com.github.ben-manes.versions' version '0.50.0'
id 'jacoco'
id "org.sonarqube" version '4.4.1.3373'
}

def homeFrontendVersion = '1.15.0'

jacoco {
toolVersion = '0.8.8'
toolVersion = '0.8.11'
}

jacocoTestReport {
Expand Down Expand Up @@ -45,7 +45,7 @@ repositories {

java {
toolchain{
languageVersion = JavaLanguageVersion.of(19)
languageVersion = JavaLanguageVersion.of(21)
}
}

Expand Down Expand Up @@ -90,14 +90,14 @@ dependencies {
implementation('org.ehcache:ehcache:3.10.8')
implementation('commons-io:commons-io:2.15.0')
implementation('org.apache.commons:commons-collections4:4.4')
implementation('org.apache.commons:commons-lang3:3.13.0')
implementation('org.apache.commons:commons-lang3:3.14.0')
implementation('org.apache.commons:commons-math3:3.6.1')
implementation('javax.inject:javax.inject:1')
implementation('com.google.code.findbugs:jsr305:3.0.2')

testImplementation('org.springframework.boot:spring-boot-starter-test')
testImplementation('org.springframework.security:spring-security-test')
testImplementation('nl.jqno.equalsverifier:equalsverifier:3.15.2')
testImplementation('nl.jqno.equalsverifier:equalsverifier:3.15.3')
testImplementation('org.awaitility:awaitility:4.2.0')
testImplementation('com.squareup.okhttp3:okhttp:4.12.0')
testImplementation('com.squareup.okhttp3:mockwebserver:4.12.0')
Expand Down
2 changes: 1 addition & 1 deletion 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-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-rc-3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
14 changes: 7 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -202,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void uploadMostRecentMeterstand(final MindergasnlSettings settings) {

private void upload(final MindergasnlSettings settings, final LocalDate day, final BigDecimal gasReading) {
final WebClient client = WebClient.builder().baseUrl(mindergasNlApiUrl).build();
final HttpServiceProxyFactory factory = HttpServiceProxyFactory.builder(WebClientAdapter.forClient(client)).build();
final HttpServiceProxyFactory factory = HttpServiceProxyFactory.builderFor(WebClientAdapter.create(client)).build();
final MinderGasnlApi api = factory.createClient(MinderGasnlApi.class);

HttpStatusCode httpStatusCode;
Expand Down

0 comments on commit eb69383

Please sign in to comment.