diff --git a/binding/react-native/android/build.gradle b/binding/react-native/android/build.gradle index 5b76098eb4..91bf4d4406 100644 --- a/binding/react-native/android/build.gradle +++ b/binding/react-native/android/build.gradle @@ -7,7 +7,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.1.3' + classpath 'com.android.tools.build:gradle:7.4.2' } } @@ -22,6 +22,17 @@ def getExtOrIntegerDefault(name) { } android { + def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION + if (agpVersion.tokenize('.')[0].toInteger() >= 7) { + namespace "ai.picovoice.reactnative.porcupine" + } + + if (agpVersion.tokenize('.')[0].toInteger() >= 8) { + buildFeatures { + buildConfig = true + } + } + compileSdkVersion getExtOrIntegerDefault('compileSdkVersion') buildToolsVersion getExtOrDefault('buildToolsVersion') defaultConfig { diff --git a/binding/react-native/android/gradle/wrapper/gradle-wrapper.properties b/binding/react-native/android/gradle/wrapper/gradle-wrapper.properties index a4b4429748..8049c684f0 100644 --- a/binding/react-native/android/gradle/wrapper/gradle-wrapper.properties +++ b/binding/react-native/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/binding/react-native/package.json b/binding/react-native/package.json index 3aee1b0c8d..fcdf77df78 100644 --- a/binding/react-native/package.json +++ b/binding/react-native/package.json @@ -1,6 +1,6 @@ { "name": "@picovoice/porcupine-react-native", - "version": "3.0.1", + "version": "3.0.2", "description": "Picovoice Porcupine React Native binding", "main": "lib/commonjs/index", "module": "lib/module/index", @@ -36,7 +36,7 @@ }, "homepage": "https://github.com/Picovoice/porcupine/#readme", "devDependencies": { - "@picovoice/react-native-voice-processor": "^1.2.0", + "@picovoice/react-native-voice-processor": "^1.2.2", "@react-native-community/eslint-config": "^3.2.0", "@types/jest": "^26.0.0", "@types/react": "^16.9.19", @@ -55,7 +55,7 @@ "typescript": "^4.9.3" }, "peerDependencies": { - "@picovoice/react-native-voice-processor": ">= 1.2.0", + "@picovoice/react-native-voice-processor": ">= 1.2.2", "react": ">= 17.0", "react-native": ">= 0.63" }, diff --git a/binding/react-native/tsconfig.json b/binding/react-native/tsconfig.json index 2021311cce..adb660a904 100644 --- a/binding/react-native/tsconfig.json +++ b/binding/react-native/tsconfig.json @@ -7,7 +7,6 @@ "allowUnreachableCode": false, "allowUnusedLabels": false, "esModuleInterop": true, - "importsNotUsedAsValues": "error", "forceConsistentCasingInFileNames": true, "jsx": "react", "lib": ["esnext"], diff --git a/binding/react-native/yarn.lock b/binding/react-native/yarn.lock index fb46764af6..b17e18ab9e 100644 --- a/binding/react-native/yarn.lock +++ b/binding/react-native/yarn.lock @@ -1503,10 +1503,10 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@picovoice/react-native-voice-processor@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@picovoice/react-native-voice-processor/-/react-native-voice-processor-1.2.0.tgz#82a98b41d9236ababe330dae873062ee0e1b24c3" - integrity sha512-zolTEo3qsqeUwY7JRslV/yhiA+oBrkeogOTxjHIEJ//yEsr7YKlI1PcqTbU5/xjmUiukh62gmwTXhosnQYdasQ== +"@picovoice/react-native-voice-processor@^1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@picovoice/react-native-voice-processor/-/react-native-voice-processor-1.2.2.tgz#dac86c918a3f299d859a3988fe25f98faa5d13a2" + integrity sha512-l3pQWNfPI7lJiVnMhyjQx9WoF1QhvsBNf9pEIVcEGipHrfdW1HTZ3RPRRHfZLUSPiIGHrQf1R/tMshQPZmkY3w== "@react-native-community/cli-debugger-ui@^7.0.3": version "7.0.3" diff --git a/demo/react-native/package.json b/demo/react-native/package.json index 8bd48d681b..bde3e8af55 100644 --- a/demo/react-native/package.json +++ b/demo/react-native/package.json @@ -1,6 +1,6 @@ { "name": "porcupine-react-native-demo", - "version": "3.0.1", + "version": "3.0.2", "private": true, "scripts": { "start": "react-native start", @@ -15,8 +15,8 @@ "ios-bundle": "node scripts/run_demo.js bundle --dev false --platform ios --entry-file index.js --bundle-output ios/app.jsbundle" }, "dependencies": { - "@picovoice/porcupine-react-native": "3.0.1", - "@picovoice/react-native-voice-processor": "1.2.0", + "@picovoice/porcupine-react-native": "3.0.2", + "@picovoice/react-native-voice-processor": "1.2.2", "@react-native-picker/picker": "^1.9.2", "react": "17.0.2", "react-native": "0.68.7" diff --git a/demo/react-native/yarn.lock b/demo/react-native/yarn.lock index 8eff740b4b..8850f4319f 100644 --- a/demo/react-native/yarn.lock +++ b/demo/react-native/yarn.lock @@ -1476,15 +1476,15 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@picovoice/porcupine-react-native@3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@picovoice/porcupine-react-native/-/porcupine-react-native-3.0.1.tgz#2c71a61b074f34fece517a884fb0ec2f6eacc7cc" - integrity sha512-TGP7l1SVNOMuqyocvRqyf7X08VYkr3gc4eucw8M81QLzWzJ8Mpz64BQb2iifNUR6Oaia0XQ1tHP3ffrdIHY2rg== +"@picovoice/porcupine-react-native@3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@picovoice/porcupine-react-native/-/porcupine-react-native-3.0.2.tgz#8eabb16222ad95902a48202b427d669032df2c6a" + integrity sha512-nmvk1aBVPQ45kCdfToq5DhvyQDdkSO9XZjBO/2KRgTs1qNXDfYeo0vZGvQuUWdGpfzgZExYcVcNLfs8k0jB5fg== -"@picovoice/react-native-voice-processor@1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@picovoice/react-native-voice-processor/-/react-native-voice-processor-1.2.0.tgz#82a98b41d9236ababe330dae873062ee0e1b24c3" - integrity sha512-zolTEo3qsqeUwY7JRslV/yhiA+oBrkeogOTxjHIEJ//yEsr7YKlI1PcqTbU5/xjmUiukh62gmwTXhosnQYdasQ== +"@picovoice/react-native-voice-processor@1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@picovoice/react-native-voice-processor/-/react-native-voice-processor-1.2.2.tgz#dac86c918a3f299d859a3988fe25f98faa5d13a2" + integrity sha512-l3pQWNfPI7lJiVnMhyjQx9WoF1QhvsBNf9pEIVcEGipHrfdW1HTZ3RPRRHfZLUSPiIGHrQf1R/tMshQPZmkY3w== "@react-native-community/cli-debugger-ui@^7.0.3": version "7.0.3"