Skip to content

feat: Update Kotlin SDK and fix all breaking changes#36

Merged
sidorchukandrew merged 2 commits intomainfrom
as/kotlin-updates
Jan 31, 2026
Merged

feat: Update Kotlin SDK and fix all breaking changes#36
sidorchukandrew merged 2 commits intomainfrom
as/kotlin-updates

Conversation

@sidorchukandrew
Copy link
Collaborator

Description

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation update
  • refactor: Code refactoring (no functional changes)
  • perf: Performance improvement
  • test: Test additions or updates
  • build: Build system or dependency changes
  • ci: CI configuration changes
  • chore: Other changes (maintenance, etc.)

Breaking Changes

  • This PR contains BREAKING CHANGES

Breaking Change Details:
This PR updates to the newest Kotlin SDK. There are a number of fields that have been updated that our translation layer needs to reflect.

Checklist

  • My code follows the project's code style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • All commit messages follow conventional commits format
  • I have updated the appropriate section in documentation (if needed)

@sidorchukandrew sidorchukandrew self-assigned this Jan 31, 2026
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 31, 2026

Greptile Overview

Greptile Summary

This PR updates the Kotlin SDK from version 0.5.0 to 0.6.0 and adapts the React Native SDK translation layer to match the upstream API changes.

Key Changes:

  • Updated SDK dependencies to 0.6.0 and added Kotlin Compose plugin configuration
  • Fixed API namespace: YouVersionApi.languageYouVersionApi.languages
  • Renamed fields to match SDK 0.6.0 schema:
    • defaultBibleVersionIddefaultBibleId
    • copyrightLong/copyrightShortpromotionalContent/copyright
    • usfmid (in BibleBook)
  • Added new fields: organizationId (BibleVersion), fullTitle (BibleBook)
  • Removed deprecated fields: bookUSFM, isCanonical (BibleChapter)
  • Modified SignInWithYouVersionButton to use permissions parameter instead of onClick handler

Critical Issue:

  • Line 60 in YVPRecords.kt contains a field mapping error where defaultBibleId is assigned from language.defaultBibleVersionId instead of language.defaultBibleId, causing a potential runtime error if the upstream SDK renamed this field

Confidence Score: 2/5

  • This PR has a critical syntax error that will likely cause runtime failures
  • Score reflects a field mapping bug on line 60 that references a potentially non-existent property name from the upstream SDK
  • android/src/main/java/com/youversion/reactnativesdk/api/YVPRecords.kt requires immediate attention to fix the defaultBibleId mapping

Important Files Changed

Filename Overview
android/src/main/java/com/youversion/reactnativesdk/api/YVPRecords.kt Updated field mappings to match SDK 0.6.0 schema changes, but contains field mapping error on line 60
android/src/main/java/com/youversion/reactnativesdk/views/YVPSignInWithYouVersionButton.kt Removed onClick handler and added permissions parameter with empty HashSet, includes commented code

Sequence Diagram

sequenceDiagram
    participant RN as React Native App
    participant SDK as ReactNative SDK
    participant API as YouVersion Platform SDK 0.6.0
    participant Models as Data Models

    Note over SDK,API: Language API Call Flow
    RN->>SDK: Request languages(country)
    SDK->>API: YouVersionApi.languages.languages(country)
    API-->>SDK: List<Language>
    SDK->>Models: Map to LanguageRecord
    Note over Models: Maps defaultBibleVersionId → defaultBibleId
    Models-->>SDK: List<LanguageRecord>
    SDK-->>RN: Return language records

    Note over SDK,API: Bible Version Data Flow
    RN->>SDK: Request bible version
    API-->>SDK: BibleVersion object
    SDK->>Models: Map to BibleVersionRecord
    Note over Models: copyrightLong → promotionalContent<br/>copyrightShort → copyright<br/>+ organizationId field
    Models-->>SDK: BibleVersionRecord
    SDK-->>RN: Return bible version

    Note over SDK,API: Bible Book Data Flow
    API-->>SDK: BibleBook object
    SDK->>Models: Map to BibleBookRecord
    Note over Models: usfm → id<br/>+ fullTitle field
    Models-->>SDK: BibleBookRecord

    Note over SDK,API: Bible Chapter Data Flow
    API-->>SDK: BibleChapter object
    SDK->>Models: Map to BibleChapterRecord
    Note over Models: Removed bookUSFM, isCanonical
    Models-->>SDK: BibleChapterRecord

    Note over RN,SDK: Sign In Button Flow
    RN->>SDK: Render SignInWithYouVersionButton
    SDK->>API: SignInWithYouVersionButton(permissions)
    Note over SDK: permissions: () → HashSet()
    API-->>SDK: Render button
    SDK-->>RN: Display button
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

Copy link
Collaborator

@mic-mart mic-mart left a comment

Choose a reason for hiding this comment

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

Thanks @sidorchukandrew ! Looks good. Thanks for replying to the greptile comments. That was helpful.

@sidorchukandrew sidorchukandrew merged commit 0e03b0e into main Jan 31, 2026
1 check passed
@sidorchukandrew sidorchukandrew deleted the as/kotlin-updates branch January 31, 2026 21:44
jhampton pushed a commit that referenced this pull request Jan 31, 2026
## 0.9.0 (2026-01-31)

* feat: Update Kotlin SDK and fix all breaking changes (#36) ([0e03b0e](0e03b0e)), closes [#36](#36)
* feat (android): add view module stubs for RN bridging (#31) ([66cf642](66cf642)), closes [#31](#31)
@github-actions
Copy link

🎉 This PR is included in version 0.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@greptile-apps greptile-apps bot mentioned this pull request Feb 2, 2026
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments