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

SDK-1400 Improve Java DX #207

Merged
merged 6 commits into from
Aug 30, 2024
Merged

SDK-1400 Improve Java DX #207

merged 6 commits into from
Aug 30, 2024

Conversation

jhaven-stytch
Copy link
Contributor

Linear Ticket: SDK-1400

Changes:

  1. Adds @JvmStatic annotation to object properties (to prevent having to type StytchClient.INSTANCE.[property])
  2. Adds @JvmOverloads constructors to data classes, where applicable
  3. Changes our usage of UInt to simple Int (because Java doesn't have UInt, and UInt prevents usage of @JvmOverloads; also, we were casting it to Int before making the request anyway, so this reduces unnecessary overhead)
  4. Adds manual overloads for configure methods (ran into some oddities with @JvmOverloads on these methods)
  5. Made all top-level client properties val instead of vars with internal set, because it was causing the non-accessible setters to be visible; These were only set as var for unit tests, and I removed those few tests that relied on that.
  6. Adds a barebones Java example app (using StytchUI) for testing the above changes
  7. Ensure versions of libs/plugins are in sync between projects (need to move to version catalogs in a future ticket)
  8. Some general automated cleanup/linting from running Inspection tool

Notes:

Checklist:

  • I have verified that this change works in the relevant demo app, or N/A
  • I have added or updated any tests relevant to this change, or N/A
  • I have updated any relevant README files for this change, or N/A

@jhaven-stytch jhaven-stytch requested a review from a team as a code owner August 29, 2024 19:28
@jhaven-stytch jhaven-stytch merged commit 1688c87 into main Aug 30, 2024
4 checks passed
@jhaven-stytch jhaven-stytch deleted the jordan/SDK-1400-java-dx branch August 30, 2024 16:15
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.

2 participants