mirror of
https://github.com/nextcloud/android.git
synced 2024-12-18 15:01:57 +03:00
Merge pull request #14084 from nextcloud/api-level-35
Upgrade The SDK Version to 35
This commit is contained in:
commit
5531d29213
4 changed files with 9 additions and 13 deletions
|
@ -106,8 +106,8 @@ android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.nextcloud.client"
|
applicationId "com.nextcloud.client"
|
||||||
minSdkVersion 24
|
minSdkVersion 24
|
||||||
targetSdkVersion 34
|
targetSdkVersion 35
|
||||||
compileSdk 34
|
compileSdk 35
|
||||||
|
|
||||||
buildConfigField 'boolean', 'CI', ciBuild.toString()
|
buildConfigField 'boolean', 'CI', ciBuild.toString()
|
||||||
buildConfigField 'boolean', 'RUNTIME_PERF_ANALYSIS', perfAnalysis.toString()
|
buildConfigField 'boolean', 'RUNTIME_PERF_ANALYSIS', perfAnalysis.toString()
|
||||||
|
|
|
@ -18,12 +18,8 @@ class AppInfoImpl : AppInfo {
|
||||||
|
|
||||||
override fun getAppVersion(context: Context): String {
|
override fun getAppVersion(context: Context): String {
|
||||||
return try {
|
return try {
|
||||||
val pInfo = context.packageManager.getPackageInfo(context.packageName, 0)
|
val packageInfo = context.packageManager.getPackageInfo(context.packageName, 0)
|
||||||
if (pInfo != null) {
|
packageInfo.versionName ?: "n/a"
|
||||||
pInfo.versionName
|
|
||||||
} else {
|
|
||||||
"n/a"
|
|
||||||
}
|
|
||||||
} catch (e: PackageManager.NameNotFoundException) {
|
} catch (e: PackageManager.NameNotFoundException) {
|
||||||
Log_OC.e(this, "Trying to get packageName", e.cause)
|
Log_OC.e(this, "Trying to get packageName", e.cause)
|
||||||
"n/a"
|
"n/a"
|
||||||
|
|
|
@ -77,7 +77,7 @@ class WebViewUtil(private val context: Context) {
|
||||||
|
|
||||||
return try {
|
return try {
|
||||||
val pi = pm.getPackageInfo("com.google.android.webview", 0)
|
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
|
// Split the version string by "." and get the first part
|
||||||
val versionParts = fullVersion.split("\\.".toRegex()).dropLastWhile { it.isEmpty() }
|
val versionParts = fullVersion.split("\\.".toRegex()).dropLastWhile { it.isEmpty() }
|
||||||
|
|
|
@ -19,11 +19,11 @@ apply plugin: 'kotlin-android'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'com.nextcloud.appscan'
|
namespace 'com.nextcloud.appscan'
|
||||||
compileSdk 34
|
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk 21
|
minSdk 24
|
||||||
targetSdk 34
|
targetSdk 35
|
||||||
|
compileSdk 35
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,6 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "androidx.appcompat:appcompat:1.7.0"
|
implementation "androidx.appcompat:appcompat:$appCompatVersion"
|
||||||
implementation "com.github.zynkware:Document-Scanning-Android-SDK:$documentScannerVersion"
|
implementation "com.github.zynkware:Document-Scanning-Android-SDK:$documentScannerVersion"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue