Skip to content

Commit c7a2018

Browse files
committed
Restore code coverage via kover-maven-plugin
1 parent b0d0b24 commit c7a2018

9 files changed

Lines changed: 89 additions & 105 deletions

File tree

‎.github/workflows/binary-compatibility.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
permissions: {}
1212

1313
env:
14-
MAVEN_ARGS: -B -V -ntp -e -Djansi.passthrough=true -Dstyle.color=always -DskipTests
14+
MAVEN_ARGS: -B -V -ntp -e -Djansi.passthrough=true -Dstyle.color=always -Dkover.skip=true -DskipTests
1515

1616
jobs:
1717
verify-with-base:

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ permissions:
77
contents: write
88

99
env:
10-
MAVEN_ARGS: -B -V -ntp -e -Djansi.passthrough=true -Dstyle.color=always -Djacoco.skip=true
10+
MAVEN_ARGS: -B -V -ntp -e -Djansi.passthrough=true -Dstyle.color=always
1111

1212
jobs:
1313

‎assertj-core/pom.xml‎

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
</argLine>
2727
<rootDirectory>${project.basedir}/../</rootDirectory>
2828
<spotless.skip>false</spotless.skip>
29-
<jacoco.skip>true</jacoco.skip> <!-- https://github.com/assertj/assertj/issues/3580 -->
3029
<!-- Dependency versions -->
3130
<byte-buddy.version>1.18.3</byte-buddy.version>
3231
<hamcrest.version>3.0</hamcrest.version>
@@ -414,22 +413,15 @@
414413
</executions>
415414
</plugin>
416415
<plugin>
417-
<groupId>org.jacoco</groupId>
418-
<artifactId>jacoco-maven-plugin</artifactId>
419-
<configuration>
420-
<rules>
421-
<rule implementation="org.jacoco.maven.RuleConfiguration">
422-
<element>BUNDLE</element>
423-
<limits>
424-
<limit implementation="org.jacoco.report.check.Limit">
425-
<counter>CLASS</counter>
426-
<value>COVEREDRATIO</value>
427-
<minimum>0.98</minimum>
428-
</limit>
429-
</limits>
430-
</rule>
431-
</rules>
432-
</configuration>
416+
<groupId>org.jetbrains.kotlinx</groupId>
417+
<artifactId>kover-maven-plugin</artifactId>
418+
<executions>
419+
<execution>
420+
<goals>
421+
<goal>instrumentation</goal>
422+
</goals>
423+
</execution>
424+
</executions>
433425
</plugin>
434426
<plugin>
435427
<groupId>org.sonatype.central</groupId>

‎assertj-guava/pom.xml‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,15 @@
177177
</executions>
178178
</plugin>
179179
<plugin>
180-
<groupId>org.jacoco</groupId>
181-
<artifactId>jacoco-maven-plugin</artifactId>
182-
<configuration>
183-
<excludes>
184-
<!-- exclude deprecated classes -->
185-
<exclude>org/assertj/guava/data/MapEntry*</exclude>
186-
</excludes>
187-
</configuration>
180+
<groupId>org.jetbrains.kotlinx</groupId>
181+
<artifactId>kover-maven-plugin</artifactId>
182+
<executions>
183+
<execution>
184+
<goals>
185+
<goal>instrumentation</goal>
186+
</goals>
187+
</execution>
188+
</executions>
188189
</plugin>
189190
<plugin>
190191
<groupId>org.sonatype.central</groupId>

