From ce3b2185df371c98ba7ea91f4886496b5435c8d1 Mon Sep 17 00:00:00 2001 From: Ian Date: Fri, 9 Feb 2024 00:21:26 -0800 Subject: [PATCH] init --- binding/react-native/android/build.gradle | 13 ++++++++++++- .../gradle/wrapper/gradle-wrapper.properties | 2 +- binding/react-native/package.json | 2 +- demo/react-native/package.json | 6 +++--- demo/react-native/yarn.lock | 16 ++++++++-------- 5 files changed, 25 insertions(+), 14 deletions(-) diff --git a/binding/react-native/android/build.gradle b/binding/react-native/android/build.gradle index e3b93170..3eda6feb 100644 --- a/binding/react-native/android/build.gradle +++ b/binding/react-native/android/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.1.3' + classpath 'com.android.tools.build:gradle:7.4.2' } } @@ -21,6 +21,17 @@ def getExtOrIntegerDefault(name) { } android { + def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION + if (agpVersion.tokenize('.')[0].toInteger() >= 7) { + namespace "ai.picovoice.reactnative.leopard" + } + + 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 549d8442..8049c684 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.9-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 2a44a1fd..1917c7ed 100644 --- a/binding/react-native/package.json +++ b/binding/react-native/package.json @@ -1,6 +1,6 @@ { "name": "@picovoice/leopard-react-native", - "version": "2.0.1", + "version": "2.0.2", "description": "Picovoice Leopard React Native binding", "main": "lib/commonjs/index", "module": "lib/module/index", diff --git a/demo/react-native/package.json b/demo/react-native/package.json index 37937e20..ce38ac41 100644 --- a/demo/react-native/package.json +++ b/demo/react-native/package.json @@ -1,6 +1,6 @@ { "name": "leopard-react-native-demo", - "version": "2.0.0", + "version": "2.0.2", "private": true, "scripts": { "start": "react-native start", @@ -14,8 +14,8 @@ "ios-bundle": "node scripts/run_demo.js bundle --dev false --platform ios --entry-file index.js --bundle-output ios/app.jsbundle" }, "dependencies": { - "@picovoice/leopard-react-native": "~2.0.1", - "@picovoice/react-native-voice-processor": "~1.2.0", + "@picovoice/leopard-react-native": "~2.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 3e9f6ad4..26c6b5d6 100644 --- a/demo/react-native/yarn.lock +++ b/demo/react-native/yarn.lock @@ -852,15 +852,15 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@picovoice/leopard-react-native@~2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@picovoice/leopard-react-native/-/leopard-react-native-2.0.1.tgz#57318038361935a62ee23735e20af0d490806f1a" - integrity sha512-jcqYIaV/dQ0HXAqBpAJQwwGJW+r1YTofucVb3neWcs8ef2y6n5NCv7ymCPE/y1hyI9vUk75mLtXQccDZkv1mDg== +"@picovoice/leopard-react-native@~2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@picovoice/leopard-react-native/-/leopard-react-native-2.0.2.tgz#4174b19a1bd4c044c925f0945c9f31aa1ec5bd6c" + integrity sha512-Sd4oLcw1yIAgdcxObKty6WbGCVyfXxcFDMfZpHbvLVy8hrZCoih2TOEMFNzE/IAjCD1igFhYUHAmEDYFR8w8dw== -"@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"