Skip to content

Commit

Permalink
Update actions, plugins, and dependencies (junit-pioneer#828)
Browse files Browse the repository at this point in the history
Besides updates, this PR also removes the Log4j test dependency. Log4j
was originally introduced via junit-pioneer#74. JUnit Jupiter indeed uses Log4j for
configuring logging in (some) tests:

https://github.com/search?q=repo%3Ajunit-team%2Fjunit5%20log4j&type=code

However, since it has been introduced in JUnit Pioneer in 2018, there
seems to be no use case (only trouble: junit-pioneer#562).

PR: junit-pioneer#828
  • Loading branch information
beatngu13 authored Oct 7, 2024
1 parent 3b2ae59 commit 62693ff
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 23 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Check out repo
uses: actions/checkout@v4
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v2
uses: gradle/wrapper-validation-action@v3

# Our basic build step as we want contributors to have a nice developer
# experience with little build time and sufficient feedback. Therefore, we
Expand All @@ -64,7 +64,7 @@ jobs:
java-version: 11
distribution: temurin
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Gradle build
run: ./gradlew --refresh-dependencies --stacktrace --scan clean build -x spotlessCheck

Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
path: ~/.sonar/cache/
key: ubuntu-sonar
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Gradle build
run: ./gradlew --refresh-dependencies --stacktrace --scan clean build -x spotlessCheck
- name: SonarCloud analysis
Expand All @@ -117,7 +117,7 @@ jobs:
java-version: 11
distribution: temurin
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Spotless check
run: ./gradlew --scan spotlessCheck

Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
java-version: ${{ matrix.java }}
distribution: temurin
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Gradle build
env:
ORG_GRADLE_PROJECT_junitVersion: ${{ matrix.junit-version }}
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:
java-version: 23
distribution: temurin
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: release-candidate

Expand Down Expand Up @@ -227,7 +227,7 @@ jobs:
11
distribution: temurin
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Perform release
env:
# used to trigger website build
Expand All @@ -250,7 +250,7 @@ jobs:
name: Update website
steps:
- name: Trigger website build
uses: peter-evans/repository-dispatch@v2
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.GH_WRITE_TOKEN }}
repository: junit-pioneer/junit-pioneer.github.io
Expand Down
1 change: 0 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ For our own infrastructure, we rely on the following compile and test dependenci

* AssertJ (assertions for our tests)
* Mockito (mocking for our tests)
* Log4J (to configure logging during test runs)
* Jimfs (as an in-memory file system for our test)
* Equalsverifier (for easier assertion of simple things)

Expand Down
23 changes: 9 additions & 14 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ plugins {
signing
id("com.diffplug.spotless") version "6.25.0"
id("at.zierler.yamlvalidator") version "1.5.0"
id("org.sonarqube") version "4.4.1.3373"
id("org.sonarqube") version "5.1.0.4882"
id("org.shipkit.shipkit-changelog") version "2.0.1"
id("org.shipkit.shipkit-github-release") version "2.0.1"
id("com.github.ben-manes.versions") version "0.51.0"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0-rc-2"
id("org.gradlex.extra-java-module-info") version "1.7"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
id("org.gradlex.extra-java-module-info") version "1.9"
}

plugins.withType<JavaPlugin>().configureEach {
Expand Down Expand Up @@ -49,9 +49,8 @@ repositories {
}

val junitVersion : String by project
val jacksonVersion: String = "2.14.2"
val assertjVersion: String = "3.24.2"
val log4jVersion: String = "2.20.0"
val jacksonVersion: String = "2.18.0"
val assertjVersion: String = "3.26.3"
val jimfsVersion: String = "1.3.0"

dependencies {
Expand All @@ -66,12 +65,9 @@ dependencies {
testImplementation(group = "org.junit.platform", name = "junit-platform-testkit")

testImplementation(group = "org.assertj", name = "assertj-core", version = assertjVersion)
testImplementation(group = "org.mockito", name = "mockito-core", version = "5.5.0")
testImplementation(group = "org.mockito", name = "mockito-core", version = "5.14.1")
testImplementation(group = "com.google.jimfs", name = "jimfs", version = jimfsVersion)
testImplementation(group = "nl.jqno.equalsverifier", name = "equalsverifier", version = "3.15.1")

testRuntimeOnly(group = "org.apache.logging.log4j", name = "log4j-core", version = log4jVersion)
testRuntimeOnly(group = "org.apache.logging.log4j", name = "log4j-jul", version = log4jVersion)
testImplementation(group = "nl.jqno.equalsverifier", name = "equalsverifier", version = "3.17.1")
}

spotless {
Expand All @@ -88,7 +84,7 @@ spotless {
}

checkstyle {
toolVersion = "10.12.3"
toolVersion = "10.18.2"
configDirectory.set(rootProject.file(".infra/checkstyle"))
}

Expand All @@ -98,7 +94,7 @@ yamlValidator {
}

jacoco {
toolVersion = "0.8.9"
toolVersion = "0.8.12"
}

sonar {
Expand Down Expand Up @@ -249,7 +245,6 @@ tasks {
filter {
includeTestsMatching("*Tests")
}
systemProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager")
// java.security.manager was added in Java 12 (see
// https://www.oracle.com/java/technologies/javase/12-relnote-issues.html#JDK-8191053). We have to explicitly
// set it to "allow" for EnvironmentVariableUtilsTests$With_SecurityManager.
Expand Down

0 comments on commit 62693ff

Please sign in to comment.