Skip to content

Commit

Permalink
minSdkVersion 24 + update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaljurand committed Jun 4, 2023
1 parent 790f73e commit e23fe7a
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 13 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
steps:

- name: Checkout repository and submodules
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up Java 11
uses: actions/setup-java@v2
- name: Set up Java 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
distribution: 'temurin'
java-version: '17'

- name: Build with Gradle
run: ./gradlew build
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies {
implementation 'androidx.recyclerview:recyclerview:1.3.0'
// implementation 'androidx.activity:activity:1.4.0'
implementation 'androidx.dynamicanimation:dynamicanimation:1.0.0'
implementation 'com.google.android.material:material:1.8.0'
implementation 'com.google.android.material:material:1.9.0'
// Added only to resolve https://issuetracker.google.com/issues/242384116
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'
}
Expand All @@ -27,10 +27,10 @@ android {
// API level 21: Jetpack Compose
defaultConfig {
applicationId 'ee.ioc.phon.android.speak'
minSdkVersion 23
minSdkVersion 24
targetSdkVersion 33
versionCode 1901
versionName '1.9.01'
versionCode 1906
versionName '1.9.06'
vectorDrawables.useSupportLibrary = true
// Keep only en and et resources
resConfigs 'en', 'et'
Expand Down
8 changes: 7 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,14 @@
In Android versions before v6.0 (~35% of the users as of 2017-06-18)
the permission is granted at install time, which is not nice, but this user base will
disappear over time.
Doc: "READ_EXTERNAL_STORAGE is deprecated (and is not granted) when targeting Android 13+.
If you need to query or interact with MediaStore or media files on the shared storage,
you should instead use one or more new storage permissions: READ_MEDIA_IMAGES, READ_MEDIA_VIDEO or READ_MEDIA_AUDIO."
TODO: test importing rewrite rules (which are plain text) on Android 13+.
-->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />

<!-- Permission SET_ALARM.
Used to set the alarm clock if the transcription resolves to an AlarmClock intent.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ class VoiceSearchDemo : AbstractRecognizerDemoActivity() {
// in the voice search system. We have to keep the bundle separate,
// because it becomes immutable once it enters the PendingIntent.
val queryIntent = Intent(Intent.ACTION_SEARCH)
val pending = PendingIntent.getActivity(this, 0, queryIntent, PendingIntent.FLAG_ONE_SHOT)
val pending = PendingIntent.getActivity(
this,
0,
queryIntent,
PendingIntent.FLAG_ONE_SHOT or PendingIntent.FLAG_IMMUTABLE
)

// Now set up the bundle that will be inserted into the pending intent
// when it is time to do the search. We always build it here (even if empty)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.0.2'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0'
}
}
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
android.defaults.buildfeatures.buildconfig=true
android.enableJetifier=false
android.nonFinalResIds=false
android.nonTransitiveRClass=false
android.useAndroidX=true
org.gradle.jvmargs=-Xmx2560m
org.gradle.unsafe.configuration-cache=true
2 changes: 1 addition & 1 deletion 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.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip

0 comments on commit e23fe7a

Please sign in to comment.