Compare commits

..

No commits in common. "b2a67a1262ce81176048d2a996358a0ca2a2454c" and "0e7a31fd1ef840301c34f480460812fd73e97a98" have entirely different histories.

6 changed files with 26 additions and 28 deletions

View file

@ -1,6 +1,6 @@
name: bld-ci name: bld-ci
on: [push, pull_request, workflow_dispatch] on: [ push, pull_request, workflow_dispatch ]
jobs: jobs:
build-bld-project: build-bld-project:
@ -8,7 +8,7 @@ jobs:
strategy: strategy:
matrix: matrix:
java-version: [17, 21, 23] java-version: [ 17, 21, 22 ]
steps: steps:
- name: Checkout source repository - name: Checkout source repository

View file

@ -7,9 +7,9 @@
<!-- BEST PRACTICES --> <!-- BEST PRACTICES -->
<rule ref="category/java/bestpractices.xml"> <rule ref="category/java/bestpractices.xml">
<exclude name="AvoidPrintStackTrace"/> <exclude name="AvoidPrintStackTrace"/>
<exclude name="JUnit4TestShouldUseTestAnnotation"/>
<exclude name="JUnitTestContainsTooManyAsserts"/>
<exclude name="GuardLogStatement"/> <exclude name="GuardLogStatement"/>
<exclude name="UnitTestContainsTooManyAsserts"/>
<exclude name="UnitTestShouldUseTestAnnotation"/>
</rule> </rule>
<rule ref="category/java/bestpractices.xml/MissingOverride"> <rule ref="category/java/bestpractices.xml/MissingOverride">

View file

@ -25,8 +25,8 @@ public class ExamplesBuild extends Project {
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL); repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL);
scope(test) scope(test)
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 3))) .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 0)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 3))); .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 0)));
} }
public static void main(String[] args) { public static void main(String[] args) {

View file

@ -2,6 +2,6 @@ bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true bld.downloadExtensionSources=true
bld.downloadLocation= bld.downloadLocation=
bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.3 bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.3
bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.7 bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.5
bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.version=2.1.0 bld.version=2.1.0

View file

@ -40,7 +40,6 @@ public class JacocoReportOperationBuild extends Project {
downloadSources = true; downloadSources = true;
autoDownloadPurge = true; autoDownloadPurge = true;
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES, RIFE2_SNAPSHOTS); repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES, RIFE2_SNAPSHOTS);
var jacocoVersion = new VersionNumber(0, 8, 12); var jacocoVersion = new VersionNumber(0, 8, 12);
@ -48,8 +47,8 @@ public class JacocoReportOperationBuild extends Project {
.include(dependency("org.jacoco", "jacoco", jacocoVersion).exclude("*", "org.jacoco.doc")) .include(dependency("org.jacoco", "jacoco", jacocoVersion).exclude("*", "org.jacoco.doc"))
.include(dependency("com.uwyn.rife2", "bld", version(2, 1, 0))); .include(dependency("com.uwyn.rife2", "bld", version(2, 1, 0)));
scope(test) scope(test)
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 3))) .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 0)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 3))) .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 0)))
.include(dependency("org.assertj", "assertj-core", version(3, 26, 3))); .include(dependency("org.assertj", "assertj-core", version(3, 26, 3)));
javadocOperation() javadocOperation()
@ -61,25 +60,27 @@ public class JacocoReportOperationBuild extends Project {
publishOperation() publishOperation()
.repository(version.isSnapshot() ? repository("rife2-snapshot") : repository("rife2")) .repository(version.isSnapshot() ? repository("rife2-snapshot") : repository("rife2"))
.repository(repository("github"))
.info() .info()
.groupId("com.uwyn.rife2") .groupId("com.uwyn.rife2")
.artifactId("bld-jacoco-report") .artifactId("bld-jacoco-report")
.description("bld Extension to Generate JaCoCo Code Coverage Reports") .description("bld Extension to Generate JaCoCo Code Coverage Reports")
.url("https://github.com/rife2/bld-pmd") .url("https://github.com/rife2/bld-pmd")
.developer(new PublishDeveloper() .developer(
.id("ethauvin") new PublishDeveloper()
.name("Erik C. Thauvin") .id("ethauvin")
.email("erik@thauvin.net") .name("Erik C. Thauvin")
.url("https://erik.thauvin.net/") .email("erik@thauvin.net")
.url("https://erik.thauvin.net/")
) )
.license(new PublishLicense() .license(
.name("The Apache License, Version 2.0") new PublishLicense()
.url("https://www.apache.org/licenses/LICENSE-2.0.txt") .name("The Apache License, Version 2.0")
.url("https://www.apache.org/licenses/LICENSE-2.0.txt")
) )
.scm(new PublishScm().connection("scm:git:https://github.com/rife2/bld-pmd.git") .scm(
.developerConnection("scm:git:git@github.com:rife2/bld-pmd.git") new PublishScm().connection("scm:git:https://github.com/rife2/bld-pmd.git")
.url("https://github.com/rife2/bld-pmd") .developerConnection("scm:git:git@github.com:rife2/bld-pmd.git")
.url("https://github.com/rife2/bld-pmd")
) )
.signKey(property("sign.key")) .signKey(property("sign.key"))
.signPassphrase(property("sign.passphrase")); .signPassphrase(property("sign.passphrase"));

View file

@ -16,7 +16,6 @@
package rife.bld.extension; package rife.bld.extension;
import org.assertj.core.api.AutoCloseableSoftAssertions;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import rife.bld.Project; import rife.bld.Project;
import rife.bld.operations.exceptions.ExitStatusException; import rife.bld.operations.exceptions.ExitStatusException;
@ -89,11 +88,9 @@ class JacocoReportOperationTest {
assertThat(csv).exists(); assertThat(csv).exists();
assertThat(html).isDirectory(); assertThat(html).isDirectory();
assertThat(xml).exists(); assertThat(xml).exists();
try (var softly = new AutoCloseableSoftAssertions()) { try (var lines = Files.lines(xml.toPath())) {
try (var lines = Files.lines(xml.toPath())) { assertThat(lines.anyMatch(s ->
softly.assertThat(lines.anyMatch(s -> s.contains("<counter type=\"INSTRUCTION\" missed=\"0\" covered=\"3\"/>"))).isTrue();
s.contains("<counter type=\"INSTRUCTION\" missed=\"0\" covered=\"3\"/>"))).isTrue();
}
} }
assertThat(Path.of(html.getPath(), "com.example", "Examples.java.html")).exists(); assertThat(Path.of(html.getPath(), "com.example", "Examples.java.html")).exists();