‎assertj-parent/pom.xml‎

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
<opentest4j.version>1.3.0</opentest4j.version>
2525
<!-- Plugin versions -->
2626
<bnd.version>7.2.1</bnd.version>
27-
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
2827
<japicmp-maven-plugin.version>0.23.0</japicmp-maven-plugin.version>
2928
<maven-project-info-reports-plugin.version>3.8.0</maven-project-info-reports-plugin.version>
3029
<spotbugs-maven-plugin.version>4.8.6.6</spotbugs-maven-plugin.version>
@@ -98,71 +97,6 @@
9897
<artifactId>spotbugs-maven-plugin</artifactId>
9998
<version>${spotbugs-maven-plugin.version}</version>
10099
</plugin>
101-
<plugin>
102-
<groupId>org.jacoco</groupId>
103-
<artifactId>jacoco-maven-plugin</artifactId>
104-
<version>${jacoco-maven-plugin.version}</version>
105-
<configuration>
106-
<!-- default check ratio : can be overridden in inherited projects -->
107-
<rules>
108-
<rule implementation="org.jacoco.maven.RuleConfiguration">
109-
<element>BUNDLE</element>
110-
<limits>
111-
<limit implementation="org.jacoco.report.check.Limit">
112-
<counter>CLASS</counter>
113-
<value>COVEREDRATIO</value>
114-
<minimum>1</minimum>
115-
</limit>
116-
<limit implementation="org.jacoco.report.check.Limit">
117-
<counter>INSTRUCTION</counter>
118-
<value>COVEREDRATIO</value>
119-
<minimum>0.80</minimum>
120-
</limit>
121-
<limit implementation="org.jacoco.report.check.Limit">
122-
<counter>METHOD</counter>
123-
<value>COVEREDRATIO</value>
124-
<minimum>0.80</minimum>
125-
</limit>
126-
<limit implementation="org.jacoco.report.check.Limit">
127-
<counter>BRANCH</counter>
128-
<value>COVEREDRATIO</value>
129-
<minimum>0.80</minimum>
130-
</limit>
131-
<limit implementation="org.jacoco.report.check.Limit">
132-
<counter>COMPLEXITY</counter>
133-
<value>COVEREDRATIO</value>
134-
<minimum>0.80</minimum>
135-
</limit>
136-
<limit implementation="org.jacoco.report.check.Limit">
137-
<counter>LINE</counter>
138-
<value>COVEREDRATIO</value>
139-
<minimum>0.80</minimum>
140-
</limit>
141-
</limits>
142-
</rule>
143-
</rules>
144-
</configuration>
145-
<executions>
146-
<execution>
147-
<id>prepare-agent</id>
148-
<goals>
149-
<goal>prepare-agent</goal>
150-
</goals>
151-
</execution>
152-
<execution>
153-
<id>jacoco-report</id>
154-
<goals>
155-
<goal>report</goal>
156-
</goals>
157-
</execution>
158-
<execution>
159-
<id>default-check</id>
160-
<goals>
161-
<goal>check</goal>
162-
</goals>
163-
</execution>
164-
</executions>
165-
</plugin>
166100
<plugin>
167101
<groupId>org.apache.maven.plugins</groupId>
168102
<artifactId>maven-project-info-reports-plugin</artifactId>

‎assertj-tests/assertj-integration-tests/assertj-core-tests/pom.xml‎

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@
2626
</properties>
2727

2828
<dependencies>
29+
<!-- Compile -->
30+
<dependency>
31+
<groupId>org.assertj</groupId>
32+
<artifactId>assertj-core</artifactId>
33+
<version>${project.version}</version>
34+
</dependency>
35+
<!-- Test -->
2936
<dependency>
3037
<groupId>com.fasterxml.jackson.core</groupId>
3138
<artifactId>jackson-databind</artifactId>
@@ -67,12 +74,6 @@
6774
<version>3.17.0</version>
6875
<scope>test</scope>
6976
</dependency>
70-
<dependency>
71-
<groupId>org.assertj</groupId>
72-
<artifactId>assertj-core</artifactId>
73-
<version>${project.version}</version>
74-
<scope>test</scope>
75-
</dependency>
7677
<dependency>
7778
<groupId>org.junit.jupiter</groupId>
7879
<artifactId>junit-jupiter</artifactId>
@@ -99,6 +100,23 @@
99100

