feat: React Native 0.79 compatibility and New Architecture support#4
Open
scantarbian wants to merge 9 commits intomainfrom
Open
feat: React Native 0.79 compatibility and New Architecture support#4scantarbian wants to merge 9 commits intomainfrom
scantarbian wants to merge 9 commits intomainfrom
Conversation
- ESCPOS-ThermalPrinter-Android: 3.2.0 → 3.4.0 - androidx.core:core: 1.7.0 → 1.17.0 - espresso-core: 3.2.0 → 3.5.1 - html2bitmap: 1.9 → 1.10 - kotlinx-coroutines-android: 1.3.9 → 1.7.3 - Kotlin: 1.7.0 → 1.8.22 - compileSdkVersion: 31 → 35 - targetSdkVersion: 31 → 35 - minSdkVersion: 21 → 28 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Upgrade React Native 0.71.6 → 0.79.5 - Upgrade React 18.2.0 → 19.0.0 - Update AGP 7.3.1 → 8.9.1 - Update Gradle 7.5.1 → 8.11.1 - Update compileSdkVersion 33 → 36 - Update targetSdkVersion 33 → 35 - Update minSdkVersion 21 → 28 - Update Kotlin 1.7.0 → 2.0.21 - Add @react-native-community/cli dependencies - Update build.gradle and settings.gradle for RN 0.79 structure - Enable New Architecture (newArchEnabled=true) - Update library devDependencies for RN 0.79 compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Library changes: - Update build.gradle for AGP 8.9.1, Java 17, namespace support - Update Kotlin version 1.8.22 → 2.0.21 - Add codegenConfig to package.json for New Architecture - Add TurboModule spec file (NativeSunmiExternalPrinter.ts) - Update index.tsx to support TurboModule when available Example app changes: - Convert MainApplication.java to MainApplication.kt (RN 0.79 style) - Remove deprecated Flipper integration - Add autolinkLibrariesWithApp() to app/build.gradle - Simplify app/build.gradle react block Note: Currently builds with newArchEnabled=false. Full New Architecture support requires additional codegen setup. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add network_security_config.xml to allow cleartext traffic to localhost (fixes "CLEARTEXT communication to localhost not permitted" error) - Update AndroidManifest.xml with networkSecurityConfig and usesCleartextTraffic - Convert MainActivity.java to MainActivity.kt for RN 0.79 compatibility - Fix MainApplication.kt to use OpenSourceMergedSoMapping for SoLoader (fixes "libreact_featureflagsjni.so not found" crash) - Update babel.config.js to use @react-native/babel-preset (replaces metro-react-native-babel-preset) - Update metro.config.js to extend @react-native/metro-config - Update react-native.config.js with project paths for interactive mode 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Change all Base64.decode calls to use NO_WRAP flag for better compatibility with single-line base64 strings (modern standard) - Change convertHTMLtoBase64 encoding to use NO_WRAP for cleaner output - Fixes "bad base-64" error when printing images from external sources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…button Previously the "Print with Raster Bit Wrapper" button had hardcoded IP address and port values instead of using the state variables. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Implement TurboModule spec with codegen for New Architecture compatibility: - Add override modifiers to all spec-defined methods in Kotlin module - Change convertHTMLtoBase64 width parameter from Int to Double for codegen - Add oldarch fallback for backward compatibility with Old Architecture - Enable newArchEnabled=true in example app for testing - Update Gradle wrapper to 8.11.1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary
Changes
New Architecture (TurboModules)
NativeSunmiExternalPrinter.tsTurboModule specNativeSunmiExternalPrinterSpecoverridemodifiers to all spec-defined methodsAndroid Updates
Bug Fixes
Base64.NO_WRAPfor consistent base64 encodingTest plan
newArchEnabled=truenewArchEnabled=false🤖 Generated with Claude Code