-
Notifications
You must be signed in to change notification settings - Fork 50
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
Java wrapper for SDK #179
Java wrapper for SDK #179
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow the .NET sdk and unwrap all responses. A consumer of the library shouldn't be exposed to the internal response models.
Workflows look good to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me, two small naming changes, but I don't think they are very important
Co-authored-by: Daniel García <[email protected]>
New Issues
Fixed Issues
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor nits, please also run intellij reformat code since many of the members can be made final.
languages/java/src/main/java/com/bitwarden/sdk/ProjectsClient.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit remaining in the readme, looks good otherwise.
Co-authored-by: Oscar Hinton <[email protected]>
Hi @dani-garcia @Hinton, I re-requested the review since some prechecks failed - a folder name for generate schemas wasn't updated after changing package name, and schemas.ts file needed prettier reformat. It seems I need approvals for prechecks to run again, hopefully they will pass this time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems the android workflow doesn't work correctly with external PRs and is failing, but that's not related to these changes.
Yes, android fails for all external PRs. I fixed a gradle issue that appeared on java workflow, it passes locally, but need to confirm if it now works on github environment |
The java workflow seems to be failing still. I can reproduce the issue locally if I copy the To solve it I just commented this whole block: /*
jar {
// Requires GitHub workflow to copy native library to resources
// Uncomment the line below and copyNativeLib task above to use the local build (modify architecture if needed)
// dependsOn tasks.named("copyNativeLib")
into('darwin-aarch64') {
from 'src/main/resources/darwin-aarch64'
}
into('darwin-x64') {
from 'src/main/resources/darwin-x64'
}
into('ubuntu-x64') {
from 'src/main/resources/ubuntu-x64'
}
into('windows-x64') {
from 'src/main/resources/windows-x64'
}
}
*/ The native libraries seem to be copied just fine as long as they are in the resources folder, and the error goes away, maybe that can work for CI too? For local development you can uncomment the copyNativeLib task and use that to copy the files to the correct place. |
Thanks for the suggestion, it does indeed copy all resources without the jar task, and I've think I managed to set it up to correctly to copy local libs when uncommented. |
Hi @dani-garcia @vgrassia @Hinton , please let me know if the current Build Java SDK workflow failure is expected on the forked repo - publishing the package gets 403 forbidden error. I am using the same approach as the android build, with secrets.GITHUB_TOKEN. |
Pull requests from forks don't have access to the repository secrets and the GH token is read only. I would expect the publish step to fail but all steps leading up to it should succeed. |
Type of change
Objective
Added a Maven-based Java project that wraps native C library for the SDK and exposed its commands through BitwardenClient class.
Code changes