Skip to content
Draft
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
67 changes: 0 additions & 67 deletions .github/scripts/update-spring-versions.py

This file was deleted.

14 changes: 0 additions & 14 deletions .github/spring-versions.json

This file was deleted.

59 changes: 10 additions & 49 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,57 +8,18 @@
branches: [ "master" ]
workflow_dispatch:

jobs:
generate-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
name: Generate version matrix
steps:
- uses: actions/checkout@v6
- name: Read matrix from JSON
id: set-matrix
run: |
MATRIX=$(jq -c '.matrix' .github/spring-versions.json)
echo "matrix={\"include\":$MATRIX}" >> $GITHUB_OUTPUT

regression-tests:
needs: generate-matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
name: Test Spring Boot ${{ matrix.boot }} / Java ${{ matrix.java }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: ${{ matrix.java }}
env:
DEFAULT_JAVA_VERSION: '17'

- name: Run tests and generate reports
run: ./gradlew testAndReport -PspringBootVersion=${{ matrix.boot }} -PspringFrameworkVersion=${{ matrix.framework }}

- name: Upload Artifact
uses: actions/upload-artifact@v6
if: always()
with:
name: report-java-${{ matrix.java }}-spring-boot-${{ matrix.boot }}
path: build/reports/**
retention-days: 5
jobs:

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [ '17', '21' ]
name: Test Spring Boot latest / Java ${{ matrix.java }}
java: [ '17', '21', '25' ]
name: Test with Java ${{ matrix.java }}
steps:
- name: Checkout code
uses: actions/checkout@v6
Expand All @@ -78,13 +39,13 @@
uses: actions/upload-artifact@v6
if: always()
with:
name: report-java-${{ matrix.java }}-spring-boot-latest
name: report-java-${{ matrix.java }}
path: build/reports/**
retention-days: 5

- name: Run Sonar analysis
# Skip Sonar on Dependabot in pull_request runs (no secrets there); handled by a separate job below
if: matrix.java == '17' && github.actor != 'dependabot[bot]'
if: matrix.java == env.DEFAULT_JAVA_VERSION && github.actor != 'dependabot[bot]'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand All @@ -94,7 +55,7 @@
sonar-dependabot:
name: Sonar (Dependabot PRs)
# Only run when the event is pull_request_target and the actor is Dependabot
if: github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]'
if: github.event_name == 'pull_request_target' && github.event.pull_request.user.login == 'dependabot[bot]'

Check failure

Code scanning / SonarCloud

Workflows should not rely on unverified GitHub context values to trust events High

Workflows should not rely on forgeable GitHub context values to trust events See more on SonarQube Cloud
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -111,7 +72,7 @@
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '17'
java-version: ${{ env.DEFAULT_JAVA_VERSION }}

- name: Build (no tests)
run: ./gradlew assemble -x test
Expand All @@ -133,7 +94,7 @@
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
java-version: ${{ env.DEFAULT_JAVA_VERSION }}

- name: Run build with Gradle Wrapper
run: ./gradlew build -x test
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/update-spring-versions.yml

This file was deleted.

73 changes: 30 additions & 43 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
buildscript {
ext {
springBootVersion = project.hasProperty('springBootVersion') ? project.springBootVersion : '3.5.0'
springVersion = project.hasProperty('springFrameworkVersion') ? project.springFrameworkVersion : '6.2.7'
jacksonVersion = '2.20.1'
retrofitVersion = '3.0.0'
mockitoVersion = '5.21.+' // At least Mockito 5.2.0 is required to Mock final classes
}
dependencies {
classpath 'org.owasp:dependency-check-gradle'
}
}

plugins {
id 'java'
id "org.owasp.dependencycheck" version "12.1.9"
id "io.freefair.lombok" version "9.1.0"
id "io.freefair.lombok" version "9.2.0"
id "io.github.gradle-nexus.publish-plugin" version "2.0.0"
}

group 'ee.bitweb'
version '4.0.5'
group = 'ee.bitweb'
version = '4.0.5'
java {
sourceCompatibility = '17'
}
Expand All @@ -38,82 +24,83 @@ repositories {

dependencies {
// https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-catalina
compileOnly group: 'org.apache.tomcat', name: 'tomcat-catalina', version: '10.1.50'
compileOnly 'org.apache.tomcat:tomcat-catalina:10.1.50'

// https://mvnrepository.com/artifact/org.springframework/spring-webmvc
compileOnly group: 'org.springframework', name: 'spring-webmvc', version: "${springVersion}"
compileOnly 'org.springframework:spring-webmvc:6.2.7'

// https://mvnrepository.com/artifact/org.springframework/spring-tx
compileOnly group: 'org.springframework', name: 'spring-tx', version: "${springVersion}"
compileOnly 'org.springframework:spring-tx:6.2.7'

// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-security
compileOnly group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: "${springBootVersion}"
compileOnly 'org.springframework.boot:spring-boot-starter-security:3.5.0'

// https://mvnrepository.com/artifact/org.springframework.amqp/spring-amqp
compileOnly group: 'org.springframework.boot', name: 'spring-boot-starter-amqp', version: "${springBootVersion}"
compileOnly 'org.springframework.boot:spring-boot-starter-amqp:3.5.0'

// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-configuration-processor
annotationProcessor group: 'org.springframework.boot', name: 'spring-boot-configuration-processor', version: "${springBootVersion}"
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor:3.5.0'

// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-actuator
compileOnly group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: "${springBootVersion}"
compileOnly 'org.springframework.boot:spring-boot-starter-actuator:3.5.0'

// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-autoconfigure
compileOnly group: 'org.springframework.boot', name: 'spring-boot-autoconfigure', version: "${springBootVersion}"
compileOnly 'org.springframework.boot:spring-boot-autoconfigure:3.5.0'

// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-validation
compileOnly group: 'org.springframework.boot', name: 'spring-boot-starter-validation', version: "${springBootVersion}"
compileOnly 'org.springframework.boot:spring-boot-starter-validation:3.5.0'

// https://mvnrepository.com/artifact/com.fasterxml.jackson.datatype/jackson-datatype-jsr310
compileOnly group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: "${jacksonVersion}"
compileOnly 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.1'

// https://mvnrepository.com/artifact/jakarta.validation/jakarta.validation-api
compileOnly group: 'jakarta.validation', name: 'jakarta.validation-api', version: '3.1.1'
compileOnly 'jakarta.validation:jakarta.validation-api:3.1.1'

// https://mvnrepository.com/artifact/com.squareup.retrofit2/retrofit
compileOnly group: 'com.squareup.retrofit2', name: 'retrofit', version: "${retrofitVersion}"
compileOnly 'com.squareup.retrofit2:retrofit:3.0.0'

// https://mvnrepository.com/artifact/com.squareup.retrofit2/converter-jackson
compileOnly group: 'com.squareup.retrofit2', name: 'converter-jackson', version: "${retrofitVersion}"
compileOnly 'com.squareup.retrofit2:converter-jackson:3.0.0'

// https://mvnrepository.com/artifact/com.squareup.okhttp3/logging-interceptor
compileOnly group: 'com.squareup.okhttp3', name: 'logging-interceptor', version: '4.12.0'
compileOnly 'com.squareup.okhttp3:logging-interceptor:5.3.2'

// https://mvnrepository.com/artifact/de.siegmar/logback-gelf
compileOnly group: 'de.siegmar', name: 'logback-gelf', version: '6.1.+'
compileOnly 'de.siegmar:logback-gelf:6.1.+'

// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: "${springBootVersion}"
testImplementation 'org.springframework.boot:spring-boot-starter-web:3.5.0'

// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: "${springBootVersion}"
testImplementation 'org.springframework.boot:spring-boot-starter-test:3.5.0'

// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-security
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: "${springBootVersion}"
testImplementation 'org.springframework.boot:spring-boot-starter-security:3.5.0'

// https://mvnrepository.com/artifact/org.springframework.amqp/spring-amqp
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-amqp', version: "${springBootVersion}"
testImplementation 'org.springframework.boot:spring-boot-starter-amqp:3.5.0'

// https://mvnrepository.com/artifact/org.json/json
testImplementation group: 'org.json', name: 'json', version: '20250517'
testImplementation 'org.json:json:20250517'

// https://mvnrepository.com/artifact/ee.bitweb/spring-test-core
testImplementation group: 'ee.bitweb', name: 'spring-test-core', version: '2.+'
testImplementation 'ee.bitweb:spring-test-core:2.+'

// https://mvnrepository.com/artifact/org.mockito/mockito-core
testImplementation group: 'org.mockito', name: 'mockito-core', version: "${mockitoVersion}"
testImplementation 'org.mockito:mockito-core:5.21.+'

// https://mvnrepository.com/artifact/org.mockito/mockito-junit-jupiter
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: "${mockitoVersion}"
testImplementation 'org.mockito:mockito-junit-jupiter:5.21.+'

// https://mvnrepository.com/artifact/org.mock-server/mockserver-netty
testImplementation ("org.mock-server:mockserver-netty:5.15.0") {
testImplementation('org.mock-server:mockserver-netty:5.15.0') {
exclude group: 'junit', module: 'junit'
}

testImplementation group : 'org.testcontainers', name: 'testcontainers', version: "1.+"
// https://mvnrepository.com/artifact/org.testcontainers/testcontainers
testImplementation 'org.testcontainers:testcontainers:1.+'

testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

configurations {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Loading