appidea / react-native-hce

Emulate smart cards inside React-Native application.
MIT License
67 stars 26 forks source link

Fix: update Kotlin version to 1.5.20 to support React Native #23

Closed anson-li closed 1 year ago

anson-li commented 1 year ago

Problem

react-native-hce hardcodes the kotlin version, which results in an error when trying to use gradle 7.x as it requires a minimum of 1.5.20. This blocks usage of this project on all new instances of React Native.

What went wrong:

The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher. The following dependencies do not satisfy the required version: project ':react-native-hce' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50

Solution

I've updated the minimum version of kotlin to 1.5.20. I've tested this change on new React Native application and works without issue.

prateek-somaiya commented 1 year ago

Can you please publish the package to npm? When I tried installing the package directly from github I am getting errors due to the examples directory...

npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\prate\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! > react-native-hce@0.2.0 prepare
npm ERR! > bob build
npm ERR!
npm ERR! ℹ Building target commonjs
npm ERR! ℹ Cleaning up previous build at lib\commonjs
npm ERR! ℹ Compiling 5 files in src with babel
npm ERR! ✓ Wrote files to lib\commonjs
npm ERR! ℹ Building target module
npm ERR! ℹ Cleaning up previous build at lib\module
npm ERR! ℹ Compiling 5 files in src with babel
npm ERR! ✓ Wrote files to lib\module
npm ERR! ℹ Building target typescript
npm ERR! ℹ Cleaning up previous build at lib\typescript
npm ERR! ℹ Generating type definitions with tsc
npm ERR! example/src/SetupView.tsx:9:24 - error TS2307: Cannot find module '@react-native-picker/picker' or its corresponding type declarations.
npm ERR!
npm ERR! 9 import { Picker } from '@react-native-picker/picker';
npm ERR!                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR!
npm ERR!
npm ERR! Found 1 error in example/src/SetupView.tsx:9
npm ERR! 
npm ERR! ✖ Failed to build definition files.