Merge pull request #14084 from nextcloud/api-level-35

Upgrade The SDK Version to 35
This commit is contained in:
Tobias Kaminsky 2024-12-09 08:39:00 +01:00 committed by GitHub
commit 5531d29213
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 9 additions and 13 deletions

View file

@ -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()

View file

@ -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"

View file

@ -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() }

View file

@ -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"
}