Skip to content

Commit

Permalink
Update Android dependencies + bump compileSdk to 34
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbeth committed Jan 5, 2024
1 parent b73d5bd commit 4c59723
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
22 changes: 11 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ project.ext.isBuildSigned = (System.getenv("CI") == "true") && (System.getenv("I

android {
namespace 'org.stratoemu.strato'
compileSdk 33
compileSdk 34

defaultConfig {
applicationId "org.stratoemu.strato"
Expand Down Expand Up @@ -157,25 +157,25 @@ android {

dependencies {
/* Google */
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.activity:activity-ktx:1.6.1'
implementation 'com.google.android.material:material:1.8.0'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.activity:activity-ktx:1.8.2'
implementation 'com.google.android.material:material:1.10.0'
implementation 'androidx.documentfile:documentfile:1.0.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.window:window:1.0.0'
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.5.1"
implementation 'androidx.fragment:fragment-ktx:1.5.5'
implementation 'androidx.window:window:1.2.0'
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.6.2"
implementation 'androidx.fragment:fragment-ktx:1.6.2'
implementation "com.google.dagger:hilt-android:$hilt_version"
kapt "com.google.dagger:hilt-compiler:$hilt_version"
implementation 'com.google.android.flexbox:flexbox:3.0.0'

/* Kotlin */
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1"
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2'

/* JetBrains */
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/java/org/stratoemu/strato/EmulationActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ class EmulationActivity : AppCompatActivity(), SurfaceHolder.Callback, View.OnTo
val deviceIds = InputDevice.getDeviceIds()

deviceIds.forEach { deviceId ->
InputDevice.getDevice(deviceId).apply {
InputDevice.getDevice(deviceId)?.apply {
// Verify that the device has gamepad buttons, control sticks, or both.
if (sources and InputDevice.SOURCE_JOYSTICK == InputDevice.SOURCE_JOYSTICK) {
// This device is a game controller.
Expand Down Expand Up @@ -689,12 +689,12 @@ class EmulationActivity : AppCompatActivity(), SurfaceHolder.Callback, View.OnTo
} else {
for (id in InputDevice.getDeviceIds()) {
val device = InputDevice.getDevice(id)
if (device.descriptor == inputManager.controllers[index]!!.rumbleDeviceDescriptor) {
if (device?.descriptor == inputManager.controllers[index]!!.rumbleDeviceDescriptor) {
val vibrator = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
device.vibratorManager.defaultVibrator
device?.vibratorManager!!.defaultVibrator
} else {
@Suppress("DEPRECATION")
device.vibrator!!
device?.vibrator!!
}
vibrators[index] = vibrator
return@let vibrator
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
buildscript {
ext {
kotlin_version = '1.7.21'
hilt_version = '2.44.2'
hilt_version = '2.50'
}

repositories {
Expand Down

0 comments on commit 4c59723

Please sign in to comment.