Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,36 @@ jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

permissions:
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ['java']

steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 2
persist-credentials: false

- uses: actions/setup-java@v5
with:
distribution: 'adopt'
java-version: 11
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v3
uses: github/codeql-action/autobuild@v4

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4
11 changes: 6 additions & 5 deletions .github/workflows/dependency-submission.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ on:
push:
branches: [ main ]

permissions:
contents: write # Required for dependency submission

jobs:
dependency-submission:
permissions:
contents: write # Required for dependency submission
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v4
uses: gradle/actions/dependency-submission@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
14 changes: 9 additions & 5 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches: ["main"]
workflow_dispatch:
pull_request:
branches: [main]

concurrency:
group: "pages"
Expand All @@ -16,24 +18,26 @@ jobs:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
- name: Setup Pages
uses: actions/configure-pages@v5
uses: actions/configure-pages@v6
- name: Build Javadoc
run: ./gradlew javadoc --info
- name: Build Reports
run: ./gradlew check jacocoTestReport --info
- name: Collect artifacts
run: cp -r build/reports/ build/docs/
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
uses: actions/upload-pages-artifact@v5
with:
path: ./build/docs/

Expand All @@ -50,4 +54,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v5
34 changes: 34 additions & 0 deletions .github/workflows/github_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

set -o errexit
set -o nounset
set -o pipefail

base_dir="$( cd "$(dirname "$0")/../.." >/dev/null 2>&1 ; pwd -P )"
readonly base_dir
readonly build_dir="$base_dir/build"
readonly release_artifacts_dir="$build_dir/release-artifacts"

cd "$base_dir"
echo "Reading project version from Gradle project at ${base_dir}..."
project_version=$(./gradlew properties --console=plain --quiet | grep "^version:" | awk '{print $2}')
readonly project_version
echo "Read project version '$project_version' from Gradle project"

mkdir -p "$release_artifacts_dir"
cp -v "$build_dir/libs/fritzbox-java-api-$project_version.jar" "$release_artifacts_dir/fritzbox-java-api-$project_version.jar"

release_artifacts=$(find "$release_artifacts_dir" -type f)
readonly release_artifacts

readonly title="Release $project_version"
readonly tag="$project_version"
echo "Creating release:"
echo "Git tag : $tag"
echo "Title : $title"
echo "Artifacts: $release_artifacts"

# shellcheck disable=SC2086
release_url=$(gh release create --latest --title "$title" --target main "$tag" $release_artifacts)
readonly release_url
echo "Release URL: $release_url"
50 changes: 42 additions & 8 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@ on:
branches: [main]

jobs:
build:

build-and-test:
permissions:
contents: read
runs-on: ubuntu-latest
strategy:
matrix:
java: [11, 17, 21, 23]
java: [17, 21, 25]
env:
DEFAULT_JAVA: 11
DEFAULT_JAVA: 17

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
persist-credentials: false

- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v5
Expand All @@ -26,10 +29,10 @@ jobs:
java-version: ${{ matrix.java }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0

- name: Cache SonarQube packages
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-java-${{ matrix.java }}-sonar
Expand All @@ -40,7 +43,38 @@ jobs:

- name: Sonar analysis
if: ${{ env.DEFAULT_JAVA == matrix.java && env.SONAR_TOKEN != null }}
run: ./gradlew sonarqube -Dsonar.token=$SONAR_TOKEN --info --warning-mode=summary
run: ./gradlew sonarqube -Dsonar.token=$SONAR_TOKEN --info --warning-mode=summary -PjavaVersion=${{ matrix.java }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

ossindex:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Setup Java 17
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
- name: Run OSS Index
run: ./gradlew ossIndex --info --warning-mode all
env:
ORG_GRADLE_PROJECT_ossIndexUsername: ${{ secrets.OSSINDEX_USERNAME }}
ORG_GRADLE_PROJECT_ossIndexToken: ${{ secrets.OSSINDEX_TOKEN }}

build:
permissions:
contents: read
runs-on: ubuntu-slim
needs:
- build-and-test
- ossindex
steps:
- run: echo "Build successful"
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release

on:
workflow_dispatch:
inputs:
skip-deploy-maven-central:
description: "Skip deployment to Maven Central"
required: true
type: boolean
default: false

jobs:
release:
runs-on: ubuntu-latest
defaults:
run:
shell: "bash"
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
permissions:
contents: write # Required for creating GitHub release
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false

- name: Fail if not running on main branch
if: ${{ github.ref != 'refs/heads/main' }}
run: |
echo "Not running on main branch, github.ref is $GITHUB_REF. Please start this workflow only on main."
exit 1
env:
GITHUB_REF: ${{ github.ref }}

- uses: actions/setup-java@v5
with:
distribution: "temurin"
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0

- name: Build
run: ./gradlew clean build --info --warning-mode all

- name: Publish to Maven Central
if: ${{ !inputs.skip-deploy-maven-central }}
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository --info --warning-mode all
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.MAVEN_CENTRAL_PORTAL_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.MAVEN_CENTRAL_PORTAL_TOKEN }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}

- name: Create GitHub Release
run: ./.github/workflows/github_release.sh
env:
GH_TOKEN: ${{ github.token }}
6 changes: 3 additions & 3 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
Expand Down Expand Up @@ -113,7 +113,7 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=11
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.8.0] - unreleased
## [2.0.1] - unreleased

## [2.0.0] - 2026-06-14

**Breaking Change**: Starting with this release this project requires Java 17.

- [#65](https://github.com/kaklakariada/fritzbox-java-api/pull/65) Upgrade dependencies
- [#67](https://github.com/kaklakariada/fritzbox-java-api/pull/67) Upgrade dependencies, migrate Maven Central deployment

## [1.7.0] - 2023-10-07

Expand Down
Loading
Loading