100101
<build>
101102
<plugins>
103+
<plugin>
104+
<groupId>org.jetbrains.kotlinx</groupId>
105+
<artifactId>kover-maven-plugin</artifactId>
106+
<configuration combine.children="append">
107+
<aggregate>true</aggregate>
108+
</configuration>
109+
<executions>
110+
<execution>
111+
<goals>
112+
<goal>instrumentation</goal>
113+
<goal>verify</goal>
114+
<goal>log</goal> <!-- FIXME remove -->
115+
<goal>report-xml</goal>
116+
</goals>
117+
</execution>
118+
</executions>
119+
</plugin>
102120
<plugin>
103121
<groupId>org.pitest</groupId>
104122
<artifactId>pitest-maven</artifactId>

‎assertj-tests/assertj-integration-tests/assertj-guava-tests/pom.xml‎

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,17 @@
1818
</properties>
1919

2020
<dependencies>
21-
<dependency>
22-
<groupId>com.google.guava</groupId>
23-
<artifactId>guava</artifactId>
24-
<version>33.5.0-jre</version>
25-
<scope>test</scope>
26-
</dependency>
21+
<!-- Compile -->
2722
<dependency>
2823
<groupId>org.assertj</groupId>
2924
<artifactId>assertj-guava</artifactId>
3025
<version>${project.version}</version>
26+
</dependency>
27+
<!-- Test -->
28+
<dependency>
29+
<groupId>com.google.guava</groupId>
30+
<artifactId>guava</artifactId>
31+
<version>33.5.0-jre</version>
3132
<scope>test</scope>
3233
</dependency>
3334
<dependency>
@@ -39,6 +40,23 @@
3940

4041
<build>
4142
<plugins>
43+
<plugin>
44+
<groupId>org.jetbrains.kotlinx</groupId>
45+
<artifactId>kover-maven-plugin</artifactId>
46+
<configuration combine.children="append">
47+
<aggregate>true</aggregate>
48+
</configuration>
49+
<executions>
50+
<execution>
51+
<goals>
52+
<goal>instrumentation</goal>
53+
<goal>verify</goal>
54+
<goal>log</goal> <!-- FIXME remove -->
55+
<goal>report-xml</goal>
56+
</goals>
57+
</execution>
58+
</executions>
59+
</plugin>
4260
<plugin>
4361
<groupId>org.pitest</groupId>
4462
<artifactId>pitest-maven</artifactId>

‎assertj-tests/pom.xml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
<rules combine.children="append">
3838
<bannedDependencies>
3939
<includes>
40+
<include>net.bytebuddy:byte-buddy:*:jar:compile</include>
41+
<include>org.assertj:assertj-core:*:jar:compile</include>
42+
<include>org.assertj:assertj-guava:*:jar:compile</include>
4043
<include>*:*:*:jar:test</include>
4144
</includes>
4245
<excludes>

‎pom.xml‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@
124124
<arcmutate-pitest.version>2.3.3</arcmutate-pitest.version>
125125
<central-publishing-maven-plugin.version>0.11.0</central-publishing-maven-plugin.version>
126126
<flatten-maven-plugin.version>1.8.0</flatten-maven-plugin.version>
127+
<kover-maven-plugin.version>0.9.9</kover-maven-plugin.version>
127128
<license-maven-plugin.version>5.1.2</license-maven-plugin.version>
128129
<maven-clean-plugin.version>3.5.0</maven-clean-plugin.version>
129130
<maven-compiler-plugin.version>3.15.0</maven-compiler-plugin.version>
@@ -306,6 +307,23 @@
306307
<artifactId>flatten-maven-plugin</artifactId>
307308
<version>${flatten-maven-plugin.version}</version>
308309
</plugin>
310+
<plugin>
311+
<groupId>org.jetbrains.kotlinx</groupId>
312+
<artifactId>kover-maven-plugin</artifactId>
313+
<version>${kover-maven-plugin.version}</version>
314+
<configuration>
315+
<rules>
316+
<rule>
317+
<bounds>
318+
<bound>
319+
<coverageUnits>LINE</coverageUnits>
320+
<minValue>80</minValue>
321+
</bound>
322+
</bounds>
323+
</rule>
324+
</rules>
325+
</configuration>
326+
</plugin>
309327
<plugin>
310328
<groupId>org.pitest</groupId>
311329
<artifactId>pitest-maven</artifactId>

0 commit comments

Comments
 (0)