Skip to content

Commit a4e4697

Browse files
committed
Update Kotlin version
1 parent 8a0b938 commit a4e4697

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

android-wave-recorder/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ android {
2424

2525
dependencies {
2626
implementation fileTree(dir: 'libs', include: ['*.jar'])
27-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
27+
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31'
2828
implementation 'androidx.appcompat:appcompat:1.1.0'
29-
implementation 'androidx.core:core-ktx:1.1.0'
29+
implementation 'androidx.core:core-ktx:1.7.0'
3030
testImplementation 'junit:junit:4.12'
3131
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
3232
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
33-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2'
34-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.2'
33+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2'
34+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2'
3535
}

android-wave-recorder/src/main/java/com/github/squti/androidwaverecorder/WaveRecorder.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
package com.github.squti.androidwaverecorder
2626

27+
import android.annotation.SuppressLint
2728
import android.media.AudioRecord
2829
import android.media.MediaRecorder
2930
import android.media.audiofx.NoiseSuppressor
@@ -84,6 +85,7 @@ class WaveRecorder(private var filePath: String) {
8485
/**
8586
* Starts audio recording asynchronously and writes recorded data chunks on storage.
8687
*/
88+
@SuppressLint("MissingPermission")
8789
fun startRecording() {
8890

8991
if (!isAudioRecorderInitialized()) {
@@ -157,7 +159,7 @@ class WaveRecorder(private var filePath: String) {
157159
ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer()
158160
.get(shortData)
159161

160-
return shortData.max()?.toInt() ?: 0
162+
return shortData.maxOrNull()?.toInt() ?: 0
161163
}
162164

163165
/** Changes @property filePath to @param newFilePath

build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.3.50'
54
repositories {
65
google()
76
jcenter()
87

98
}
109
dependencies {
1110
classpath 'com.android.tools.build:gradle:7.1.3'
12-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11+
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31'
1312
// NOTE: Do not place your application dependencies here; they belong
1413
// in the individual module build.gradle files
1514
}

sample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ android {
2424

2525
dependencies {
2626
implementation fileTree(dir: 'libs', include: ['*.jar'])
27-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
27+
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31'
2828
implementation 'androidx.appcompat:appcompat:1.1.0'
2929
implementation 'androidx.core:core-ktx:1.1.0'
3030
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

0 commit comments

Comments
 (0)