Skip to content

Commit 616f9e7

Browse files
committedApr 1, 2023
Update dependencies
1 parent c325c6a commit 616f9e7

File tree

6 files changed

+51
-20
lines changed

6 files changed

+51
-20
lines changed
 

‎app/build.gradle

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ dependencies {
66
// TODO: used only in ChunkedWebRecSessionResult, use Android's JSON library instead
77
implementation 'com.googlecode.json-simple:json-simple:1.1'
88
implementation 'com.koushikdutta.async:androidasync:3.1.0'
9-
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.20'
10-
implementation 'androidx.appcompat:appcompat:1.5.1'
9+
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.10'
10+
implementation 'androidx.appcompat:appcompat:1.6.1'
1111
implementation 'androidx.preference:preference-ktx:1.2.0'
12-
implementation 'androidx.recyclerview:recyclerview:1.2.1'
12+
implementation 'androidx.recyclerview:recyclerview:1.3.0'
1313
// implementation 'androidx.activity:activity:1.4.0'
1414
implementation 'androidx.dynamicanimation:dynamicanimation:1.0.0'
15-
implementation 'com.google.android.material:material:1.7.0'
15+
implementation 'com.google.android.material:material:1.8.0'
1616
// Added only to resolve https://issuetracker.google.com/issues/242384116
17-
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
17+
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'
1818
}
1919

2020
android {
@@ -29,8 +29,8 @@ android {
2929
applicationId 'ee.ioc.phon.android.speak'
3030
minSdkVersion 21
3131
targetSdkVersion 33
32-
versionCode 1816
33-
versionName '1.8.16'
32+
versionCode 1817
33+
versionName '1.8.17'
3434
vectorDrawables.useSupportLibrary = true
3535
// Keep only en and et resources
3636
resConfigs 'en', 'et'

‎app/src/main/java/ee/ioc/phon/android/speak/demo/AbstractRecognizerDemoActivity.kt

+37-7
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616

1717
package ee.ioc.phon.android.speak.demo
1818

19-
import androidx.appcompat.app.AppCompatActivity
2019
import android.content.Intent
2120
import android.content.pm.ResolveInfo
2221
import android.speech.RecognizerIntent
2322
import android.view.Menu
2423
import android.view.MenuItem
2524
import android.widget.Toast
25+
import androidx.appcompat.app.AppCompatActivity
2626
import ee.ioc.phon.android.speak.R
2727
import ee.ioc.phon.android.speak.activity.GrammarListActivity
2828
import ee.ioc.phon.android.speak.provider.Grammar
@@ -43,15 +43,33 @@ abstract class AbstractRecognizerDemoActivity : AppCompatActivity() {
4343

4444

4545
private val grammarName: String?
46-
get() = Utils.idToValue(this, Grammar.Columns.CONTENT_URI, Grammar.Columns._ID, Grammar.Columns.NAME, mGrammarId)
46+
get() = Utils.idToValue(
47+
this,
48+
Grammar.Columns.CONTENT_URI,
49+
Grammar.Columns._ID,
50+
Grammar.Columns.NAME,
51+
mGrammarId
52+
)
4753

4854

4955
private val grammarUrl: String?
50-
get() = Utils.idToValue(this, Grammar.Columns.CONTENT_URI, Grammar.Columns._ID, Grammar.Columns.URL, mGrammarId)
56+
get() = Utils.idToValue(
57+
this,
58+
Grammar.Columns.CONTENT_URI,
59+
Grammar.Columns._ID,
60+
Grammar.Columns.URL,
61+
mGrammarId
62+
)
5163

5264

5365
private val grammarTargetLang: String?
54-
get() = Utils.idToValue(this, Grammar.Columns.CONTENT_URI, Grammar.Columns._ID, Grammar.Columns.LANG, mGrammarId)
66+
get() = Utils.idToValue(
67+
this,
68+
Grammar.Columns.CONTENT_URI,
69+
Grammar.Columns._ID,
70+
Grammar.Columns.LANG,
71+
mGrammarId
72+
)
5573

5674
protected abstract fun onSuccess(intent: Intent?)
5775

@@ -65,7 +83,8 @@ abstract class AbstractRecognizerDemoActivity : AppCompatActivity() {
6583
override fun onOptionsItemSelected(item: MenuItem): Boolean {
6684
when (item.itemId) {
6785
R.id.menuDemoGrammarAssign -> {
68-
val intent = Intent(this@AbstractRecognizerDemoActivity, GrammarListActivity::class.java)
86+
val intent =
87+
Intent(this@AbstractRecognizerDemoActivity, GrammarListActivity::class.java)
6988
startActivityForResult(intent, ACTIVITY_SELECT_GRAMMAR_URL)
7089
return true
7190
}
@@ -94,6 +113,7 @@ abstract class AbstractRecognizerDemoActivity : AppCompatActivity() {
94113
}
95114
}
96115

116+
@Deprecated("TODO: add a better message")
97117
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
98118
if (requestCode == ACTIVITY_SELECT_GRAMMAR_URL) {
99119
if (resultCode != AppCompatActivity.RESULT_OK) {
@@ -104,8 +124,18 @@ abstract class AbstractRecognizerDemoActivity : AppCompatActivity() {
104124
toast(getString(R.string.errorFailedGetGrammarUrl))
105125
} else {
106126
mGrammarId = java.lang.Long.parseLong(grammarUri.pathSegments[1])
107-
toast(String.format(getString(R.string.toastAssignGrammar),
108-
Utils.idToValue(this, Grammar.Columns.CONTENT_URI, Grammar.Columns._ID, Grammar.Columns.NAME, mGrammarId)))
127+
toast(
128+
String.format(
129+
getString(R.string.toastAssignGrammar),
130+
Utils.idToValue(
131+
this,
132+
Grammar.Columns.CONTENT_URI,
133+
Grammar.Columns._ID,
134+
Grammar.Columns.NAME,
135+
mGrammarId
136+
)
137+
)
138+
)
109139
}
110140
} else if (requestCode == VOICE_RECOGNITION_REQUEST_CODE) {
111141
if (resultCode == AppCompatActivity.RESULT_OK) {

‎build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ buildscript {
44
mavenCentral()
55
}
66
dependencies {
7-
classpath 'com.android.tools.build:gradle:7.3.1'
8-
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20'
7+
classpath 'com.android.tools.build:gradle:7.4.2'
8+
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0'
99
}
1010
}
1111

‎gradle.properties

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
android.enableJetifier=true
1+
android.enableJetifier=false
22
android.useAndroidX=true
3-
org.gradle.jvmargs=-Xmx2560m
3+
org.gradle.jvmargs=-Xmx2560m
4+
org.gradle.unsafe.configuration-cache=true

‎gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip

‎speechutils

0 commit comments

Comments
 (0)
Failed to load comments.