diff --git a/examples/whisper.android/.idea/compiler.xml b/examples/whisper.android/.idea/compiler.xml index fb7f4a8a..b589d56e 100644 --- a/examples/whisper.android/.idea/compiler.xml +++ b/examples/whisper.android/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/examples/whisper.android/.idea/gradle.xml b/examples/whisper.android/.idea/gradle.xml index a2d7c213..0897082f 100644 --- a/examples/whisper.android/.idea/gradle.xml +++ b/examples/whisper.android/.idea/gradle.xml @@ -4,15 +4,15 @@ diff --git a/examples/whisper.android/.idea/misc.xml b/examples/whisper.android/.idea/misc.xml index bdd92780..0ad17cbd 100644 --- a/examples/whisper.android/.idea/misc.xml +++ b/examples/whisper.android/.idea/misc.xml @@ -1,7 +1,7 @@ - + diff --git a/examples/whisper.android/app/build.gradle b/examples/whisper.android/app/build.gradle index 98133b27..7134d9f1 100644 --- a/examples/whisper.android/app/build.gradle +++ b/examples/whisper.android/app/build.gradle @@ -5,12 +5,12 @@ plugins { android { namespace 'com.whispercppdemo' - compileSdk 33 + compileSdk 34 defaultConfig { applicationId "com.whispercppdemo" minSdk 26 - targetSdk 32 + targetSdk 34 versionCode 1 versionName "1.0" @@ -31,19 +31,19 @@ android { } } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '17' } buildFeatures { compose true } composeOptions { - kotlinCompilerExtensionVersion '1.3.1' + kotlinCompilerExtensionVersion '1.5.0' } - ndkVersion "25.1.8937393" + ndkVersion "25.2.9519653" externalNativeBuild { cmake { path = file("src/main/jni/whisper/CMakeLists.txt") @@ -57,19 +57,19 @@ android { } dependencies { - implementation 'androidx.activity:activity-compose:1.6.1' - implementation 'androidx.compose.material:material-icons-core:1.3.1' - implementation 'androidx.compose.material3:material3:1.0.1' - implementation "androidx.compose.ui:ui:1.3.2" - implementation "androidx.compose.ui:ui-tooling-preview:1.3.2" - implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1' + implementation 'androidx.activity:activity-compose:1.7.2' + implementation 'androidx.compose.material:material-icons-core:1.5.0' + implementation 'androidx.compose.material3:material3:1.1.1' + implementation "androidx.compose.ui:ui:1.5.0" + implementation "androidx.compose.ui:ui-tooling-preview:1.5.0" + implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1' implementation "com.google.accompanist:accompanist-permissions:0.28.0" - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4' + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.2' testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.4' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0' - androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.3.2" - debugImplementation "androidx.compose.ui:ui-tooling:1.3.2" - debugImplementation "androidx.compose.ui:ui-test-manifest:1.3.2" + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.5.0" + debugImplementation "androidx.compose.ui:ui-tooling:1.5.0" + debugImplementation "androidx.compose.ui:ui-test-manifest:1.5.0" } \ No newline at end of file diff --git a/examples/whisper.android/app/src/main/java/com/whispercppdemo/ui/main/MainScreen.kt b/examples/whisper.android/app/src/main/java/com/whispercppdemo/ui/main/MainScreen.kt index 30128f3a..38f11b81 100644 --- a/examples/whisper.android/app/src/main/java/com/whispercppdemo/ui/main/MainScreen.kt +++ b/examples/whisper.android/app/src/main/java/com/whispercppdemo/ui/main/MainScreen.kt @@ -66,7 +66,7 @@ private fun MainScreen( @Composable private fun MessageLog(log: String) { - SelectionContainer() { + SelectionContainer { Text(modifier = Modifier.verticalScroll(rememberScrollState()), text = log) } } diff --git a/examples/whisper.android/app/src/main/java/com/whispercppdemo/ui/main/MainScreenViewModel.kt b/examples/whisper.android/app/src/main/java/com/whispercppdemo/ui/main/MainScreenViewModel.kt index 269f0c2a..bd477932 100644 --- a/examples/whisper.android/app/src/main/java/com/whispercppdemo/ui/main/MainScreenViewModel.kt +++ b/examples/whisper.android/app/src/main/java/com/whispercppdemo/ui/main/MainScreenViewModel.kt @@ -47,7 +47,7 @@ class MainScreenViewModel(private val application: Application) : ViewModel() { } private suspend fun printSystemInfo() { - printMessage(String.format("System Info: %s\n", WhisperContext.getSystemInfo())); + printMessage(String.format("System Info: %s\n", WhisperContext.getSystemInfo())) } private suspend fun loadData() { diff --git a/examples/whisper.android/app/src/main/java/com/whispercppdemo/ui/theme/Theme.kt b/examples/whisper.android/app/src/main/java/com/whispercppdemo/ui/theme/Theme.kt index 5f6b5bb1..7a46f291 100644 --- a/examples/whisper.android/app/src/main/java/com/whispercppdemo/ui/theme/Theme.kt +++ b/examples/whisper.android/app/src/main/java/com/whispercppdemo/ui/theme/Theme.kt @@ -13,7 +13,7 @@ import androidx.compose.runtime.SideEffect import androidx.compose.ui.graphics.toArgb import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalView -import androidx.core.view.ViewCompat +import androidx.core.view.WindowCompat private val DarkColorScheme = darkColorScheme( primary = Purple80, @@ -55,8 +55,9 @@ fun WhisperCppDemoTheme( val view = LocalView.current if (!view.isInEditMode) { SideEffect { - (view.context as Activity).window.statusBarColor = colorScheme.primary.toArgb() - ViewCompat.getWindowInsetsController(view)?.isAppearanceLightStatusBars = darkTheme + val window = (view.context as Activity).window + window.statusBarColor = colorScheme.primary.toArgb() + WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme } } diff --git a/examples/whisper.android/app/src/main/res/values/colors.xml b/examples/whisper.android/app/src/main/res/values/colors.xml deleted file mode 100644 index f8c6127d..00000000 --- a/examples/whisper.android/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - #FFBB86FC - #FF6200EE - #FF3700B3 - #FF03DAC5 - #FF018786 - #FF000000 - #FFFFFFFF - \ No newline at end of file diff --git a/examples/whisper.android/build.gradle b/examples/whisper.android/build.gradle index 498eb4d5..ae1f486b 100644 --- a/examples/whisper.android/build.gradle +++ b/examples/whisper.android/build.gradle @@ -1,6 +1,6 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '7.3.1' apply false - id 'com.android.library' version '7.3.1' apply false - id 'org.jetbrains.kotlin.android' version '1.7.10' apply false + id 'com.android.application' version '8.1.1' apply false + id 'com.android.library' version '8.1.1' apply false + id 'org.jetbrains.kotlin.android' version '1.9.0' apply false } \ No newline at end of file diff --git a/examples/whisper.android/gradle/wrapper/gradle-wrapper.properties b/examples/whisper.android/gradle/wrapper/gradle-wrapper.properties index fde73e8a..a7b943c9 100644 --- a/examples/whisper.android/gradle/wrapper/gradle-wrapper.properties +++ b/examples/whisper.android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Wed Dec 14 10:37:24 EST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME