diff --git a/app/build.gradle b/app/build.gradle index d95f3cc66a..9e188f39e9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -106,8 +106,8 @@ android { defaultConfig { applicationId "com.nextcloud.client" minSdkVersion 24 - targetSdkVersion 34 - compileSdk 34 + targetSdkVersion 35 + compileSdk 35 buildConfigField 'boolean', 'CI', ciBuild.toString() buildConfigField 'boolean', 'RUNTIME_PERF_ANALYSIS', perfAnalysis.toString() diff --git a/app/src/main/java/com/nextcloud/client/appinfo/AppInfoImpl.kt b/app/src/main/java/com/nextcloud/client/appinfo/AppInfoImpl.kt index 7fb222b6c2..4c97af52a3 100644 --- a/app/src/main/java/com/nextcloud/client/appinfo/AppInfoImpl.kt +++ b/app/src/main/java/com/nextcloud/client/appinfo/AppInfoImpl.kt @@ -18,12 +18,8 @@ class AppInfoImpl : AppInfo { override fun getAppVersion(context: Context): String { return try { - val pInfo = context.packageManager.getPackageInfo(context.packageName, 0) - if (pInfo != null) { - pInfo.versionName - } else { - "n/a" - } + val packageInfo = context.packageManager.getPackageInfo(context.packageName, 0) + packageInfo.versionName ?: "n/a" } catch (e: PackageManager.NameNotFoundException) { Log_OC.e(this, "Trying to get packageName", e.cause) "n/a" diff --git a/app/src/main/java/com/owncloud/android/utils/WebViewUtil.kt b/app/src/main/java/com/owncloud/android/utils/WebViewUtil.kt index c3dbbd73e7..b012242179 100644 --- a/app/src/main/java/com/owncloud/android/utils/WebViewUtil.kt +++ b/app/src/main/java/com/owncloud/android/utils/WebViewUtil.kt @@ -77,7 +77,7 @@ class WebViewUtil(private val context: Context) { return try { val pi = pm.getPackageInfo("com.google.android.webview", 0) - val fullVersion = pi.versionName + val fullVersion = pi.versionName ?: return null // Split the version string by "." and get the first part val versionParts = fullVersion.split("\\.".toRegex()).dropLastWhile { it.isEmpty() } diff --git a/appscan/build.gradle b/appscan/build.gradle index bdcab491ac..941be8e143 100644 --- a/appscan/build.gradle +++ b/appscan/build.gradle @@ -19,11 +19,11 @@ apply plugin: 'kotlin-android' android { namespace 'com.nextcloud.appscan' - compileSdk 34 defaultConfig { - minSdk 21 - targetSdk 34 + minSdk 24 + targetSdk 35 + compileSdk 35 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -45,6 +45,6 @@ android { } dependencies { - implementation "androidx.appcompat:appcompat:1.7.0" + implementation "androidx.appcompat:appcompat:$appCompatVersion" implementation "com.github.zynkware:Document-Scanning-Android-SDK:$documentScannerVersion" }