Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions .github/workflows/gradle-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Gradle Plugin

on:
pull_request:
branches:
- main
paths:
- gradle-plugin/**
- core/**
- .github/workflows/gradle-plugin.yml
push:
branches:
- main
paths:
- gradle-plugin/**
- core/**
- .github/workflows/gradle-plugin.yml
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build & test
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 30
defaults:
run:
working-directory: gradle-plugin
steps:
- uses: actions/checkout@v6

- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'temurin'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
build-root-directory: gradle-plugin

- name: Build Gradle plugin
run: ./gradlew build

- name: Publish test results
uses: dorny/test-reporter@v3
if: always()
with:
name: Gradle Plugin Tests
path: gradle-plugin/build/test-results/test/*.xml
reporter: java-junit
fail-on-error: true

snapshot:
name: Publish snapshot
if: github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 30
defaults:
run:
working-directory: gradle-plugin
steps:
- uses: actions/checkout@v6

- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'temurin'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
build-root-directory: gradle-plugin

- name: Stage Gradle plugin snapshot
run: ./gradlew publish

- name: Deploy snapshot with JReleaser
run: ./gradlew jreleaserDeploy
env:
JRELEASER_GITHUB_TOKEN: ${{ github.token }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
JRELEASER_MAVENCENTRAL_SONATYPE_USERNAME: ${{ secrets.NEXUS_USERNAME }}
JRELEASER_MAVENCENTRAL_SONATYPE_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,43 @@ jobs:
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
JRELEASER_MAVENCENTRAL_RELEASE_DEPLOY_USERNAME: ${{ secrets.NEXUS_USERNAME }}
JRELEASER_MAVENCENTRAL_RELEASE_DEPLOY_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}

publish-gradle-plugin:
name: Publish Gradle plugin
needs: verify
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 30
defaults:
run:
working-directory: gradle-plugin
steps:
- uses: actions/checkout@v6

- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'temurin'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
build-root-directory: gradle-plugin

- name: Extract version from tag
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_ENV"

- name: Stage Gradle plugin artifacts
run: ./gradlew publish -Pversion="$VERSION"

- name: Publish Gradle plugin with JReleaser
run: ./gradlew jreleaserFullRelease -Pversion="$VERSION"
env:
JRELEASER_GITHUB_TOKEN: ${{ github.token }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
JRELEASER_MAVENCENTRAL_SONATYPE_USERNAME: ${{ secrets.NEXUS_USERNAME }}
JRELEASER_MAVENCENTRAL_SONATYPE_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Roseau (/ʁozo/) is a **fast** and **[accurate](ACCURACY.md)** tool for detecting breaking changes between library versions, similar to tools like [japicmp](https://github.com/siom79/japicmp/) or [Revapi](https://github.com/revapi/revapi/).
Whether you're a library maintainer or upgrading dependencies in your projects, Roseau helps ensure backward compatibility across versions.
Roseau analyzes both JAR files and source code, is highly configurable, and includes a dedicated Maven plug-in.
Roseau analyzes both JAR files and source code, is highly configurable, and includes dedicated Maven and Gradle plug-ins.

The official user documentation is available at [https://alien-tools.github.io/roseau/](https://alien-tools.github.io/roseau/).

Expand All @@ -15,7 +15,7 @@ The official user documentation is available at [https://alien-tools.github.io/r
- Supports Java up to version 25 (including records, sealed types, modules, etc.)
- Outputs reports in CSV, HTML, JSON, and Markdown formats
- Highly configurable, CLI-first, and scriptable
- Maven plug-in, integration with Gradle
- Dedicated Maven and Gradle plug-ins

Like other JAR-based tools, Roseau integrates smoothly into CI pipelines and can analyze artifacts from remote repositories such as Maven Central.
Unlike others, Roseau can also analyze source code directly, making it ideal for checking commits, pull requests, or local changes in an IDE, as well as libraries hosted on platforms like GitHub for which compiled JARs are not readily available.
Expand Down Expand Up @@ -148,7 +148,32 @@ The minimal setup is to bind the `check` goal and provide a baseline:

### In a Gradle build

Gradle builds can run Roseau through the published CLI artifact. A minimal Kotlin DSL setup is:
Roseau provides a dedicated Gradle plug-in (`io.github.alien-tools.roseau`):

```kotlin
// build.gradle.kts
buildscript {
repositories { mavenCentral() }
dependencies { classpath("io.github.alien-tools:roseau-gradle-plugin:0.7.0") }
}
apply(plugin = "io.github.alien-tools.roseau")

roseau {
mvnCoord = "com.example:my-library"
v1 = "1.0.0" // baseline version
failOnBreaking = true

excludes {
annotation("org.apiguardian.api.API") {
arg("status", "INTERNAL")
}
}
}
```

Run with `./gradlew roseauCheck`. See the [Gradle guide](https://alien-tools.github.io/roseau/guides/gradle/) for full documentation.

Alternatively, Gradle builds can also invoke Roseau through the CLI artifact:

```kotlin
val roseau by configurations.creating
Expand Down
Loading
Loading