HeligPfleigh / react-native-thermal-receipt-printer

A RN library for thermal printer
155 stars 102 forks source link

In order to compile Java 9+ source, please set compileSdkVersion to 30 or above #161

Closed pekmah closed 2 months ago

pekmah commented 8 months ago

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch react-native-thermal-receipt-printer@1.2.0-rc.1 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-thermal-receipt-printer/android/build.gradle b/node_modules/react-native-thermal-receipt-printer/android/build.gradle
index 6a95e9e..5486201 100644
--- a/node_modules/react-native-thermal-receipt-printer/android/build.gradle
+++ b/node_modules/react-native-thermal-receipt-printer/android/build.gradle
@@ -1,12 +1,12 @@
 apply plugin: 'com.android.library'

 android {
-    compileSdkVersion = 29
-    buildToolsVersion = "29.0.2"
+    compileSdkVersion = 33
+    buildToolsVersion = "33.0.0"

     defaultConfig {
         minSdkVersion 16
-        targetSdkVersion 29
+        targetSdkVersion 33
         versionCode 1
         versionName "1.0"

This issue body was partially generated by patch-package.

tux2nicolae commented 8 months ago

Indeed, I also have a local fork fixing this problem, but seeing your issue, I've decided to open a PR. @HeligPfleigh please help us to merge it directly into this library.

https://github.com/HeligPfleigh/react-native-thermal-receipt-printer/pull/162