Skip to content

Commit

Permalink
Update targetSdk and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mueller-ma committed Nov 6, 2024
1 parent ae17ed9 commit 7d755d9
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@ plugins {
android {
namespace 'com.github.muellerma.prepaidbalance'

buildToolsVersion "34.0.0"

repositories {
maven { url "https://jitpack.io" }
}

defaultConfig {
applicationId "com.github.muellerma.prepaidbalance"
minSdkVersion 26
compileSdk 34
targetSdkVersion 34
compileSdk 35
targetSdkVersion 35
versionCode 38
versionName "2.9"

Expand Down Expand Up @@ -65,11 +63,11 @@ android {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "androidx.core:core-ktx:1.13.1"
implementation "androidx.fragment:fragment-ktx:1.8.3"
implementation "androidx.core:core-ktx:1.15.0"
implementation "androidx.fragment:fragment-ktx:1.8.5"
implementation "androidx.appcompat:appcompat:1.7.0"
implementation "androidx.preference:preference-ktx:1.2.1"
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
implementation "androidx.constraintlayout:constraintlayout:2.2.0"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
implementation "com.google.android.material:material:1.12.0"
implementation "androidx.work:work-runtime-ktx:$workmanager_version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ class MainActivity : AbstractBaseActivity(), SwipeRefreshLayout.OnRefreshListene
val subscriptionManager = getSystemService(SubscriptionManager::class.java)
if (hasPermissions(READ_PHONE_STATE)) {
@SuppressLint("MissingPermission") // Permission IS checked one line above
val defaultSubscriptionId = subscriptionManager.activeSubscriptionInfoList.firstOrNull()?.subscriptionId
val defaultSubscriptionId = subscriptionManager.activeSubscriptionInfoList?.firstOrNull()?.subscriptionId
prefs().subscriptionId = defaultSubscriptionId
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ class PreferenceActivity : AbstractBaseActivity() {
return
}
val subscriptionManager = requireContext().getSystemService(SubscriptionManager::class.java)
val (subscriptionIds, carrierNames) = subscriptionManager.activeSubscriptionInfoList.let { subscriptions ->
val (subscriptionIds, carrierNames) = subscriptionManager.activeSubscriptionInfoList?.let { subscriptions ->
val subscriptionIds = subscriptions.map { "${it.subscriptionId}" }.toTypedArray()
val carrierNames = subscriptions.map { it.carrierName.ifBlank { it.displayName } }.toTypedArray()
subscriptionIds to carrierNames
}
} ?: (emptyArray<String>() to emptyArray())

val subscriptionIdPref = getPreference("subscription_id") as ListPreference
subscriptionIdPref.isEnabled = true
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.9.23"
ext.kotlin_version = "2.0.21"
ext.room_version = "2.6.1"
ext.workmanager_version = "2.9.1"
ext.workmanager_version = "2.10.0"
ext.about_libraries_version="11.2.3"

repositories {
Expand All @@ -12,7 +12,7 @@ buildscript {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:8.5.2'
classpath 'com.android.tools.build:gradle:8.6.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:$about_libraries_version"

Expand All @@ -23,7 +23,7 @@ buildscript {

plugins {
// modern kotlin annotation support; replaces kapt: https://developer.android.com/build/migrate-to-ksp
id 'com.google.devtools.ksp' version '1.9.23-1.0.20' apply false
id 'com.google.devtools.ksp' version '2.0.21-1.0.26' apply false
}

allprojects {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
android.nonTransitiveRClass=false
android.nonFinalResIds=false
android.nonFinalResIds=false

0 comments on commit 7d755d9

Please sign in to comment.