summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2022-05-03 16:10:30 +0200
committerArne Schwabe <arne@rfc2549.org>2022-05-04 08:21:15 +0200
commit5303c1ab56ed2acbad3ec46ae4a3de290cc2f402 (patch)
tree97b2ae12b932a0363eecb68148d85c3cad6cc238
parentb42b938764d35a740c68fdf98d0583eea791299c (diff)
Update gradle modules and dependencies
-rw-r--r--build.gradle.kts2
-rw-r--r--main/build.gradle.kts27
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/fragments/GeneralSettings.kt6
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Authentication.kt2
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/fragments/Settings_IP.kt2
5 files changed, 21 insertions, 18 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index 825163d0..19a01128 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -15,7 +15,7 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath("com.android.tools.build:gradle:7.1.2")
+ classpath("com.android.tools.build:gradle:7.1.3")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
}
}
diff --git a/main/build.gradle.kts b/main/build.gradle.kts
index d7abaebb..6cc4141c 100644
--- a/main/build.gradle.kts
+++ b/main/build.gradle.kts
@@ -13,13 +13,13 @@ plugins {
}
android {
- compileSdk = 31
+ compileSdk = 32
//ndkVersion = "23.0.7599858"
defaultConfig {
minSdk = 16
- targetSdk = 31
+ targetSdk = 32
versionCode = 189
versionName = "0.7.34"
externalNativeBuild {
@@ -161,10 +161,10 @@ android.applicationVariants.all(object : Action<ApplicationVariant> {
dependencies {
// https://maven.google.com/web/index.html
// https://developer.android.com/jetpack/androidx/releases/core
- val preferenceVersion = "1.1.1"
- val coreVersion = "1.6.0"
- val materialVersion = "1.1.0"
- val fragment_version = "1.3.6"
+ val preferenceVersion = "1.2.0"
+ val coreVersion = "1.7.0"
+ val materialVersion = "1.5.0"
+ val fragment_version = "1.4.1"
implementation("androidx.annotation:annotation:1.3.0")
@@ -172,13 +172,13 @@ dependencies {
// Is there a nicer way to do this?
- dependencies.add("uiImplementation", "androidx.constraintlayout:constraintlayout:2.1.1")
- dependencies.add("uiImplementation", "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.30")
+ dependencies.add("uiImplementation", "androidx.constraintlayout:constraintlayout:2.1.3")
+ dependencies.add("uiImplementation", "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21")
dependencies.add("uiImplementation", "androidx.cardview:cardview:1.0.0")
dependencies.add("uiImplementation", "androidx.recyclerview:recyclerview:1.2.1")
- dependencies.add("uiImplementation", "androidx.appcompat:appcompat:1.3.1")
+ dependencies.add("uiImplementation", "androidx.appcompat:appcompat:1.4.1")
dependencies.add("uiImplementation", "com.github.PhilJay:MPAndroidChart:v3.1.0")
- dependencies.add("uiImplementation", "com.squareup.okhttp3:okhttp:4.9.1")
+ dependencies.add("uiImplementation", "com.squareup.okhttp3:okhttp:4.9.3")
dependencies.add("uiImplementation", "androidx.core:core:$coreVersion")
dependencies.add("uiImplementation", "androidx.core:core-ktx:$coreVersion")
dependencies.add("uiImplementation", "androidx.fragment:fragment-ktx:$fragment_version")
@@ -186,10 +186,11 @@ dependencies {
dependencies.add("uiImplementation", "androidx.preference:preference-ktx:$preferenceVersion")
dependencies.add("uiImplementation", "com.google.android.material:material:$materialVersion")
dependencies.add("uiImplementation", "androidx.webkit:webkit:1.4.0")
- dependencies.add("uiImplementation", "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1")
- dependencies.add("uiImplementation", "androidx.lifecycle:lifecycle-runtime-ktx:2.3.1")
+ dependencies.add("uiImplementation", "androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1")
+ dependencies.add("uiImplementation", "androidx.lifecycle:lifecycle-runtime-ktx:2.4.1")
+ dependencies.add("uiImplementation", "androidx.multidex:multidex:2.0.1")
- testImplementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.30")
+ testImplementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21")
testImplementation("junit:junit:4.13.2")
testImplementation("org.mockito:mockito-core:3.9.0")
testImplementation("org.robolectric:robolectric:4.5.1")
diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/GeneralSettings.kt b/main/src/ui/java/de/blinkt/openvpn/fragments/GeneralSettings.kt
index 24734eb1..0842925d 100644
--- a/main/src/ui/java/de/blinkt/openvpn/fragments/GeneralSettings.kt
+++ b/main/src/ui/java/de/blinkt/openvpn/fragments/GeneralSettings.kt
@@ -50,9 +50,11 @@ class GeneralSettings : PreferenceFragmentCompat(), Preference.OnPreferenceClick
devHacks.removePreference(useInternalFS)
}
- /* Android P does not allow access to the file storage anymore */if (Build.VERSION.SDK_INT > Build.VERSION_CODES.P) {
+ /* Android P does not allow access to the file storage anymore */
+ if (Build.VERSION.SDK_INT > Build.VERSION_CODES.P) {
val useInternalFileSelector = findPreference<Preference>("useInternalFileSelector")
- devHacks.removePreference(useInternalFileSelector)
+ if (useInternalFileSelector != null)
+ devHacks.removePreference(useInternalFileSelector)
}
mExtapp = ExternalAppDatabase(activity)
val clearapi = findPreference<Preference>("clearapi") as Preference
diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Authentication.kt b/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Authentication.kt
index aa5ec7ab..51a4e2e3 100644
--- a/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Authentication.kt
+++ b/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Authentication.kt
@@ -54,7 +54,7 @@ class Settings_Authentication : OpenVpnPreferencesFragment(), Preference.OnPrefe
setRemoteCNSummaryProvider()
mRemoteX509Name = findPreference("remotex509name")!!
mRemoteX509Name.setSummaryProvider { pref ->
- if ((pref as EditTextPreference).text.isEmpty()) "CN (default)" else pref.text
+ if ((pref as EditTextPreference).text?.isEmpty() == true) "CN (default)" else pref.text
}
mUseTLSAuth = findPreference("useTLSAuth")!!
mTLSAuthFile = findPreference("tlsAuthFile")!!
diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_IP.kt b/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_IP.kt
index ada77836..27e6854f 100644
--- a/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_IP.kt
+++ b/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_IP.kt
@@ -111,7 +111,7 @@ class Settings_IP : OpenVpnPreferencesFragment(), Preference.OnPreferenceChangeL
}
class DNSSummaryProvider : Preference.SummaryProvider<Preference> {
- override fun provideSummary(preference: Preference?): CharSequence {
+ override fun provideSummary(preference: Preference): CharSequence {
val ep = preference as EditTextPreference
var summary = ep.text ?: ""
if (summary == "8.8.4.4" || summary == "8.8.8.8" || summary == "2001:4860:4860::8888" || summary == "2001:4860:4860::8844" )