Skip to content

Commit 9fbac0d

Browse files
authored
Upgrade dependencies (#65)
* Update vscode config files * Upgrade dependencies * Upgrade build scripts * Add dependency submission & doc publishing --------- Co-authored-by: kaklakariada <kaklakariada@users.noreply.github.com>
1 parent 3265c18 commit 9fbac0d

File tree

12 files changed

+133
-47
lines changed

12 files changed

+133
-47
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on:
55
branches: [main]
66
pull_request:
77
branches: [main]
8-
schedule:
9-
- cron: '0 7 * * 6'
8+
# schedule:
9+
# - cron: '0 7 * * 6'
1010

1111
jobs:
1212
analyze:
@@ -28,9 +28,9 @@ jobs:
2828
with:
2929
distribution: 'adopt'
3030
java-version: 11
31-
cache: 'gradle'
3231

33-
- uses: gradle/wrapper-validation-action@v2
32+
- name: Setup Gradle
33+
uses: gradle/actions/setup-gradle@v4
3434

3535
- name: Initialize CodeQL
3636
uses: github/codeql-action/init@v3
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Dependency Submission
2+
3+
on:
4+
# Only runs on main branch
5+
push:
6+
branches: [ main ]
7+
8+
permissions:
9+
contents: write # Required for dependency submission
10+
11+
jobs:
12+
dependency-submission:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout sources
16+
uses: actions/checkout@v4
17+
- name: Setup Java
18+
uses: actions/setup-java@v4
19+
with:
20+
distribution: 'temurin'
21+
java-version: 17
22+
- name: Generate and submit dependency graph
23+
uses: gradle/actions/dependency-submission@v4

.github/workflows/gh-pages.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: "pages"
10+
cancel-in-progress: false
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- name: Set up JDK 17
21+
uses: actions/setup-java@v4
22+
with:
23+
distribution: 'temurin'
24+
java-version: 17
25+
- name: Setup Gradle
26+
uses: gradle/actions/setup-gradle@v4
27+
- name: Setup Pages
28+
uses: actions/configure-pages@v5
29+
- name: Build Javadoc
30+
run: ./gradlew javadoc --info
31+
- name: Build Reports
32+
run: ./gradlew check jacocoTestReport --info
33+
- name: Collect artifacts
34+
run: cp -r build/reports/ build/docs/
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v3
37+
with:
38+
path: ./build/docs/
39+
40+
deploy:
41+
if: ${{ github.ref == 'refs/heads/main' }}
42+
permissions:
43+
id-token: write
44+
pages: write
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
runs-on: ubuntu-latest
49+
needs: build
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

.github/workflows/gradle.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
java: [11, 17]
15+
java: [11, 17, 21, 23]
1616
env:
17-
DEFAULT_JAVA: 17
17+
DEFAULT_JAVA: 11
1818

1919
steps:
2020
- uses: actions/checkout@v4
@@ -24,8 +24,9 @@ jobs:
2424
with:
2525
distribution: 'temurin'
2626
java-version: ${{ matrix.java }}
27-
cache: 'gradle'
2827

28+
- name: Setup Gradle
29+
uses: gradle/actions/setup-gradle@v4
2930

3031
- name: Cache SonarQube packages
3132
uses: actions/cache@v4
@@ -34,10 +35,8 @@ jobs:
3435
key: ${{ runner.os }}-java-${{ matrix.java }}-sonar
3536
restore-keys: ${{ runner.os }}-java-${{ matrix.java }}-sonar
3637

37-
- uses: gradle/wrapper-validation-action@v2
38-
3938
- name: Build with Gradle
40-
run: ./gradlew clean build --info --warning-mode all
39+
run: ./gradlew clean build --info --warning-mode all -PjavaVersion=${{ matrix.java }}
4140

4241
- name: Sonar analysis
4342
if: ${{ env.DEFAULT_JAVA == matrix.java && env.SONAR_TOKEN != null }}

.settings/org.eclipse.jdt.core.prefs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=ignore
23
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
34
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
45
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull

.vscode/settings.json

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
{
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-
}
2+
"java.configuration.updateBuildConfiguration": "automatic",
3+
"editor.formatOnSave": true,
4+
"editor.codeActionsOnSave": {
5+
"source.organizeImports": "explicit",
6+
"source.generate.finalModifiers": "explicit",
7+
"source.fixAll": "explicit"
8+
},
9+
"java.codeGeneration.useBlocks": true,
10+
"java.saveActions.organizeImports": true,
11+
"java.sources.organizeImports.starThreshold": 3,
12+
"java.sources.organizeImports.staticStarThreshold": 3,
13+
"sonarlint.connectedMode.project": {
14+
"connectionId": "kaklakariada-github",
15+
"projectKey": "com.github.kaklakariada:fritzbox-java-api"
16+
}
17+
}

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [1.8.0] - unreleased
99

