-
Notifications
You must be signed in to change notification settings - Fork 1
SOLAPI Kotlin SDK 1.1.0 #4
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
base: main
Are you sure you want to change the base?
Conversation
…details Add detailed package structure diagram, single test execution command, JAR generation commands, exception hierarchy documentation, and update dependency versions to reflect current build configuration. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Bump version to 1.1.0 - Upgrade Gradle wrapper from 8.14.3 to 9.3.0 - Upgrade Kotlin from 2.2.10 to 2.3.0 - Update dependencies: - commons-codec: 1.18.0 → 1.20.0 - okhttp: 5.1.0 → 5.3.0 - kotlinx-serialization-json: 1.9.0 → 1.10.0 - junit-jupiter: 5.10.0 → 5.14.2 - dokka: 2.0.0 → 2.1.0 - shadow: 8.3.8 → 9.3.1 - maven-publish: 0.34.0 → 0.36.0 - Simplify dokka configuration Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Kent Beck의 Tidy First 원칙을 추가하여 AI가 코드 수정 시 구조적 변경과 행위적 변경을 분리하도록 지침 제공 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace java.time.Instant and java.time.LocalDateTime with kotlin.time.Instant
across all DTOs and utility classes. This simplifies the codebase by using
Kotlin's native time API and removes the need for complex lenient parsing
in JsonSupport. Also simplify test dependencies to use kotlin("test").
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive test coverage for the java.time to kotlin.time migration: - DtoSerializationTest: Tests for SendRequestConfig, MessageListRequest, MessageListBaseRequest, and MultipleDetailMessageSendingRequest serialization with kotlin.time.Instant - AuthenticatorTest: Tests for HMAC-SHA256 auth info generation including UTC timestamp format, salt, and signature validation - JsonSupportTest: Tests for Instant serialization/deserialization including null handling, epoch, and nanosecond precision Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary of ChangesHello @Palbahngmiyine, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces version 1.1.0 of the SOLAPI Kotlin SDK, primarily focusing on enhancing its core capabilities and developer experience. The changes involve a strategic migration to Kotlin's native Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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 Review
This pull request introduces significant updates to the SOLAPI Kotlin SDK, upgrading Gradle, Kotlin, and various dependencies to their latest versions. A major improvement is the migration of date/time handling from java.time to kotlin.time.Instant, which aligns with modern Kotlin practices and simplifies serialization logic. The SDK's functionality is greatly expanded with comprehensive support for Kakao Brand Message (BMS) features, including new models for various message types, buttons, carousels, commerce, and video. Crucially, the pull request includes extensive unit tests for the new serialization logic and authentication, ensuring the correctness and reliability of these changes. The gradlew scripts have also been made more robust and POSIX-compliant. Overall, these changes enhance the SDK's capabilities, maintainability, and adherence to best practices.
Add comprehensive E2E tests for all 8 BMS Free chat bubble types with both minimal and full field configurations. Includes test utilities, test images, and environment variable configuration. - Add BmsTestUtils helper functions for creating BMS options - Add BmsFreeE2ETest with 16 type tests + 5 error case tests - Add test images (800x800, 800x400, 400x400 PNG) - Add .env.example template for required credentials - Update .gitignore to exclude .env files Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add printExceptionDetails helper to show SolapiMessageNotReceivedException's failedMessageList - Update all error case catch blocks to use the new helper function - Standardize environment variable names (SOLAPI_KAKAO_PF_ID, SOLAPI_SENDER, SOLAPI_RECIPIENT) - Add .omc/ to gitignore
- Add chatBubbleType-specific image upload helpers with correct StorageType - Remove unsupported fields from test helpers: - TEXT: remove header, additionalContent - IMAGE/WIDE: remove header, content, additionalContent - COMMERCE: remove header - PREMIUM_VIDEO: remove additionalContent, limit to 1 button - Fix WIDE_ITEM_LIST to require minimum 3 sub-items - Add header as required field for WIDE_ITEM_LIST - Update PREMIUM_VIDEO video URL to valid Kakao TV link - Change COMMERCE without buttons test to expect success Resolves API validation errors discovered during E2E testing.
Add convenience methods to set date fields using java.time.LocalDateTime in addition to existing kotlin.time.Instant support. - Add LocalDateTimeSupport utility with toKotlinInstant() extension - Add setScheduledDateFromLocalDateTime() to SendRequestConfig - Add setStartDateFromLocalDateTime/setEndDateFromLocalDateTime to MessageListRequest - Add setStartDateFromLocalDateTime/setEndDateFromLocalDateTime to MessageListBaseRequest - Add setScheduledDateFromLocalDateTime() to MultipleDetailMessageSendingRequest - Add secondary constructor and fromLocalDateTime() to KakaoTemplateDateQuery - Support both system default and explicit ZoneId for timezone handling - Preserve nanosecond precision using ISO-8601 string conversion - Add unit tests and E2E tests for scheduled message sending
Relocate kotlinx.serialization to com.solapi.shadow.kotlinx.serialization to prevent dependency conflicts with external SDK users who may use different versions of kotlinx-serialization in their projects.
|
/gemini review |
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 Review
This pull request is a significant update to version 1.1.0, introducing Kakao Brand Message (BMS) Free type support and making important improvements to the SDK's core. The migration from java.time to kotlin.time.Instant for all date-time fields is a major enhancement, improving consistency and preventing potential timezone-related bugs. The addition of helper methods for LocalDateTime ensures good Java interoperability. The codebase is also cleaner with the removal of the deprecated NurigoApp and simplification of the Authenticator and JsonSupport classes. The comprehensive suite of new unit and E2E tests is particularly commendable, ensuring the new features and refactorings are well-covered. I have one suggestion for a minor improvement in the date-time conversion utility. Overall, this is a high-quality contribution.
src/main/java/com/solapi/sdk/message/lib/LocalDateTimeSupport.kt
Outdated
Show resolved
Hide resolved
…cture - Add BaseE2ETest with common environment variable handling - API key/secret configuration - Sender/recipient phone numbers - Kakao pfId and templateId - assumeBasicEnvironmentConfigured/assumeKakaoEnvironmentConfigured helpers - printExceptionDetails for error handling - Add E2ETestUtils with reusable message factory methods - SMS, LMS, MMS message creation - Kakao Alimtalk/FriendTalk message creation - Voice message creation - Kakao button factories (WL, AL, BK, MD, AC) - Custom fields message creation - Batch SMS message creation - Long text generation for LMS tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add E2E tests covering all major SDK features: SMS Tests (SmsE2ETest): - Single message sending - Phone number with dashes (auto-stripped) - Batch sending to multiple recipients - Error cases: invalid sender, empty message LMS Tests (LmsE2ETest): - Explicit MessageType.LMS - Auto-detection via autoTypeDetect - Maximum length (~2000 bytes) - Subject with long text MMS Tests (MmsE2ETest): - Image upload to StorageType.MMS - Single MMS with image - Invalid imageId error case - Subject and body with image Kakao Alimtalk Tests (KakaoAlimtalkE2ETest): - Basic template sending - Variable substitution - Invalid template ID error case - SMS fallback disabled (disableSms) - Variable auto-formatting Kakao FriendTalk Tests (KakaoFriendTalkE2ETest): - Text-only CTA - Button types: WL, AL, BK, MD - Ad flag (adFlag) - Multiple buttons - Image CTI with buttons Voice Tests (VoiceE2ETest): - Female/Male voice types - Header message - Tail message (requires headerMessage) - Full options combination - Default voice type Message List Tests (MessageListE2ETest): - Basic query - Filters: from, to, type, status - Date range filtering - Pagination with startKey - Specific messageIds query - Combined filters Balance Tests (BalanceE2ETest): - Balance query - Daily quota query Custom Fields Tests (CustomFieldsE2ETest): - Basic custom fields - Various values (unicode, special chars) - Single field - Long value Duplicate Handling Tests (DuplicateHandlingE2ETest): - allowDuplicates: true/false - showMessageList option - Combined options Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ersion Replace manual ISO-8601 string parsing with kotlin.time.toKotlinInstant() extension function for cleaner, more idiomatic Kotlin code. - Add kotlin.time.toKotlinInstant import - Remove unnecessary ZonedDateTime import - Simplify toKotlinInstant() implementation to single expression - Remove outdated KDoc comment about string conversion This change addresses the review comment from PR solapi#4 by using the stdlib extension function which provides direct conversion without string serialization overhead while preserving nanosecond precision. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
/gemini review |
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 Review
This pull request introduces version 1.1.0 of the SOLAPI Kotlin SDK. The changes are significant and include:
- A major feature addition for Kakao Brand Message Service (BMS), including new models and message types.
- Migration from
java.timetokotlin.time.Instantfor all date/time fields in DTOs, which is a great modernization step. Helper methods are provided for Java interoperability. - A comprehensive suite of unit and end-to-end tests has been added, which greatly improves the quality and reliability of the SDK.
- Dependencies and Gradle version have been updated.
- Documentation files (
AGENTS.md,CLAUDE.md) have been significantly improved.
The overall quality of the changes is high. I have a few suggestions to improve the maintainability of the new test suite by reducing code duplication. Please see the detailed comments.
src/test/kotlin/com/solapi/sdk/message/e2e/ScheduledMessageE2ETest.kt
Outdated
Show resolved
Hide resolved
Move common image upload logic to BaseE2ETest to reduce duplication across E2E test classes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove duplicate properties (apiKey, apiSecret, senderNumber, etc.) - Remove duplicate messageService lazy property - Replace assumeEnvironmentConfigured with assumeKakaoEnvironmentConfigured - Remove duplicate printExceptionDetails method - Replace 7 image upload helper functions with single uploadImage utility Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove duplicate properties (apiKey, apiSecret, senderNumber, etc.) - Remove duplicate messageService lazy property - Replace assumeEnvironmentConfigured with assumeBasicEnvironmentConfigured - Remove duplicate printExceptionDetails method Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
/gemini review |
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 Review
This pull request introduces a significant update to the SOLAPI Kotlin SDK, bumping the version to 1.1.0. The changes are extensive and of high quality. Key improvements include:
- New Feature: Full support for Kakao Brand Message Service (BMS) Free types, with detailed models and new
MessageTypeandStorageTypeenums. - Major Refactoring: Date and time handling has been improved by migrating from
java.time.LocalDateTimeto the more robust and timezone-awarekotlin.time.Instantacross all DTOs. Helper methods have been added for Java interoperability, which is a great touch. - Comprehensive Testing: A full suite of unit and end-to-end tests has been added from scratch, covering all major features of the SDK. This dramatically improves the reliability and maintainability of the codebase.
- Dependency and Build Updates: All major dependencies, including Kotlin, Gradle, and Dokka, have been updated to their latest versions. The build script has been cleaned up and improved.
- Code Cleanup: Deprecated code, such as
NurigoApp, has been removed.
Overall, this is an excellent pull request that significantly enhances the SDK's functionality, correctness, and reliability. I have only one minor suggestion regarding a small code redundancy.
src/main/java/com/solapi/sdk/message/dto/request/kakao/KakaoTemplateDateQuery.kt
Show resolved
Hide resolved
Example modules starting with 'solapi-kotlin-example' are now automatically discovered and included in the build. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive SDK usage examples in both Java and Kotlin: Examples included: - SendSms: SMS 단건 발송 - SendMms: MMS 이미지 첨부 발송 - SendBatch: 대량 메시지 발송 - SendScheduled: 예약 발송 - SendVoice: 음성 메시지 발송 - GetBalance: 잔액 조회 - GetMessageList: 발송 내역 조회 - KakaoAlimtalk: 알림톡 발송 - KakaoBrandMessage: 브랜드 메시지 발송 Usage: ./gradlew :solapi-kotlin-example-java:run -Pexample=SendSms ./gradlew :solapi-kotlin-example-kotlin:run -Pexample=GetBalance Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
/gemini review |
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 Review
This is an impressive and high-quality pull request that significantly improves the SDK. The upgrade to version 1.1.0 is well-justified by the extensive changes.
Key improvements I've noted:
- Major Feature: The addition of Kakao Brand Message (BMS_FREE) support is a huge enhancement, and the new models and tests for it are very thorough.
- Date/Time Refactoring: Migrating from
java.time.LocalDateTimetokotlin.time.Instantis an excellent architectural improvement that increases type safety and removes timezone ambiguity. The addition of helper methods for Java interoperability is also very thoughtful. - Testing: The massive addition of both unit and E2E tests greatly increases the project's reliability and maintainability.
- Dependencies & Build: The updates to Gradle and various dependencies keep the project modern and secure.
- Examples: The new Java and Kotlin example projects are a fantastic resource for developers using the SDK.
I have only one suggestion for a minor design improvement in KakaoOption.kt to make the behavior of the variables property more predictable and encapsulated, especially for Java users. Overall, this is an excellent contribution.
Add installation instructions for Gradle and Maven, quick start examples for both Kotlin and Java, environment variables table, message types reference, main features (MMS, batch, scheduled, Kakao), API reference tables, and error handling guide. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
FriendTalk service was discontinued as of 2025/12/31. - Remove CTA/CTI from README message types table - Deprecate CTA/CTI enum values in MessageType - Remove FriendTalk menu items from example MainExample - Update comments to remove FriendTalk references - Delete KakaoFriendTalkE2ETest.kt - Remove FriendTalk helper functions from E2ETestUtils Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Keep E2E tests to verify backward compatibility for existing users who may still use the deprecated CTA/CTI message types. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
대부분의 SDK 사용자가 Java를 사용하므로 README의 모든 코드 예제를 Java 우선으로 변경: - 빠른 시작 섹션: Java 예제를 Kotlin보다 먼저 배치 - 실행 명령어: Java 예제 명령어를 먼저 배치 - 주요 기능 섹션: 모든 Kotlin 예제를 Java로 변환 - MMS 이미지 첨부 발송 - 대량 메시지 발송 - 예약 발송 - 카카오 알림톡 - 에러 처리 섹션: Kotlin 예제를 Java로 변환 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Improve table column alignment and clarify that SOLAPI_KAKAO_PF_ID is required for all Kakao message types, not just specific ones. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add comprehensive JDK 8 user guide section explaining SDK vs example runtime requirements - Add explicit import statement for MultipleDetailMessageSentResponse - Replace var with explicit type declaration for Java 8 compatibility - Add "Java:" labels to advanced usage code examples for clarity Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a new section for AI coding tool users (Claude Code, Cursor, Windsurf) with a copy-paste prompt and examples of tasks AI can help with. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create LLM_GUIDE.md for AI agents with SDK quick reference - Update README AI section with raw GitHub URL for direct fetch - Add Claude hook to auto-sync version from build.gradle.kts to docs Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
/gemini review |
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 Review
이 PR은 SOLAPI Kotlin SDK 1.1.0 버전을 위한 대규모 업데이트로, Kotlin 및 Gradle 의존성 업데이트, 카카오 브랜드 메시지(BMS) 지원 추가, kotlin.time.Instant를 사용한 날짜/시간 처리 로직 리팩토링, 그리고 포괄적인 테스트 및 예제 프로젝트 추가를 통해 SDK의 품질과 사용성을 크게 향상시켰습니다. 보안 취약점은 발견되지 않았습니다. 새로 추가된 버전 동기화 스크립트의 이식성과 유지보수성을 개선하기 위한 작은 제안 사항이 있습니다.
- Change title to "Kotlin/Java SDK" - Add JDK 8 Note section explaining Map.of()/List.of() limitations - Fix KakaoOption Java example to use HashMap instead of Map.of() - Add Java examples for File Upload, Batch Send, Scheduled Send - Add Java example for Error Handling pattern Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Server automatically determines message type from kakaoOptions, so explicit MessageType.ATA is unnecessary. Also add note about brand message template compatibility. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Agent Workflow section with AskUserQuestion guidance for LLM agents - Include required questions for message type, language, and send mode - Translate all documentation text to English for consistency - Keep code block placeholders in Korean for practical examples - Update README prompt to English for broader accessibility Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ments Merge duplicate compileKotlin/compileTestKotlin configurations into single withType<KotlinCompile> block. Update README to reflect actual Kotlin 2.2.0+ requirement since SDK uses Kotlin 2.3.0 compiler features. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add automatic detection for publish/release tasks in settings.gradle.kts to skip example modules without requiring explicit -PskipExamples flag. Manual override still available via -PskipExamples=true/false. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
TBA