Skip to content

Commit

Permalink
Merge pull request #2616 from hgschmie/japicmp
Browse files Browse the repository at this point in the history
Introduce japicmp for API diffing
  • Loading branch information
hgschmie committed Jan 31, 2024
2 parents 78dbaf1 + a7e077a commit 6c4222b
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/cd.yml
Expand Up @@ -12,6 +12,9 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0

- uses: actions/setup-java@v4
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/doc.yml
@@ -1,3 +1,4 @@
---
name: Documentation build

on:
Expand All @@ -14,6 +15,9 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0

- uses: actions/setup-java@v4
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/style.yml
@@ -1,5 +1,5 @@
---
name: Code style analysis
name: Run all code checkers (style, static analysis, api versions etc.)

on:
push:
Expand All @@ -19,6 +19,9 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0

- uses: actions/setup-java@v4
with:
Expand Down
1 change: 1 addition & 0 deletions benchmark/pom.xml
Expand Up @@ -32,6 +32,7 @@
<basepom.check.skip-spotbugs>true</basepom.check.skip-spotbugs>
<basepom.deploy.skip>true</basepom.deploy.skip>
<dep.jmh.version>1.37</dep.jmh.version>
<jdbi.check.skip-japicmp>true</jdbi.check.skip-japicmp>
<moduleName>org.jdbi.v3.benchmark</moduleName>
<uberjar.name>benchmarks</uberjar.name>
</properties>
Expand Down
1 change: 1 addition & 0 deletions docs/pom.xml
Expand Up @@ -41,6 +41,7 @@
<basepom.site.scm.site-path>/</basepom.site.scm.site-path>
<basepom.site.scm.skip-deploy>false</basepom.site.scm.skip-deploy>
<basepom.site.scm.url>scm:git:https://github.com/jdbi/jdbi.github.io</basepom.site.scm.url>
<jdbi.check.skip-japicmp>true</jdbi.check.skip-japicmp>
<moduleName>org.jdbi.v3.docs</moduleName>
</properties>

Expand Down
1 change: 1 addition & 0 deletions e2e/pom.xml
Expand Up @@ -32,6 +32,7 @@
<basepom.install.skip>true</basepom.install.skip>
<!-- docker tests run long -->
<basepom.test.timeout>600</basepom.test.timeout>
<jdbi.check.skip-japicmp>true</jdbi.check.skip-japicmp>
<moduleName>org.jdbi.v3.e2e</moduleName>
<!-- e2e tests can use all java 17 features. -->
<!-- current PMD 6.xx does not allow upgrade to full 21 yet -->
Expand Down
76 changes: 76 additions & 0 deletions internal/build/pom.xml
Expand Up @@ -115,6 +115,7 @@
<dep.plugin.dokka.version>1.9.0</dep.plugin.dokka.version>
<dep.plugin.flatten.version>1.5.0</dep.plugin.flatten.version>
<dep.plugin.inline.version>1.3.0</dep.plugin.inline.version>
<dep.plugin.japicmp.version>0.18.3</dep.plugin.japicmp.version>
<dep.plugin.kotlin.version>1.9.22</dep.plugin.kotlin.version>
<dep.plugin.ktlint.version>2.0.0</dep.plugin.ktlint.version>
<dep.plugin.sortpom.version>3.3.0</dep.plugin.sortpom.version>
Expand All @@ -126,9 +127,11 @@
<dep.testcontainers.version>1.19.4</dep.testcontainers.version>
<dep.vavr.version>0.9.3</dep.vavr.version>
<jdbi.check.fail-detekt>${jdbi.check.fail-kotlin}</jdbi.check.fail-detekt>
<jdbi.check.fail-japicmp>${basepom.check.fail-extended}</jdbi.check.fail-japicmp>
<jdbi.check.fail-kotlin>${basepom.check.fail-extended}</jdbi.check.fail-kotlin>
<jdbi.check.fail-ktlint>${jdbi.check.fail-kotlin}</jdbi.check.fail-ktlint>
<jdbi.check.skip-detekt>${jdbi.check.skip-kotlin}</jdbi.check.skip-detekt>
<jdbi.check.skip-japicmp>${basepom.check.skip-extended}</jdbi.check.skip-japicmp>
<jdbi.check.skip-kotlin>${basepom.check.skip-extended}</jdbi.check.skip-kotlin>
<jdbi.check.skip-ktlint>${jdbi.check.skip-kotlin}</jdbi.check.skip-ktlint>
<jdbi.check.skip-sortpom>${basepom.check.skip-basic}</jdbi.check.skip-sortpom>
Expand Down Expand Up @@ -831,6 +834,42 @@
<hideClasses>true</hideClasses>
</configuration>
</plugin>

<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<version>${dep.plugin.japicmp.version}</version>
<configuration>
<skip>${jdbi.check.skip-japicmp}</skip>
<parameter>
<onlyModified>true</onlyModified>
<skipPomModules>true</skipPomModules>
<ignoreNonResolvableArtifacts>true</ignoreNonResolvableArtifacts>
<breakBuildBasedOnSemanticVersioning>${jdbi.check.fail-japicmp}</breakBuildBasedOnSemanticVersioning>

<excludes>
<exclude>*.internal.*</exclude>
<exclude>@org.jdbi.v3.meta.Alpha</exclude>
<exclude>@org.jdbi.v3.meta.Beta</exclude>
</excludes>
</parameter>

<oldVersion>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${jdbi.build.previous-version}</version>
<type>jar</type>
</dependency>
</oldVersion>
<newVersion>
<file>
<path>${project.build.directory}/${project.artifactId}-${project.version}.${project.packaging}</path>
</file>
</newVersion>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down Expand Up @@ -901,6 +940,43 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.basepom.maven</groupId>
<artifactId>property-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>japicmp</id>
<goals>
<goal>get</goal>
</goals>
<phase>verify</phase>
<configuration>
<strings>
<string>
<id>jdbi.build.previous-version</id>
<export>true</export>
<values>
<value>@{git.closest.tag.name}</value>
</values>
<regexp>^v(.*)$</regexp>
</string>
</strings>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>cmp</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
1 change: 1 addition & 0 deletions noparameters/pom.xml
Expand Up @@ -33,6 +33,7 @@

<basepom.deploy.skip>true</basepom.deploy.skip>
<basepom.install.skip>true</basepom.install.skip>
<jdbi.check.skip-japicmp>true</jdbi.check.skip-japicmp>
<moduleName>org.jdbi.v3.noparameters</moduleName>
</properties>

Expand Down

0 comments on commit 6c4222b

Please sign in to comment.