Skip to content

Commit 96b6ff0

Browse files
authored
Merge pull request #59 from kaklakariada/update-dependencies
Update dependencies
2 parents 59b11ce + 07b97e1 commit 96b6ff0

File tree

11 files changed

+97
-51
lines changed

11 files changed

+97
-51
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: "CodeQL"
22

33
on:
44
push:
5-
branches: [master, develop]
5+
branches: [main]
66
pull_request:
7-
branches: [master, develop]
7+
branches: [main]
88
schedule:
99
- cron: '0 7 * * 6'
1010

.github/workflows/gradle.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Java CI
22

33
on:
44
push:
5-
branches: [master, develop]
5+
branches: [main]
66
pull_request:
7-
branches: [master, develop]
7+
branches: [main]
88

99
jobs:
1010
build:
@@ -41,11 +41,7 @@ jobs:
4141

4242
- name: Sonar analysis
4343
if: ${{ env.DEFAULT_JAVA == matrix.java && env.SONAR_TOKEN != null }}
44-
run: |
45-
./gradlew sonarqube -Dsonar.host.url=https://sonarcloud.io \
46-
-Dsonar.organization=kaklakariada-github \
47-
-Dsonar.login=$SONAR_TOKEN \
48-
--info --warning-mode=summary
44+
run: ./gradlew sonarqube -Dsonar.token=$SONAR_TOKEN --info --warning-mode=summary
4945
env:
5046
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5147
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.vscode/settings.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"java.configuration.updateBuildConfiguration": "automatic",
3+
"editor.formatOnSave": true,
4+
"editor.codeActionsOnSave": {
5+
"source.organizeImports": true,
6+
"source.generate.finalModifiers": true,
7+
"source.fixAll": true
8+
},
9+
"java.codeGeneration.useBlocks": true,
10+
"java.saveActions.organizeImports": true,
11+
"java.sources.organizeImports.starThreshold": 3,
12+
"java.sources.organizeImports.staticStarThreshold": 3
13+
}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2121
### Refactoring
2222

