Skip to content

Commit

Permalink
Gradle & dependency updates (#75)
Browse files Browse the repository at this point in the history
* Update Gradle to 8.7

* Dependency updates
  • Loading branch information
mizosoft authored May 11, 2024
1 parent 9aadf56 commit 65f8a13
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 86 deletions.
5 changes: 0 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,3 @@ systemProp.org.gradle.internal.publish.checksums.insecure=true
systemProp.javax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
systemProp.javax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
systemProp.javax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
quarkusPluginId=io.quarkus
quarkusPluginVersion=3.9.1
quarkusPlatformGroupId=io.quarkus.platform
quarkusPlatformArtifactId=quarkus-bom
quarkusPlatformVersion=3.9.1
46 changes: 27 additions & 19 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,46 +1,48 @@
[versions]
junit = "5.10.1"
junit = "5.10.2"
reactivestreams = "1.0.4"
checkerframework = "3.42.0"
checkerframework = "3.43.0"
gson = "2.10.1"
jackson = "2.16.1"
protobuf = "3.21.12" # Looks like we're stuck with this version: https://github.com/protocolbuffers/protobuf/issues/12639
errorprone = "2.24.1"
jackson = "2.17.1"
protobuf = "4.26.1"
errorprone = "2.27.1"
brotli-dec = "0.1.2"
okhttp = "5.0.0-alpha.7"
jmh = "1.37"
reactor = "3.6.2"
nullaway-core = "0.10.21"
reactor = "3.6.5"
nullaway-core = "0.10.26"
jaxb-api = "2.3.1"
jaxb-impl = "2.3.8"
jaxb-jakarta-api = "4.0.1"
jaxb-jakarta-impl = "4.0.3"
jaxb-impl = "2.3.9"
jaxb-jakarta-api = "4.0.2"
jaxb-jakarta-impl = "4.0.5"
moxy = "2.7.14"
jsoup = "1.17.2"
testng = "7.9.0"
testng = "7.10.2"
jimfs = "1.3.0"
assertj = "3.25.2"
awaitility = "4.2.0"
assertj = "3.25.3"
awaitility = "4.2.1"
hamcrest = "2.2"
spring-boot = "2.7.18"
autoservice = "1.1.1"
bson4jackson = "2.15.0"
bson4jackson = "2.15.1"
jacoco = "0.8.8"
lettuce = "6.3.1.RELEASE"
lettuce = "6.3.2.RELEASE"
javaparser = "3.25.3"
mockito = "5.10.0"
mockito = "5.11.0"
javafx-platform = "17.0.10"
quarkus = "3.10.0"
versions-plugin = "0.51.0"
nexus-publish = "2.0.0-rc-1"
nexus-publish = "2.0.0"
coveralls-plugin = "2.12.2"
protobuf-plugin = "0.9.4"
spring-dependency-management-plugin = "1.1.4"
spring-dependency-management-plugin = "1.1.5"
shadow-plugin = "8.1.1"
extraJavaModuleInfo-plugin = "1.7"
extraJavaModuleInfo-plugin = "1.8"
javafx-plugin = "0.1.0"
checkerframework-plugin = "0.6.27"
errorprone-plugin = "3.1.0"
nullaway-plugin = "1.5.0"
graalvm-plugin = "0.10.1"

[libraries]
junit-bom = { module = "org.junit:junit-bom", version.ref = "junit" }
Expand Down Expand Up @@ -86,6 +88,10 @@ bson4jackson = { module = "de.undercouch:bson4jackson", version.ref = "bson4jack
lettuce = { module = "io.lettuce:lettuce-core", version.ref = "lettuce" }
javaparser = { module = "com.github.javaparser:javaparser-symbol-solver-core", version.ref = "javaparser" }
mockito = { module = "org.mockito:mockito-core", version.ref = "mockito" }
quarkus-rest-jackson = { module = "io.quarkus:quarkus-rest-jackson" }
quarkus-junit5 = { module = "io.quarkus:quarkus-junit5" }
rest-assured = { module = "io.rest-assured:rest-assured" }
quarkus-bom = { module = "io.quarkus.platform:quarkus-bom", version.ref = "quarkus" }
checkerframework-plugin = { module = "org.checkerframework:checkerframework-gradle-plugin", version.ref = "checkerframework-plugin" }
errorprone-plugin = { module = "net.ltgt.gradle:gradle-errorprone-plugin", version.ref = "errorprone-plugin" }
nullaway-plugin = { module = "net.ltgt.gradle:gradle-nullaway-plugin", version.ref = "nullaway-plugin" }
Expand All @@ -100,3 +106,5 @@ shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow-plugin"
extraJavaModuleInfo = { id = "org.gradlex.extra-java-module-info", version.ref = "extraJavaModuleInfo-plugin" }
javafx = { id = "org.openjfx.javafxplugin", version.ref = "javafx-plugin" }
nexus-publish = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "nexus-publish" }
quarkus = { id = "io.quarkus", version.ref = "quarkus" }
graalvm = { id = "org.graalvm.buildtools.native", version.ref = "graalvm-plugin" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
48 changes: 23 additions & 25 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
#!/bin/sh

#
# Copyright (c) 2023 Moataz Abdelnasser
# Copyright © 2015-2021 the original authors.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# https://www.apache.org/licenses/LICENSE-2.0
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
Expand Down Expand Up @@ -89,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -136,26 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
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 @@ -204,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
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Moataz Abdelnasser
* Copyright (c) 2024 Moataz Abdelnasser
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -47,7 +47,7 @@
import java.util.zip.DeflaterInputStream;
import org.checkerframework.checker.nullness.qual.Nullable;

/** A mock gzip stream with configurable gzip stream fields & corruption modes. */
/** A mock gzip stream with configurable gzip stream fields {@code &} corruption modes. */
public final class MockGzipStream {
private static final int GZIP_MAGIC = 0x8B1F;
private static final int CM_DEFLATE = 8;
Expand Down
2 changes: 1 addition & 1 deletion native-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id("conventions.static-analysis")
id("conventions.testing")
id("conventions.coverage")
id("org.graalvm.buildtools.native") version "0.10.1"
alias(libs.plugins.graalvm)
}

dependencies {
Expand Down
15 changes: 5 additions & 10 deletions quarkus-native-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id("conventions.static-analysis")
id("conventions.testing")
id("conventions.coverage")
id("io.quarkus")
alias(libs.plugins.quarkus)
}

dependencies {
Expand All @@ -14,15 +14,10 @@ dependencies {
implementation(libs.mockwebserver)
implementation(libs.autoservice.annotations)
annotationProcessor(libs.autoservice.annprocess)

val quarkusPlatformGroupId: String by project
val quarkusPlatformArtifactId: String by project
val quarkusPlatformVersion: String by project
implementation(enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}"))

implementation("io.quarkus:quarkus-rest-jackson")
testImplementation("io.quarkus:quarkus-junit5")
testImplementation("io.rest-assured:rest-assured")
implementation(enforcedPlatform(libs.quarkus.bom))
implementation(libs.quarkus.rest.jackson)
testImplementation(libs.quarkus.junit5)
testImplementation(libs.rest.assured)
}

tasks.withType<Test> {
Expand Down
36 changes: 13 additions & 23 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import java.io.FileNotFoundException
import java.util.*

rootProject.name = "methanol-parent"
Expand All @@ -21,33 +22,22 @@ include("spring-boot-test")
include("methanol-redis")

// Load local properties while giving precedence to properties defined through CLI.

rootDir.resolve("local.properties")
.takeIf { it.exists() }
?.inputStream()
?.run { use { stream -> Properties().apply { load(stream) } } }
?.filter { !gradle.startParameter.projectProperties.containsKey(it.key) }
?.also { localProperties ->
localProperties.forEach { (name, value) -> settings.extra[name.toString()] = value }
gradle.rootProject {
localProperties.forEach { (name, value) -> project.extra[name.toString()] = value }
try {
rootDir.resolve("local.properties")
.inputStream()
.run { use { stream -> Properties().apply { load(stream) } } }
.filter { !gradle.startParameter.projectProperties.containsKey(it.key) }
.also { localProperties ->
localProperties.forEach { (name, value) -> settings.extra[name.toString()] = value }
gradle.rootProject {
localProperties.forEach { (name, value) -> project.extra[name.toString()] = value }
}
}
}
} catch (_: FileNotFoundException) {
}

val includeNativeTests: String? by settings
if (includeNativeTests != null) {
pluginManagement {
val quarkusPluginVersion: String by settings
val quarkusPluginId: String by settings
repositories {
mavenCentral()
gradlePluginPortal()
}
plugins {
id(quarkusPluginId) version quarkusPluginVersion
}
}

include("quarkus-native-test")
include("native-test")
}
Expand Down

0 comments on commit 65f8a13

Please sign in to comment.