Skip to content

Commit 61314bc

Browse files
authored
whisper.android : bump gradle plugin and dependencies + a lint pass (ggml-org#1255)
1 parent 11b2d6e commit 61314bc

File tree

10 files changed

+33
-42
lines changed

10 files changed

+33
-42
lines changed

examples/whisper.android/.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/whisper.android/.idea/gradle.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/whisper.android/.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/whisper.android/app/build.gradle

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ plugins {
55

66
android {
77
namespace 'com.whispercppdemo'
8-
compileSdk 33
8+
compileSdk 34
99

1010
defaultConfig {
1111
applicationId "com.whispercppdemo"
1212
minSdk 26
13-
targetSdk 32
13+
targetSdk 34
1414
versionCode 1
1515
versionName "1.0"
1616

@@ -31,19 +31,19 @@ android {
3131
}
3232
}
3333
compileOptions {
34-
sourceCompatibility JavaVersion.VERSION_1_8
35-
targetCompatibility JavaVersion.VERSION_1_8
34+
sourceCompatibility JavaVersion.VERSION_17
35+
targetCompatibility JavaVersion.VERSION_17
3636
}
3737
kotlinOptions {
38-
jvmTarget = '1.8'
38+
jvmTarget = '17'
3939
}
4040
buildFeatures {
4141
compose true
4242
}
4343
composeOptions {
44-
kotlinCompilerExtensionVersion '1.3.1'
44+
kotlinCompilerExtensionVersion '1.5.0'
4545
}
46-
ndkVersion "25.1.8937393"
46+
ndkVersion "25.2.9519653"
4747
externalNativeBuild {
4848
cmake {
4949
path = file("src/main/jni/whisper/CMakeLists.txt")
@@ -57,19 +57,19 @@ android {
5757
}
5858

5959
dependencies {
60-
implementation 'androidx.activity:activity-compose:1.6.1'
61-
implementation 'androidx.compose.material:material-icons-core:1.3.1'
62-
implementation 'androidx.compose.material3:material3:1.0.1'
63-
implementation "androidx.compose.ui:ui:1.3.2"
64-
implementation "androidx.compose.ui:ui-tooling-preview:1.3.2"
65-
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1'
60+
implementation 'androidx.activity:activity-compose:1.7.2'
61+
implementation 'androidx.compose.material:material-icons-core:1.5.0'
62+
implementation 'androidx.compose.material3:material3:1.1.1'
63+
implementation "androidx.compose.ui:ui:1.5.0"
64+
implementation "androidx.compose.ui:ui-tooling-preview:1.5.0"
65+
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1'
6666
implementation "com.google.accompanist:accompanist-permissions:0.28.0"
67-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
67+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.2'
6868

6969
testImplementation 'junit:junit:4.13.2'
70-
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
71-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
72-
androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.3.2"
73-
debugImplementation "androidx.compose.ui:ui-tooling:1.3.2"
74-
debugImplementation "androidx.compose.ui:ui-test-manifest:1.3.2"
70+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
71+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
72+
androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.5.0"
73+
debugImplementation "androidx.compose.ui:ui-tooling:1.5.0"
74+
debugImplementation "androidx.compose.ui:ui-test-manifest:1.5.0"
7575
}

examples/whisper.android/app/src/main/java/com/whispercppdemo/ui/main/MainScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private fun MainScreen(
6666

6767
@Composable
6868
private fun MessageLog(log: String) {
69-
SelectionContainer() {
69+
SelectionContainer {
7070
Text(modifier = Modifier.verticalScroll(rememberScrollState()), text = log)
7171
}
7272
}

examples/whisper.android/app/src/main/java/com/whispercppdemo/ui/main/MainScreenViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class MainScreenViewModel(private val application: Application) : ViewModel() {
4747
}
4848

4949
private suspend fun printSystemInfo() {
50-
printMessage(String.format("System Info: %s\n", WhisperContext.getSystemInfo()));
50+
printMessage(String.format("System Info: %s\n", WhisperContext.getSystemInfo()))
5151
}
5252

5353
private suspend fun loadData() {

examples/whisper.android/app/src/main/java/com/whispercppdemo/ui/theme/Theme.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import androidx.compose.runtime.SideEffect
1313
import androidx.compose.ui.graphics.toArgb
1414
import androidx.compose.ui.platform.LocalContext
1515
import androidx.compose.ui.platform.LocalView
16-
import androidx.core.view.ViewCompat
16+
import androidx.core.view.WindowCompat
1717

1818
private val DarkColorScheme = darkColorScheme(
1919
primary = Purple80,
@@ -55,8 +55,9 @@ fun WhisperCppDemoTheme(
5555
val view = LocalView.current
5656
if (!view.isInEditMode) {
5757
SideEffect {
58-
(view.context as Activity).window.statusBarColor = colorScheme.primary.toArgb()
59-
ViewCompat.getWindowInsetsController(view)?.isAppearanceLightStatusBars = darkTheme
58+
val window = (view.context as Activity).window
59+
window.statusBarColor = colorScheme.primary.toArgb()
60+
WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme
6061
}
6162
}
6263

examples/whisper.android/app/src/main/res/values/colors.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

examples/whisper.android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
plugins {
3-
id 'com.android.application' version '7.3.1' apply false
4-
id 'com.android.library' version '7.3.1' apply false
5-
id 'org.jetbrains.kotlin.android' version '1.7.10' apply false
3+
id 'com.android.application' version '8.1.1' apply false
4+
id 'com.android.library' version '8.1.1' apply false
5+
id 'org.jetbrains.kotlin.android' version '1.9.0' apply false
66
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Wed Dec 14 10:37:24 EST 2022
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)