From afd1479f844abf4e5a09d20bd227031001f33ccb Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Mon, 19 Sep 2022 19:02:47 +0200 Subject: [PATCH 1/2] Increase sdk and fix crash at the end --- app/build.gradle | 8 ++++---- .../crystalyx/setaswallpaper/SetWallpaperActivity.java | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 5a54d0e..b456fdc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,16 +3,16 @@ plugins { } android { - compileSdkVersion 32 + compileSdkVersion 33 buildToolsVersion "30.0.3" namespace "net.crystalyx.setaswallpaper" defaultConfig { applicationId "net.crystalyx.setaswallpaper" minSdkVersion 5 - targetSdkVersion 32 - versionCode 7 - versionName "3.0" + targetSdkVersion 33 + versionCode 8 + versionName "3.1" } signingConfigs { diff --git a/app/src/main/java/net/crystalyx/setaswallpaper/SetWallpaperActivity.java b/app/src/main/java/net/crystalyx/setaswallpaper/SetWallpaperActivity.java index eb17526..f9a4a64 100644 --- a/app/src/main/java/net/crystalyx/setaswallpaper/SetWallpaperActivity.java +++ b/app/src/main/java/net/crystalyx/setaswallpaper/SetWallpaperActivity.java @@ -78,6 +78,8 @@ public class SetWallpaperActivity extends Activity { } Toast.makeText(this, "Wallpaper set!", Toast.LENGTH_SHORT).show(); + + finish(); } } From 6fb22f722f98f39c25d8c34a5ae421d106ce3508 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Mon, 19 Sep 2022 20:01:08 +0200 Subject: [PATCH 2/2] Rollback SDK and add deprecation warning --- app/build.gradle | 9 ++++++--- build.gradle | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index b456fdc..c097057 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,14 +3,15 @@ plugins { } android { - compileSdkVersion 33 + compileSdkVersion 32 buildToolsVersion "30.0.3" namespace "net.crystalyx.setaswallpaper" defaultConfig { applicationId "net.crystalyx.setaswallpaper" minSdkVersion 5 - targetSdkVersion 33 + //noinspection OldTargetApi + targetSdkVersion 32 versionCode 8 versionName "3.1" } @@ -30,7 +31,9 @@ android { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - signingConfig signingConfigs.release + if (System.env.STORE_FILE) { + signingConfig signingConfigs.release + } } } diff --git a/build.gradle b/build.gradle index e470766..63ea1c4 100644 --- a/build.gradle +++ b/build.gradle @@ -17,6 +17,10 @@ allprojects { google() mavenCentral() } + + tasks.withType(JavaCompile) { + options.deprecation = true + } } task clean(type: Delete) {