diff --git a/.github/workflows/build-gradle-project.yml b/.github/workflows/build-gradle-project.yml index 0e81305..c95a157 100644 --- a/.github/workflows/build-gradle-project.yml +++ b/.github/workflows/build-gradle-project.yml @@ -27,7 +27,7 @@ jobs: cache: 'gradle' - name: Run Gradle Testing and Create Coverage Report - run: sh gradlew build -Pcoverage=true + run: sh gradlew build -PcreateReports - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4 diff --git a/build.gradle b/build.gradle index a89adc2..f614d18 100644 --- a/build.gradle +++ b/build.gradle @@ -17,13 +17,13 @@ java { } dependencies { - implementation 'junit:junit:4.13.1' - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1' + implementation 'junit:junit:4.13.2' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.2' // https://mvnrepository.com/artifact/commons-io/commons-io - implementation 'commons-io:commons-io:2.14.0' - implementation 'org.apache.logging.log4j:log4j-core:2.19.0' + implementation 'commons-io:commons-io:2.16.1' + implementation 'org.apache.logging.log4j:log4j-core:3.0.0-beta1' implementation fileTree(dir: 'libs', include: ['*.jar']) } @@ -53,18 +53,29 @@ tasks.withType(JavaCompile).configureEach { jacocoTestReport { reports { - // By default do NOT create reports - if (project.hasProperty("coverage")) { - xml.required=true - html.required=true + if (project.hasProperty("createReports")) { + xml.required = true + html.required = true } else { - xml.required=false - html.required=false + html.required = false + xml.required = false } } } +tasks.withType(Test).configureEach { + if (project.hasProperty("createReports")) { + reports.html.required = true + reports.junitXml.required = true + } + else { + reports.html.required = false + reports.junitXml.required = false + } + +} + clean { delete 'logs/ppdt.log' }