diff --git a/.github/workflows/dependencyReview.yml b/.github/workflows/dependencyReview.yml index 5c904b57..f12e010b 100644 --- a/.github/workflows/dependencyReview.yml +++ b/.github/workflows/dependencyReview.yml @@ -11,4 +11,4 @@ jobs: - name: 'Checkout Repository' uses: actions/checkout@v4 - name: 'Dependency Review' - uses: actions/dependency-review-action@v3 \ No newline at end of file + uses: actions/dependency-review-action@v4 \ No newline at end of file diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 5e6e7569..c8ae9c4c 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up JDK 21 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '21' distribution: 'temurin' @@ -25,11 +25,11 @@ jobs: - name: Run checkstyle run: ./gradlew checkstyleMain - name: Build with Gradle - uses: gradle/gradle-build-action@0bfe00a136db5e61ba3416b372542a65863a9fee + uses: gradle/gradle-build-action@0706ab3a3c20483a3f37c3d9de1b0d95297e3743 with: arguments: shadowJar - name: Upload a Build Artifact - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.3.0 with: name: 'Successfully build DiscordOfficer JDK${{ matrix.jdk }}' path: build/libs/*.jar diff --git a/build.gradle.kts b/build.gradle.kts index b1940b97..f0e78fc4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,7 +20,7 @@ repositories { } checkstyle { - toolVersion = "10.12.4" + toolVersion = "10.13.0" configFile = file("${rootDir}/checkstyle/checkstyle.xml") @@ -30,7 +30,7 @@ checkstyle { dependencies { // JDA - implementation("net.dv8tion:JDA:5.0.0-beta.17") { + implementation("net.dv8tion:JDA:5.0.0-beta.20") { exclude("opus-java", "opus-java") } @@ -38,44 +38,44 @@ dependencies { implementation("net.dzikoysk:cdn:1.14.4") // slf4j setup - implementation("ch.qos.logback:logback-classic:1.4.11") + implementation("ch.qos.logback:logback-classic:1.4.14") // new modern fork of jda-utilities implementation("pw.chew:jda-chewtils-command:2.0-SNAPSHOT") // Sentry.io integration - implementation("io.sentry:sentry:6.33.0") + implementation("io.sentry:sentry:7.3.0") // ORMLite implementation("com.j256.ormlite:ormlite-core:6.1") implementation("com.j256.ormlite:ormlite-jdbc:6.1") // HikariCP - implementation("com.zaxxer:HikariCP:5.0.1") + implementation("com.zaxxer:HikariCP:5.1.0") // Database drivers implementation("mysql:mysql-connector-java:8.0.33") - implementation("org.postgresql:postgresql:42.6.0") + implementation("org.postgresql:postgresql:42.7.1") implementation("com.h2database:h2:2.2.224") - implementation("org.mariadb.jdbc:mariadb-java-client:3.2.0") + implementation("org.mariadb.jdbc:mariadb-java-client:3.3.2") // Gson implementation("com.google.code.gson:gson:2.10.1") // tests - testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.0") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0") + testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.2") + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.2") // mockwebserver testImplementation("com.squareup.okhttp3:mockwebserver:4.12.0") testImplementation("com.squareup.okhttp3:okhttp:4.12.0") // mockito - testImplementation("org.mockito:mockito-core:5.7.0") - testImplementation("org.mockito:mockito-junit-jupiter:5.7.0") + testImplementation("org.mockito:mockito-core:5.10.0") + testImplementation("org.mockito:mockito-junit-jupiter:5.10.0") // https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 - implementation("org.apache.commons:commons-lang3:3.13.0") + implementation("org.apache.commons:commons-lang3:3.14.0") } tasks.getByName("test") { diff --git a/docker/java21.dockerfile b/docker/java21.dockerfile index d4cd8681..d31e95f0 100644 --- a/docker/java21.dockerfile +++ b/docker/java21.dockerfile @@ -4,7 +4,7 @@ WORKDIR /app/ COPY .. /app/ RUN gradle clean shadowJar -FROM amazoncorretto:21.0.1-alpine +FROM amazoncorretto:21.0.2-alpine LABEL org.label-schema.name="eternalcode/discordofficer" LABEL org.label-schema.description="EternalCode DiscordOfficer official image" LABEL org.label-schema.url="http://eternalcode.pl/" diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7f93135c..d64cd491 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 744c64d1..a80b22ce 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ 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.6-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index bf2e7afa..1aa94a42 100644 --- a/gradlew +++ b/gradlew @@ -131,10 +131,13 @@ 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. @@ -142,7 +145,7 @@ 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 @@ -150,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | 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 @@ -199,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" \ diff --git a/gradlew.bat b/gradlew.bat index 93e3f59f..25da30db 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail