Skip to content

Commit

Permalink
Add avp and proguard (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErisMik authored Jul 20, 2023
1 parent 6aa82cb commit cc692ef
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 144 deletions.
3 changes: 1 addition & 2 deletions binding/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.2"
classpath "com.github.dcendents:android-maven-gradle-plugin:2.1"
classpath 'com.android.tools.build:gradle:4.1.3'
}
}

Expand Down
7 changes: 2 additions & 5 deletions binding/android/octopus/build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

ext {
PUBLISH_GROUP_ID = 'ai.picovoice'
PUBLISH_VERSION = '1.2.1'
PUBLISH_VERSION = '1.2.2'
PUBLISH_ARTIFACT_ID = 'octopus-android'
}

android {
compileSdkVersion defaultTargetSdkVersion
buildToolsVersion "30.0.3"

defaultConfig {
minSdkVersion 21
targetSdkVersion defaultTargetSdkVersion
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}

Expand All @@ -38,7 +35,7 @@ if (file("${rootDir}/publish-mavencentral.gradle").exists()) {
}

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])

}

task copyLibs(type: Copy) {
Expand Down
5 changes: 2 additions & 3 deletions binding/android/octopus/consumer-rules.pro
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-keep class ai.picovoice.octopus.*Exception { <init>(...); }
-keep class ai.picovoice.octopus.OctopusMatch
-keep class ai.picovoice.octopus.OctopusMetadata
-keep class ai.picovoice.octopus.OctopusMetadataNative
-keep class ai.picovoice.octopus.OctopusMatch { <init>(...); }
-keep class ai.picovoice.octopus.OctopusMetadataNative { <init>(...); }
5 changes: 2 additions & 3 deletions binding/android/octopus/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-keep class ai.picovoice.octopus.*Exception { <init>(...); }
-keep class ai.picovoice.octopus.OctopusMatch
-keep class ai.picovoice.octopus.OctopusMetadata
-keep class ai.picovoice.octopus.OctopusMetadataNative
-keep class ai.picovoice.octopus.OctopusMatch { <init>(...); }
-keep class ai.picovoice.octopus.OctopusMetadataNative { <init>(...); }
2 changes: 1 addition & 1 deletion demo/android/OctopusDemo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.2"
classpath 'com.android.tools.build:gradle:7.2.2'
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Jun 29 23:02:09 PDT 2021
#Wed Jul 19 13:57:31 PDT 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
16 changes: 5 additions & 11 deletions demo/android/OctopusDemo/octopus-demo-app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
plugins {
id 'com.android.application'
}
apply plugin: 'com.android.application'

Properties properties = new Properties()
if (rootProject.file("local.properties").exists()) {
Expand All @@ -21,7 +19,6 @@ if (rootProject.file("local.properties").exists()) {

android {
compileSdkVersion defaultTargetSdkVersion
buildToolsVersion "30.0.3"

defaultConfig {
applicationId "ai.picovoice.octopusdemo"
Expand Down Expand Up @@ -56,20 +53,17 @@ android {
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
lint {
abortOnError false
}
}

dependencies {
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
implementation 'ai.picovoice:octopus-android:1.2.1'
implementation 'ai.picovoice:octopus-android:1.2.2'
implementation 'ai.picovoice:android-voice-processor:1.0.2'

// Espresso UI Testing
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
Expand Down
Loading

0 comments on commit cc692ef

Please sign in to comment.