10+
- [#65](https://github.com/kaklakariada/fritzbox-java-api/pull/65) Upgrade dependencies
11+
1012
## [1.7.0] - 2023-10-07
1113

1214
### Added

build.gradle

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@ plugins {
44
id "maven-publish"
55
id "jacoco"
66
id "com.github.hierynomus.license" version "0.16.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"
7+
id "org.sonarqube" version "6.0.1.5171"
8+
id "io.github.gradle-nexus.publish-plugin" version "2.0.0"
9+
id "com.github.ben-manes.versions" version "0.51.0"
10+
id "org.sonatype.gradle.plugins.scan" version "2.8.3"
1111
}
1212

13-
group 'com.github.kaklakariada'
13+
group = 'com.github.kaklakariada'
1414
version = '1.7.0'
1515

1616
java {
1717
toolchain {
18-
languageVersion = JavaLanguageVersion.of(11)
18+
def javaVersion = project.hasProperty('javaVersion') ? project.getProperty('javaVersion') : 11
19+
languageVersion = JavaLanguageVersion.of(javaVersion)
1920
}
2021
withJavadocJar()
2122
withSourcesJar()
@@ -40,15 +41,14 @@ testing {
4041
}
4142

4243
dependencies {
43-
implementation 'com.squareup.okhttp3:okhttp:4.11.0'
44-
implementation 'com.squareup.okio:okio:3.6.0' // Fix CVE-2023-3635
44+
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
4545
implementation 'com.subshell.simpleframework:simple-xml:2.9.0'
46-
implementation 'org.slf4j:slf4j-api:2.0.9'
46+
implementation 'org.slf4j:slf4j-api:2.0.16'
4747

48-
testRuntimeOnly 'ch.qos.logback:logback-classic:1.4.11'
48+
testRuntimeOnly 'ch.qos.logback:logback-classic:1.5.15'
4949

50-
testImplementation 'org.mockito:mockito-core:5.6.0'
51-
testImplementation 'org.assertj:assertj-core:3.24.2'
50+
testImplementation 'org.mockito:mockito-core:5.14.2'
51+
testImplementation 'org.assertj:assertj-core:3.27.0'
5252
}
5353

5454
license {

gradle/wrapper/gradle-wrapper.jar

-19.7 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -55,7 +57,7 @@
5557
# Darwin, MinGW, and NonStop.
5658
#
5759
# (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
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5961
# within the Gradle project.
6062
#
6163
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,7 @@ done
8486
# shellcheck disable=SC2034
8587
APP_BASE_NAME=${0##*/}
8688
# 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
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
8890

8991
# Use the maximum available, or set MAX_FD != -1 to use that value.
9092
MAX_FD=maximum

gradlew.bat

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
4345
%JAVA_EXE% -version >NUL 2>&1
4446
if %ERRORLEVEL% equ 0 goto execute
4547

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.
48+
echo. 1>&2
49+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50+
echo. 1>&2
51+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52+
echo location of your Java installation. 1>&2
5153

5254
goto fail
5355

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

5860
if exist "%JAVA_EXE%" goto execute
5961

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.
62+
echo. 1>&2
63+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64+
echo. 1>&2
65+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66+
echo location of your Java installation. 1>&2
6567

6668
goto fail
6769

0 commit comments

Comments
 (0)