Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(java): add api compat check #1335

Merged
merged 8 commits into from
Feb 27, 2023
Merged

chore(java): add api compat check #1335

merged 8 commits into from
Feb 27, 2023

Conversation

aallam
Copy link
Member

@aallam aallam commented Feb 23, 2023

🧭 What and Why

Compares the current generated code with the latest published version (snapshots included).

To public API check is done using japicmp-gradle-plugin.
In case on an incompatibility, the build will fail. The report should be available under api/build/reports.

🎟 JIRA Ticket: APIC-645

Changes included:

  • Add a api package to Java API client
  • Add a job to run the :api:japicmp

Compares the current generated code with the latest published version
(snapshots included).
Run with `./gradlew :api:japicmp`. In case on an incompatibility, the
build will fail. The report should be available under `api/build/reports`.
@netlify
Copy link

netlify bot commented Feb 23, 2023

Deploy Preview for api-clients-automation ready!

Name Link
🔨 Latest commit 9151853
🔍 Latest deploy log https://app.netlify.com/sites/api-clients-automation/deploys/63fcd0206852240008c04701
😎 Deploy Preview https://deploy-preview-1335--api-clients-automation.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@algolia-bot
Copy link
Collaborator

algolia-bot commented Feb 23, 2023

✗ The generated branch has been deleted.

If the PR has been merged, you can check the generated code on the main branch.
You can still access the code generated on main via this commit.

@aallam aallam marked this pull request as ready for review February 23, 2023 09:59
@aallam aallam requested a review from a team as a code owner February 23, 2023 09:59
Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😮 nice!

btw should be gitignore the bin for the playground/tests folders?

@aallam
Copy link
Member Author

aallam commented Feb 23, 2023

btw should be gitignore the bin for the playground/tests folders?

Yes, it shouldn't be included indeed, gradle should build the folder at runtime

Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice ! Would be very useful for other languages too, but I have never heard of this library before, not sure if it's available elsewhere

@aallam aallam changed the title feat(java): add api compat check chore(java): add api compat check Feb 23, 2023
@aallam
Copy link
Member Author

aallam commented Feb 23, 2023

Nice ! Would be very useful for other languages too, but I have never heard of this library before, not sure if it's available elsewhere

Yes indeed! especially for strongly typed languages! I know that similar ideas exists for other languages such as kotlin, go and rust. It is definitely worth to look more into this!

Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice !
Looks like this is pretty fast too run also :)

@aallam aallam enabled auto-merge (squash) February 27, 2023 15:45
@aallam aallam merged commit d7b03ae into main Feb 27, 2023
@aallam aallam deleted the feat/java-api branch February 27, 2023 15:58
algolia-bot added a commit to algolia/algoliasearch-client-java that referenced this pull request Feb 27, 2023
algolia/api-clients-automation#1335

Co-authored-by: Mouaad Aallam <Mouaad@Aallam.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants