Gradle KTS + async AIDL refactor#27
Merged
Merged
Conversation
Migrate Android build to Kotlin DSL and modernize native plugin API. Replaced legacy android/build.gradle and wrapper files with Gradle KTS (build.gradle.kts, settings.gradle.kts), bumped compileSdk and Java compatibility, and adjusted repositories/dependencies. Heavily refactored SunmiTaskPrinterMethod to non-blocking async calls: methods now accept a MethodChannel.Result, dispatch work on a background executor, post results on the main thread, and use dummy ICallback/ILcdCallback implementations to satisfy AIDL without blocking. Service bind/unbind handling improved (pending result support) and printer status codes are mapped to readable strings. Also simplified .gitignore, updated project metadata revision, removed an AIDL query from AndroidManifest, and added an IDE run configuration for refreshing the Android environment.
Add GitHub Actions workflows for analysis/test (analyze_and_test.yml), coverage reporting and pages deployment with a coverage badge (coverage.yml), and publishing to pub.dev on version tags (publish.yml). Remove older flutter.yml and pull_request_automerge.yml workflows. Update example and unit tests to use MethodChannel mocks and more robust assertions: expand the integration test to verify graceful behavior on non-Sunmi devices, update the example widget test to mock channel responses and assert UI metadata, and rewrite unit tests to record MethodChannel calls and add checks for bindingService, paperSize, printText, printRow, printer status and serial number handling. Minor formatting fix in method-channel test file.
Add detailed 0.1.0 release notes to CHANGELOG.md describing a major architecture refactor and modernization (Android migrated to Gradle Kotlin DSL, compileSdk 36, Java 17, non-blocking SunmiTaskPrinterMethod, decoupled MethodChannel resolution, new hardwareErrorStream EventChannel), Dart/plugin optimizations (printRow parsing improvements, service binding fixes, status code mapping, stricter typings), and example app & CI enhancements. Also bump package version in pubspec.yaml from 0.0.1 to 0.1.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrate Android build to Kotlin DSL and modernize native plugin API. Replaced legacy android/build.gradle and wrapper files with Gradle KTS (build.gradle.kts, settings.gradle.kts), bumped compileSdk and Java compatibility, and adjusted repositories/dependencies.
Heavily refactored SunmiTaskPrinterMethod to non-blocking async calls: methods now accept a MethodChannel.Result, dispatch work on a background executor, post results on the main thread, and use dummy ICallback/ILcdCallback implementations to satisfy AIDL without blocking.
Service bind/unbind handling improved (pending result support) and printer status codes are mapped to readable strings.
Also simplified .gitignore, updated project metadata revision, removed an AIDL query from AndroidManifest, and added an IDE run configuration for refreshing the Android environment.