2323
- [#50](https://github.com/kaklakariada/fritzbox-java-api/pull/50) Migrate to Junit 5
24+
- [#59](https://github.com/kaklakariada/fritzbox-java-api/pull/59) Upgrade dependencies
2425

2526
## [1.6.0] - 2021-12-04
2627

README.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,32 +59,32 @@ See [CHANGELOG.md](CHANGELOG.md).
5959
fritzbox.username = user
6060
fritzbox.password = secret
6161
```
62-
2. Run example class [`TestDriver`](https://github.com/kaklakariada/fritzbox-java-api/blob/master/src/main/java/com/github/kaklakariada/fritzbox/TestDriver.java).
62+
2. Run example class [`TestDriver`](https://github.com/kaklakariada/fritzbox-java-api/blob/main/src/main/java/com/github/kaklakariada/fritzbox/TestDriver.java).
6363

6464
## Development
6565

6666
### Generate / update license header
6767

68-
```bash
68+
```sh
6969
./gradlew licenseFormat
7070
```
7171

7272
### Check if dependencies are up-to-date
7373

74-
```bash
74+
```sh
7575
./gradlew dependencyUpdates
7676
```
7777

7878
### Check dependencies for vulnerabilities
7979

80-
```bash
80+
```sh
8181
./gradlew ossIndexAudit
8282
```
8383

8484
### Building
8585

8686
Install to local maven repository:
87-
```bash
87+
```sh
8888
./gradlew clean publishToMavenLocal
8989
```
9090

@@ -102,11 +102,18 @@ Install to local maven repository:
102102
```
103103

104104
2. Increment version number in `build.gradle` and `README.md`, update [CHANGELOG.md](CHANGELOG.md), commit and push.
105-
3. Run the following command:
106105

107-
```bash
108-
./gradlew clean check build publish closeAndReleaseRepository --info
106+
3. Optional: run the following command to do a dry-run:
107+
108+
```sh
109+
./gradlew clean check build publishToSonatype closeSonatypeStagingRepository --info
110+
```
111+
112+
4. Run the following command to publish to Maven Central:
113+
114+
```sh
115+
./gradlew clean check build publishToSonatype closeAndReleaseSonatypeStagingRepository --info
109116
```
110117

111-
4. Create a new [release](https://github.com/kaklakariada/fritzbox-java-api/releases) on GitHub.
112-
5. After some time the release will be available at [Maven Central](https://repo1.maven.org/maven2/com/github/kaklakariada/fritzbox-java-api/).
118+
5. Create a new [release](https://github.com/kaklakariada/fritzbox-java-api/releases) on GitHub.
119+
6. After some time the release will be available at [Maven Central](https://repo1.maven.org/maven2/com/github/kaklakariada/fritzbox-java-api/).

build.gradle

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ plugins {
44
id "maven-publish"
55
id "jacoco"
66
id "com.github.hierynomus.license" version "0.16.1"
7-
id "org.sonarqube" version "3.4.0.2513"
8-
id "io.codearte.nexus-staging" version "0.30.0"
9-
id "com.github.ben-manes.versions" version "0.42.0"
10-
id "org.sonatype.gradle.plugins.scan" version "2.4.1"
7+
id "org.sonarqube" version "4.4.1.3373"
8+
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
9+
id "com.github.ben-manes.versions" version "0.48.0"
10+
id "org.sonatype.gradle.plugins.scan" version "2.6.1"
1111
}
1212

1313
group 'com.github.kaklakariada'
@@ -31,24 +31,24 @@ tasks.withType(JavaCompile) {
3131
options.encoding = 'UTF-8'
3232
}
3333

34-
test {
35-
useJUnitPlatform()
36-
if(logger.infoEnabled) {
37-
testLogging.showStandardStreams = true
34+
testing {
35+
suites {
36+
test {
37+
useJUnitJupiter()
38+
}
3839
}
39-
jvmArgs '-XX:+HeapDumpOnOutOfMemoryError', '-enableassertions'
4040
}
4141

4242
dependencies {
43-
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
43+
implementation 'com.squareup.okhttp3:okhttp:4.11.0'
44+
implementation 'com.squareup.okio:okio:3.6.0' // Fix CVE-2023-3635
4445
implementation 'com.subshell.simpleframework:simple-xml:2.9.0'
45-
implementation 'org.slf4j:slf4j-api:2.0.0'
46+
implementation 'org.slf4j:slf4j-api:2.0.9'
4647

47-
runtimeOnly 'ch.qos.logback:logback-classic:1.3.0-beta0'
48+
testRuntimeOnly 'ch.qos.logback:logback-classic:1.4.11'
4849

49-
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.0'
50-
testImplementation 'org.mockito:mockito-core:4.7.0'
51-
testImplementation 'org.assertj:assertj-core:3.23.1'
50+
testImplementation 'org.mockito:mockito-core:5.6.0'
51+
testImplementation 'org.assertj:assertj-core:3.24.2'
5252
}
5353

5454
license {
@@ -64,6 +64,14 @@ jacocoTestReport {
6464
}
6565
}
6666

67+
sonar {
68+
properties {
69+
property("sonar.organization", "kaklakariada-github")
70+
property("sonar.host.url", "https://sonarcloud.io")
71+
property("sonar.gradle.skipCompile", "true")
72+
}
73+
}
74+
6775
rootProject.tasks["sonarqube"].dependsOn(tasks["jacocoTestReport"])
6876

6977
def getOptionalProperty(String name) {
@@ -124,10 +132,15 @@ signing {
124132
sign publishing.publications.mavenJava
125133
}
126134

127-
nexusStaging {
135+
nexusPublishing {
128136
packageGroup = project.group
129-
username = getOptionalProperty("ossrhUsername")
130-
password = getOptionalProperty("ossrhPassword")
137+
repositories {
138+
sonatype {
139+
stagingProfileId = "4f1b95618be44"
140+
username = getOptionalProperty("ossrhUsername")
141+
password = getOptionalProperty("ossrhPassword")
142+
}
143+
}
131144
}
132145

133146
def isNonStable = { String version ->

gradle/wrapper/gradle-wrapper.jar

2.9 KB
Binary file not shown.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

gradlew

Lines changed: 22 additions & 13 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/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/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/.
@@ -80,13 +80,11 @@ do
8080
esac
8181
done
8282

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
8685
APP_BASE_NAME=${0##*/}
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
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
9088

9189
# Use the maximum available, or set MAX_FD != -1 to use that value.
9290
MAX_FD=maximum
@@ -133,22 +131,29 @@ location of your Java installation."
133131
fi
134132
else
135133
JAVACMD=java
136-
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.
137137
138138
Please set the JAVA_HOME variable in your environment to match the
139139
location of your Java installation."
140+
fi
140141
fi
141142

142143
# Increase the maximum file descriptors if we can.
143144
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144145
case $MAX_FD in #(
145146
max*)
147+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148+
# shellcheck disable=SC2039,SC3045
146149
MAX_FD=$( ulimit -H -n ) ||
147150
warn "Could not query maximum file descriptor limit"
148151
esac
149152
case $MAX_FD in #(
150153
'' | soft) :;; #(
151154
*)
155+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156+
# shellcheck disable=SC2039,SC3045
152157
ulimit -n "$MAX_FD" ||
153158
warn "Could not set maximum file descriptor limit to $MAX_FD"
154159
esac
@@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then
193198
done
194199
fi
195200

196-
# Collect all arguments for the java command;
197-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198-
# shell script including quotes and variable substitutions, so put them in
199-
# double quotes to make sure that they get re-expanded; and
200-
# * put everything else in single quotes, so that it's not re-expanded.
201+
202+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204+
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.
201210

202211
set -- \
203212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

gradlew.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
2828
if "%DIRNAME%"=="" set DIRNAME=.
29+
@rem This is normally unused
2930
set APP_BASE_NAME=%~n0
3031
set APP_HOME=%DIRNAME%
3132

0 commit comments

Comments
 (0)