diff --git a/app/build.gradle b/app/build.gradle index 410ca84..6635653 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,19 +4,13 @@ plugins { } android { - compileSdkVersion 30 - buildToolsVersion "30.0.3" - configurations.all { - resolutionStrategy { - force 'androidx.core:core-ktx:1.6.0' - force 'androidx.core:core:1.6.0' - } - } + compileSdkVersion 33 + buildToolsVersion "33.0.0" defaultConfig { applicationId "org.unifiedpush.distributor.nextpush" minSdkVersion 24 - targetSdkVersion 30 + targetSdkVersion 33 versionCode 14 versionName "1.3.3" @@ -35,18 +29,8 @@ android { debuggable true } } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - kotlinOptions { - jvmTarget = '1.8' - } - - packagingOptions { - exclude("META-INF/*") - } + namespace 'org.unifiedpush.distributor.nextpush' } if (project.hasProperty('sign')) { @@ -64,21 +48,14 @@ if (project.hasProperty('sign')) { } dependencies { - ext.coreVersion = "1.6.0" - implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version") - implementation("androidx.core:core:$coreVersion") - implementation("androidx.core:core-ktx:$coreVersion") - implementation("androidx.appcompat:appcompat:1.3.1") - implementation("com.google.android.material:material:1.4.0") + implementation("androidx.appcompat:appcompat:1.5.1") + implementation("com.google.android.material:material:1.6.1") implementation("androidx.constraintlayout:constraintlayout:2.1.4") - implementation("androidx.coordinatorlayout:coordinatorlayout:1.1.0") - implementation(platform("com.squareup.okhttp3:okhttp-bom:4.9.3")) - implementation("com.squareup.okhttp3:okhttp") - implementation("com.squareup.okhttp3:okhttp-sse") - implementation("com.github.nextcloud:Android-SingleSignOn:0.6.0") + implementation("androidx.coordinatorlayout:coordinatorlayout:1.2.0") + implementation("com.squareup.okhttp3:okhttp-sse:4.10.0") + implementation("com.github.nextcloud:Android-SingleSignOn:0.6.1") implementation("com.squareup.retrofit2:retrofit:2.9.0") implementation("io.reactivex.rxjava2:rxjava:2.2.21") - implementation("com.google.code.gson:gson:2.9.0") - implementation("androidx.work:work-runtime-ktx:2.6.0") + implementation("androidx.work:work-runtime-ktx:2.7.1") } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b1dc5c3..0853bc3 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,10 +1,10 @@ - + + @@ -19,10 +19,10 @@ + android:theme="@style/Theme.NextPush.NoActionBar" + android:exported="true"> - @@ -33,14 +33,16 @@ + android:enabled="true" + android:exported="true"> + android:enabled="true" + android:exported="true"> diff --git a/app/src/main/java/org/unifiedpush/distributor/nextpush/activities/MainActivity.kt b/app/src/main/java/org/unifiedpush/distributor/nextpush/activities/MainActivity.kt index e1ab9cb..cdcc112 100644 --- a/app/src/main/java/org/unifiedpush/distributor/nextpush/activities/MainActivity.kt +++ b/app/src/main/java/org/unifiedpush/distributor/nextpush/activities/MainActivity.kt @@ -53,6 +53,7 @@ class MainActivity : AppCompatActivity() { } } + @Deprecated("Deprecated in Java") override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { try { AccountImporter.onActivityResult( @@ -75,7 +76,7 @@ class MainActivity : AppCompatActivity() { } showMain() } - } catch (e: AccountImportCancelledException) {} + } catch (_: AccountImportCancelledException) {} super.onActivityResult(requestCode, resultCode, data) } diff --git a/app/src/main/java/org/unifiedpush/distributor/nextpush/services/NotificationUtils.kt b/app/src/main/java/org/unifiedpush/distributor/nextpush/services/NotificationUtils.kt index 4696f34..4cdb8a1 100644 --- a/app/src/main/java/org/unifiedpush/distributor/nextpush/services/NotificationUtils.kt +++ b/app/src/main/java/org/unifiedpush/distributor/nextpush/services/NotificationUtils.kt @@ -3,13 +3,12 @@ package org.unifiedpush.distributor.nextpush.services import android.app.Notification import android.app.NotificationChannel import android.app.NotificationManager +import android.app.PendingIntent import android.content.Context +import android.content.Intent import android.os.Build import androidx.core.app.NotificationManagerCompat import org.unifiedpush.distributor.nextpush.R -import android.app.PendingIntent - -import android.content.Intent import org.unifiedpush.distributor.nextpush.activities.MainActivity const val NOTIFICATION_ID_FOREGROUND = 51115 @@ -42,8 +41,10 @@ object NotificationUtils { notificationIntent.flags = Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP val intent = PendingIntent.getActivity( - context, 0, - notificationIntent, 0 + context, + 0, + notificationIntent, + PendingIntent.FLAG_IMMUTABLE ) val builder: Notification.Builder = @@ -88,8 +89,10 @@ object NotificationUtils { notificationIntent.flags = Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP val intent = PendingIntent.getActivity( - context, 0, - notificationIntent, 0 + context, + 0, + notificationIntent, + PendingIntent.FLAG_IMMUTABLE ) val builder: Notification.Builder = ( diff --git a/build.gradle b/build.gradle index 9d6c614..ca497af 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,12 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = "1.5.31" + ext.kotlin_version = "1.7.10" repositories { google() mavenCentral() } dependencies { - classpath "com.android.tools.build:gradle:7.0.3" + classpath 'com.android.tools.build:gradle:7.3.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0f80bbf..41dfb87 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists