Skip to content

chore(deps): bump com.palantir.javapoet:javapoet from 0.12.0 to 0.14.0 #573

chore(deps): bump com.palantir.javapoet:javapoet from 0.12.0 to 0.14.0

chore(deps): bump com.palantir.javapoet:javapoet from 0.12.0 to 0.14.0 #573

name: API Compatibility & Version Bump
on:
pull_request:
types: [ opened, synchronize, reopened ]
permissions:
contents: write
pull-requests: write
jobs:
api-check:
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0 # required to compare API changes
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: 'graalvm'
java-version: '25'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
- name: Run Kotlin Binary Compatibility Check
id: check_api
run: |
set +e
./gradlew checkKotlinAbi
CHECK_EXIT=$?
echo "check_exit=$CHECK_EXIT" >> $GITHUB_OUTPUT
set -e
- name: Detect API changes
id: changes
run: |
if [ "${{ steps.check_api.outputs.check_exit }}" -eq 0 ]; then
echo "api_changed=false" >> $GITHUB_OUTPUT
echo "✅ No API changes detected."
else
echo "api_changed=true" >> $GITHUB_OUTPUT
echo "❌ API changes detected! To update the reference, run './gradlew updateKotlinAbi' locally and commit the changes." >&2
fi
- name: Comment on PR if API changed
if: steps.changes.outputs.api_changed == 'true'
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body: |
⚠️ **API/ABI changes detected!**
This PR contains changes that modified the public API. To update the reference ABI dumps:
```bash
./gradlew updateKotlinAbi
git add **/api/**
git commit -m "Update ABI reference"
git push
```
After updating, the CI will pass. Make sure the changes are backward compatible.
- name: Detect manual version change
id: ver
run: |
git fetch origin ${{ github.event.pull_request.base.ref }}
if git diff origin/${{ github.event.pull_request.base.ref }} -- gradle.properties | grep -q '^+version='; then
echo "manual=true" >>"$GITHUB_OUTPUT"
else
echo "manual=false" >>"$GITHUB_OUTPUT"
fi
- name: Bump version in gradle.properties
if: steps.changes.outputs.api_changed == 'true' && steps.ver.outputs.manual == 'false'
run: |
version_file=gradle.properties
current_version=$(grep -E '^version=' "$version_file" | cut -d= -f2)
IFS='.-' read -r major minor patch lib_major lib_minor lib_patch <<<"$current_version"
lib_minor=$((lib_minor + 1))
lib_patch=0
new_version="$major.$minor.$patch-$lib_major.$lib_minor.$lib_patch"
echo "Bumping version: $current_version → $new_version"
sed -i "s/^version=.*/version=$new_version/" "$version_file"
- name: Commit and push changes
if: steps.changes.outputs.api_changed == 'true'
run: |
if git diff --quiet; then
echo "No changes to commit."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add gradle.properties '**/api/**'
git commit -m "chore: update ABI and bump version [skip ci]"
git push