Bump dependencies and target SDK 33

This commit is contained in:
sim 2022-09-20 00:26:28 +02:00
parent 079c647164
commit 9744857341
6 changed files with 33 additions and 50 deletions

View File

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

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.unifiedpush.distributor.nextpush" >
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
@ -19,10 +19,10 @@
<activity
android:name=".activities.MainActivity"
android:label="@string/app_name"
android:theme="@style/Theme.NextPush.NoActionBar" >
android:theme="@style/Theme.NextPush.NoActionBar"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
@ -33,14 +33,16 @@
<receiver
android:name=".receivers.StartReceiver"
android:enabled="true" >
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<receiver
android:name=".receivers.RegisterBroadcastReceiver"
android:enabled="true" >
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="org.unifiedpush.android.distributor.feature.BYTES_MESSAGE"/>
<action android:name="org.unifiedpush.android.distributor.REGISTER" />

View File

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

View File

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

View File

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

View File

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