Skip to content

Commit e23fe7a

Browse files
committedJun 4, 2023
minSdkVersion 24 + update dependencies
1 parent 790f73e commit e23fe7a

File tree

7 files changed

+27
-13
lines changed

7 files changed

+27
-13
lines changed
 

‎.github/workflows/android.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ jobs:
1818
steps:
1919

2020
- name: Checkout repository and submodules
21-
uses: actions/checkout@v2
21+
uses: actions/checkout@v3
2222
with:
2323
submodules: recursive
2424

25-
- name: Set up Java 11
26-
uses: actions/setup-java@v2
25+
- name: Set up Java 17
26+
uses: actions/setup-java@v3
2727
with:
28-
distribution: 'adopt'
29-
java-version: '11'
28+
distribution: 'temurin'
29+
java-version: '17'
3030

3131
- name: Build with Gradle
3232
run: ./gradlew build

‎app/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies {
1212
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.8.0'
15+
implementation 'com.google.android.material:material:1.9.0'
1616
// Added only to resolve https://issuetracker.google.com/issues/242384116
1717
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'
1818
}
@@ -27,10 +27,10 @@ android {
2727
// API level 21: Jetpack Compose
2828
defaultConfig {
2929
applicationId 'ee.ioc.phon.android.speak'
30-
minSdkVersion 23
30+
minSdkVersion 24
3131
targetSdkVersion 33
32-
versionCode 1901
33-
versionName '1.9.01'
32+
versionCode 1906
33+
versionName '1.9.06'
3434
vectorDrawables.useSupportLibrary = true
3535
// Keep only en and et resources
3636
resConfigs 'en', 'et'

‎app/src/main/AndroidManifest.xml

+7-1
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,14 @@
2525
In Android versions before v6.0 (~35% of the users as of 2017-06-18)
2626
the permission is granted at install time, which is not nice, but this user base will
2727
disappear over time.
28+
Doc: "READ_EXTERNAL_STORAGE is deprecated (and is not granted) when targeting Android 13+.
29+
If you need to query or interact with MediaStore or media files on the shared storage,
30+
you should instead use one or more new storage permissions: READ_MEDIA_IMAGES, READ_MEDIA_VIDEO or READ_MEDIA_AUDIO."
31+
TODO: test importing rewrite rules (which are plain text) on Android 13+.
2832
-->
29-
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
33+
<uses-permission
34+
android:name="android.permission.READ_EXTERNAL_STORAGE"
35+
android:maxSdkVersion="32" />
3036

3137
<!-- Permission SET_ALARM.
3238
Used to set the alarm clock if the transcription resolves to an AlarmClock intent.

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

+6-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ class VoiceSearchDemo : AbstractRecognizerDemoActivity() {
5656
// in the voice search system. We have to keep the bundle separate,
5757
// because it becomes immutable once it enters the PendingIntent.
5858
val queryIntent = Intent(Intent.ACTION_SEARCH)
59-
val pending = PendingIntent.getActivity(this, 0, queryIntent, PendingIntent.FLAG_ONE_SHOT)
59+
val pending = PendingIntent.getActivity(
60+
this,
61+
0,
62+
queryIntent,
63+
PendingIntent.FLAG_ONE_SHOT or PendingIntent.FLAG_IMMUTABLE
64+
)
6065

6166
// Now set up the bundle that will be inserted into the pending intent
6267
// when it is time to do the search. We always build it here (even if empty)

‎build.gradle

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

‎gradle.properties

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
android.defaults.buildfeatures.buildconfig=true
12
android.enableJetifier=false
3+
android.nonFinalResIds=false
4+
android.nonTransitiveRClass=false
25
android.useAndroidX=true
36
org.gradle.jvmargs=-Xmx2560m
47
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.5-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip

0 commit comments

Comments
 (0)
Failed to load comments.