Skip to content

Commit

Permalink
Java upgrades (#1194)
Browse files Browse the repository at this point in the history
  • Loading branch information
laves authored Dec 23, 2023
1 parent 2cf759e commit 25e1fa5
Show file tree
Hide file tree
Showing 21 changed files with 150 additions and 137 deletions.
3 changes: 2 additions & 1 deletion binding/ios/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ Porcupine is:
To learn more about Porcupine, see the [product](https://picovoice.ai/products/porcupine/), [documentation](https://picovoice.ai/docs/), and [GitHub](https://github.com/Picovoice/porcupine/) pages.

## Installation

<!-- markdown-link-check-disable -->
The Porcupine iOS binding is available via [CocoaPods](https://cocoapods.org/pods/Porcupine-iOS). To import it into your iOS project, add the following line to your Podfile:
<!-- markdown-link-check-enable -->

```ruby
pod 'Porcupine-iOS'
Expand Down
12 changes: 7 additions & 5 deletions demo/android/Activity/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ext {
defaultTargetSdkVersion = 31
defaultTargetSdkVersion = 33
}

buildscript {
Expand All @@ -8,14 +8,16 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.android.tools.build:gradle:7.4.2'
}
}

allprojects {
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation"
tasks.withType(JavaCompile).tap {
configureEach {
options.compilerArgs << "-Xlint:deprecation"
}
}
}
repositories {
Expand All @@ -24,6 +26,6 @@ allprojects {
}
}

task clean(type: Delete) {
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import groovy.json.JsonSlurper

apply plugin: 'com.android.application'

android {
compileSdkVersion defaultTargetSdkVersion
compileSdk defaultTargetSdkVersion

defaultConfig {
applicationId "ai.picovoice.porcupine.demo"
Expand All @@ -18,7 +20,7 @@ android {
}

def testDataFile = file('../../../../resources/.test/test_data.json')
def parsedJson = new groovy.json.JsonSlurper().parseText(testDataFile.text)
def parsedJson = new JsonSlurper().parseText(testDataFile.text)
def languages = []
parsedJson.tests.singleKeyword.each { a ->
languages.add(a.language)
Expand Down Expand Up @@ -64,6 +66,7 @@ android {
lint {
abortOnError false
}
namespace 'ai.picovoice.porcupine.demo'
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ai.picovoice.porcupine.demo">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
Expand Down
6 changes: 3 additions & 3 deletions demo/android/STT/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ext {
defaultTargetSdkVersion = 31
defaultTargetSdkVersion = 33
}

buildscript {
Expand All @@ -9,7 +9,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.android.tools.build:gradle:7.4.2'
}
}

Expand All @@ -20,6 +20,6 @@ allprojects {
}
}

task clean(type: Delete) {
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion demo/android/STT/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
3 changes: 2 additions & 1 deletion demo/android/STT/porcupine-stt-demo-app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion defaultTargetSdkVersion
compileSdk defaultTargetSdkVersion
defaultConfig {
applicationId "ai.picovoice.porcupine.sttdemo"
minSdkVersion 21
Expand All @@ -22,6 +22,7 @@ android {
lint {
abortOnError false
}
namespace 'ai.picovoice.porcupine.sttdemo'
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ai.picovoice.porcupine.sttdemo">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
Expand Down
7 changes: 3 additions & 4 deletions demo/android/Service/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
ext {
defaultTargetSdkVersion = 31
defaultTargetSdkVersion = 33
}

buildscript {
Expand All @@ -9,7 +8,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.android.tools.build:gradle:7.4.2'
}
}

Expand All @@ -20,6 +19,6 @@ allprojects {
}
}

task clean(type: Delete) {
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
3 changes: 2 additions & 1 deletion demo/android/Service/porcupine-service-demo-app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion defaultTargetSdkVersion
compileSdk defaultTargetSdkVersion
defaultConfig {
applicationId "ai.picovoice.porcupinedemoservice"
minSdkVersion 21
Expand All @@ -19,6 +19,7 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
namespace 'ai.picovoice.porcupinedemoservice'
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ai.picovoice.porcupinedemoservice">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
Expand Down
2 changes: 1 addition & 1 deletion demo/flutter/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 33
compileSdk 33

lintOptions {
disable 'InvalidPackage'
Expand Down
4 changes: 2 additions & 2 deletions demo/flutter/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.android.tools.build:gradle:7.4.2'
}
}

Expand All @@ -24,6 +24,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Nov 09 10:38:31 PST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Loading

0 comments on commit 25e1fa5

Please sign in to comment.