Skip to content

Commit 5ca04b2

Browse files
authored
fix: update deps (#55)
1 parent 7348769 commit 5ca04b2

File tree

8 files changed

+52
-55
lines changed

8 files changed

+52
-55
lines changed

.github/workflows/build-on-push.yaml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,16 @@ jobs:
2323
distribution: 'temurin'
2424

2525
- name: Validate Gradle wrapper
26-
uses: gradle/wrapper-validation-action@ccb4328a959376b642e027874838f60f8e596de3
26+
uses: gradle/actions/wrapper-validation@v3
27+
28+
- name: Setup Gradle
29+
uses: gradle/actions/setup-gradle@v3
2730

2831
- name: Assemble the jar
29-
uses: gradle/gradle-build-action@v2
30-
with:
31-
arguments: assemble
32+
run: ./gradlew assemble
3233

3334
- name: Run tests
34-
uses: gradle/gradle-build-action@v2
35-
with:
36-
arguments: check
35+
run: ./gradlew check koverXmlReport
3736

3837
- name: Publish Test Report
3938
uses: mikepenz/action-junit-report@v3
@@ -42,5 +41,8 @@ jobs:
4241
check_name: JUnit Test Report
4342
report_paths: '**/build/test-results/**/TEST-*.xml'
4443

45-
- name: Publish Coverage Report
46-
uses: codecov/codecov-action@v3
44+
- name: Coverage Report
45+
uses: codecov/codecov-action@v4
46+
with:
47+
token: ${{ secrets.CODECOV_TOKEN }}
48+
fail_ci_if_error: true

.github/workflows/build-on-release.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build the jar on release
22

33
on:
44
release:
5-
types: [ created ]
5+
types: [ published ]
66

77
jobs:
88
release:
@@ -16,16 +16,14 @@ jobs:
1616
with:
1717
distribution: 'temurin'
1818
java-version: '17'
19-
20-
- name: Get the version
21-
id: get_version
22-
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
19+
- name: Setup Gradle
20+
uses: gradle/actions/setup-gradle@v3
2321

2422
- name: Publish plugin
2523
uses: gradle/gradle-build-action@v2
2624
with:
2725
arguments: |
28-
-Pversion=${{ env.RELEASE_VERSION }}
26+
-Pversion=${{ github.event.release.tag_name }}
2927
-Pintellij.publish.token=${{ secrets.INTELLIJ_PUBLISH_TOKEN }}
3028
build publishPlugin
3129

build.gradle.kts

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
22
import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED
33
import org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED
44
import org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED
5-
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
65

76
group = "com.github.monosoul"
87

98
plugins {
10-
id("org.jetbrains.intellij") version "1.13.3"
11-
kotlin("jvm") version "1.8.20"
12-
id("org.jetbrains.kotlinx.kover") version "0.6.1"
9+
id("org.jetbrains.intellij") version "1.17.4"
10+
kotlin("jvm") version "1.9.24"
11+
id("org.jetbrains.kotlinx.kover") version "0.8.1"
1312
}
1413

15-
kover {
16-
xmlReport {
17-
onCheck.set(true)
14+
kotlin {
15+
jvmToolchain(17)
16+
compilerOptions {
17+
freeCompilerArgs = listOf("-Xjsr305=strict")
1818
}
1919
}
2020

@@ -27,14 +27,12 @@ intellij {
2727
}
2828

2929
dependencies {
30-
implementation(kotlin("stdlib-jdk8"))
31-
32-
testImplementation(platform("org.junit:junit-bom:5.9.2"))
30+
testImplementation(platform("org.junit:junit-bom:5.10.2"))
3331
testImplementation("org.junit.jupiter:junit-jupiter")
3432
testImplementation("org.junit.platform:junit-platform-launcher")
3533
testImplementation("io.strikt:strikt-jvm:0.34.1")
36-
testImplementation("io.mockk:mockk-jvm:1.13.5")
37-
testImplementation("org.apache.commons:commons-lang3:3.12.0")
34+
testImplementation("io.mockk:mockk:1.13.11")
35+
testImplementation("org.apache.commons:commons-lang3:3.14.0")
3836
}
3937

4038
tasks {
@@ -62,13 +60,6 @@ tasks {
6260
exceptionFormat = FULL
6361
}
6462
}
65-
66-
withType<KotlinCompile> {
67-
kotlinOptions {
68-
jvmTarget = "17"
69-
freeCompilerArgs = listOf("-Xjsr305=strict")
70-
}
71-
}
7263
}
7364

7465
repositories {

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
kotlin.stdlib.default.dependency = false

gradle/wrapper/gradle-wrapper.jar

-18.2 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
44
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

gradlew

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -83,7 +83,8 @@ done
8383
# This is normally unused
8484
# shellcheck disable=SC2034
8585
APP_BASE_NAME=${0##*/}
86-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
8788

8889
# Use the maximum available, or set MAX_FD != -1 to use that value.
8990
MAX_FD=maximum
@@ -130,26 +131,29 @@ location of your Java installation."
130131
fi
131132
else
132133
JAVACMD=java
133-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
134+
if ! command -v java >/dev/null 2>&1
135+
then
136+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
134137
135138
Please set the JAVA_HOME variable in your environment to match the
136139
location of your Java installation."
140+
fi
137141
fi
138142

139143
# Increase the maximum file descriptors if we can.
140144
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
141145
case $MAX_FD in #(
142146
max*)
143147
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
144-
# shellcheck disable=SC3045
148+
# shellcheck disable=SC2039,SC3045
145149
MAX_FD=$( ulimit -H -n ) ||
146150
warn "Could not query maximum file descriptor limit"
147151
esac
148152
case $MAX_FD in #(
149153
'' | soft) :;; #(
150154
*)
151155
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
152-
# shellcheck disable=SC3045
156+
# shellcheck disable=SC2039,SC3045
153157
ulimit -n "$MAX_FD" ||
154158
warn "Could not set maximum file descriptor limit to $MAX_FD"
155159
esac
@@ -198,11 +202,11 @@ fi
198202
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
199203
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
200204

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

207211
set -- \
208212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

gradlew.bat

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
4343
%JAVA_EXE% -version >NUL 2>&1
4444
if %ERRORLEVEL% equ 0 goto execute
4545

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
46+
echo. 1>&2
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48+
echo. 1>&2
49+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50+
echo location of your Java installation. 1>&2
5151

5252
goto fail
5353

@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5757

5858
if exist "%JAVA_EXE%" goto execute
5959

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
60+
echo. 1>&2
61+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62+
echo. 1>&2
63+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64+
echo location of your Java installation. 1>&2
6565

6666
goto fail
6767

0 commit comments

Comments
 (0)