From 255a9ed108027f6e2aff8d9d4330677b56585d39 Mon Sep 17 00:00:00 2001 From: Patryk Michalik Date: Tue, 26 Jul 2022 17:21:35 +0200 Subject: [PATCH 1/3] Update to Kuper 2.4.0 & Frames 3.5.0 --- app/build.gradle | 27 +++++----- build.gradle | 1 + buildSrc/src/main/java/Blueprint.kt | 4 +- buildSrc/src/main/java/Plugins.kt | 4 ++ buildSrc/src/main/java/Versions.kt | 13 ++--- gradle.properties | 1 - gradle/wrapper/gradle-wrapper.properties | 6 +-- library/build.gradle | 27 +++++----- library/src/main/AndroidManifest.xml | 5 ++ .../ui/activities/BlueprintAboutActivity.kt | 8 +++ .../ui/activities/BlueprintActivity.kt | 4 ++ .../main/res/values/translatable_strings.xml | 50 +++++++++---------- 12 files changed, 87 insertions(+), 63 deletions(-) create mode 100644 library/src/main/kotlin/dev/jahir/blueprint/ui/activities/BlueprintAboutActivity.kt diff --git a/app/build.gradle b/app/build.gradle index b4450eeff..e905956b2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -18,7 +18,7 @@ apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin' apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-parcelize' -apply plugin: 'kotlin-kapt' +apply plugin: 'com.google.devtools.ksp' android { signingConfigs { @@ -34,7 +34,7 @@ android { } } - lintOptions { + lint { abortOnError false checkReleaseBuilds true disable 'MissingTranslation', 'GoogleAppIndexingWarning' @@ -59,13 +59,10 @@ android { proguardFiles 'proguard-android-optimize.txt', 'proguard-rules.pro' consumerProguardFiles 'proguard-android-optimize.txt', 'proguard-rules.pro' - javaCompileOptions { - annotationProcessorOptions { - arguments = [ - "room.schemaLocation" : "$projectDir/schemas".toString(), - "room.incremental" : "true", - "room.expandProjection": "true"] - } + ksp { + arg("room.schemaLocation", "$projectDir/schemas") + arg("room.incremental", "true") + arg("room.expandProjection", "true") } } @@ -89,10 +86,14 @@ android { } packagingOptions { - pickFirst 'META-INF/core_debug.kotlin_module' - pickFirst 'META-INF/core_release.kotlin_module' - pickFirst 'META-INF/library_debug.kotlin_module' - pickFirst 'META-INF/library_release.kotlin_module' + resources { + pickFirsts += [ + 'META-INF/core_debug.kotlin_module', + 'META-INF/core_release.kotlin_module', + 'META-INF/library_debug.kotlin_module', + 'META-INF/library_release.kotlin_module' + ] + } } compileOptions { diff --git a/build.gradle b/build.gradle index 1281271e2..1c268563c 100644 --- a/build.gradle +++ b/build.gradle @@ -14,6 +14,7 @@ buildscript { classpath Plugins.android classpath Plugins.kotlin classpath Plugins.sonatype + classpath Plugins.ksp } } diff --git a/buildSrc/src/main/java/Blueprint.kt b/buildSrc/src/main/java/Blueprint.kt index 26d83821e..9a49cf821 100644 --- a/buildSrc/src/main/java/Blueprint.kt +++ b/buildSrc/src/main/java/Blueprint.kt @@ -2,6 +2,6 @@ object Blueprint { const val appId = "dev.jahir.blueprint.app" - const val version = 228 - const val versionName = "2.2.8" + const val version = 230 + const val versionName = "2.3.0" } diff --git a/buildSrc/src/main/java/Plugins.kt b/buildSrc/src/main/java/Plugins.kt index 67c69ce6c..a2cad5f46 100644 --- a/buildSrc/src/main/java/Plugins.kt +++ b/buildSrc/src/main/java/Plugins.kt @@ -14,4 +14,8 @@ object Plugins { // Sonatype const val sonatype = "io.github.gradle-nexus:publish-plugin:${Versions.sonatype}" + + // KSP + const val ksp = + "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:${Versions.ksp}" } diff --git a/buildSrc/src/main/java/Versions.kt b/buildSrc/src/main/java/Versions.kt index 3aba40bb2..2be07c172 100644 --- a/buildSrc/src/main/java/Versions.kt +++ b/buildSrc/src/main/java/Versions.kt @@ -2,21 +2,22 @@ object Versions { // Plugins - const val gradle = "7.1.1" - const val kotlin = "1.5.31" + const val gradle = "7.2.1" + const val kotlin = "1.7.0" const val sonatype = "1.1.0" + const val ksp = "$kotlin-1.0.6" // OneSignal const val oneSignalPlugin = "0.14.0" - const val oneSignal = "4.6.7" + const val oneSignal = "4.8.1" // App const val minSdk = 21 - const val targetSdk = 31 - const val buildTools = "30.0.3" + const val targetSdk = 32 + const val buildTools = "32.0.0" // Kuper - const val kuper = "2.3.8" + const val kuper = "2.4.0" // Adaptive Icons const val adaptiveIcons = "1.0.0" diff --git a/gradle.properties b/gradle.properties index e9cb0032a..58c152a15 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,4 +19,3 @@ android.useAndroidX=true android.enableJetifier=true # Kotlin code style for this project: "official" or "obsolete": kotlin.code.style=official -kapt.incremental.apt=true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d96357b26..7c258dce9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Mar 17 11:37:25 COT 2020 +#Sun Jul 24 22:47:34 CEST 2022 distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +zipStoreBase=GRADLE_USER_HOME diff --git a/library/build.gradle b/library/build.gradle index 9df99e0dd..8d571cad5 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,13 +1,13 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'kotlin-parcelize' -apply plugin: 'kotlin-kapt' +apply plugin: 'com.google.devtools.ksp' android { compileSdkVersion Versions.targetSdk buildToolsVersion Versions.buildTools - lintOptions { + lint { abortOnError false checkReleaseBuilds true warningsAsErrors true @@ -29,13 +29,10 @@ android { proguardFiles 'proguard-android-optimize.txt', 'proguard-rules.pro' consumerProguardFiles 'proguard-android-optimize.txt', 'proguard-rules.pro' - javaCompileOptions { - annotationProcessorOptions { - arguments = [ - "room.schemaLocation" : "$projectDir/schemas".toString(), - "room.incremental" : "true", - "room.expandProjection": "true"] - } + ksp { + arg("room.schemaLocation", "$projectDir/schemas") + arg("room.incremental", "true") + arg("room.expandProjection", "true") } } @@ -56,10 +53,14 @@ android { } packagingOptions { - pickFirst 'META-INF/core_debug.kotlin_module' - pickFirst 'META-INF/core_release.kotlin_module' - pickFirst 'META-INF/library_debug.kotlin_module' - pickFirst 'META-INF/library_release.kotlin_module' + resources { + pickFirsts += [ + 'META-INF/core_debug.kotlin_module', + 'META-INF/core_release.kotlin_module', + 'META-INF/library_debug.kotlin_module', + 'META-INF/library_release.kotlin_module' + ] + } } compileOptions { diff --git a/library/src/main/AndroidManifest.xml b/library/src/main/AndroidManifest.xml index d824328f6..69183516f 100644 --- a/library/src/main/AndroidManifest.xml +++ b/library/src/main/AndroidManifest.xml @@ -49,6 +49,11 @@ + + diff --git a/library/src/main/kotlin/dev/jahir/blueprint/ui/activities/BlueprintAboutActivity.kt b/library/src/main/kotlin/dev/jahir/blueprint/ui/activities/BlueprintAboutActivity.kt new file mode 100644 index 000000000..49d9168d7 --- /dev/null +++ b/library/src/main/kotlin/dev/jahir/blueprint/ui/activities/BlueprintAboutActivity.kt @@ -0,0 +1,8 @@ +package dev.jahir.blueprint.ui.activities + +import dev.jahir.frames.ui.activities.AboutActivity +import dev.jahir.kuper.BuildConfig + +class BlueprintAboutActivity : AboutActivity() { + override val dashboardName = BuildConfig.DASHBOARD_NAME +} diff --git a/library/src/main/kotlin/dev/jahir/blueprint/ui/activities/BlueprintActivity.kt b/library/src/main/kotlin/dev/jahir/blueprint/ui/activities/BlueprintActivity.kt index 44511d576..2be57a932 100644 --- a/library/src/main/kotlin/dev/jahir/blueprint/ui/activities/BlueprintActivity.kt +++ b/library/src/main/kotlin/dev/jahir/blueprint/ui/activities/BlueprintActivity.kt @@ -195,6 +195,10 @@ abstract class BlueprintActivity : FramesActivity(), RequestCallback { shouldCallSuper = false startActivity(Intent(this, BlueprintSettingsActivity::class.java)) } + R.id.about -> { + shouldCallSuper = false + startActivity(Intent(this, BlueprintAboutActivity::class.java)) + } } return if (shouldCallSuper) super.onOptionsItemSelected(item) else true } diff --git a/library/src/main/res/values/translatable_strings.xml b/library/src/main/res/values/translatable_strings.xml index b4b5f7876..fca00cc8a 100644 --- a/library/src/main/res/values/translatable_strings.xml +++ b/library/src/main/res/values/translatable_strings.xml @@ -31,7 +31,7 @@ Send With: Sending Request A request is already being sent. - Preparing request... + Preparing request… Request sent. No Apps Selected Select apps to send a request. @@ -58,36 +58,36 @@ - How to use the Icon Pack? - How to apply the Icon Pack? + How to use the icon pack? + How to apply the icon pack? How to see all the included icons? How to replace an icon with an alternative one? - How to request unthemed icons? - After restarting my device, icon pack is not applied anymore. Icons were restored to default. - Why do icons look pixelated on my device? - I can see an icon for X app in the included icons, but the icon does not apply. - Why does the app need permission to modify or delete content of my storage? - Why does the app need permission to full network access? + How to request new icons? + I’ve restarted my device and the icon pack isn’t applied anymore. The default icons have been restored. + Why do the icons look pixelated on my device? + I can see an icon for a specific app in the icon list, but it’s not being applied. + Why does the app need permission to modify or delete the files on my device? + Why does the app need full network access? Why does the app need permission to view connections? - Why does the app need permission to set wallpaper? + Why does the app need permission to set the wallpaper? Why does the app need permission to adjust the wallpaper size? - Why does the app need permission to prevent phone from sleeping? + Why does the app need permission to prevent the device from sleeping? - You need a launcher with icon packs support. The list of supported launchers might be found in the app in the \"Apply\" section, or Play Store description. - Depending on the app\'s navigation type, you need to either slide the navigation drawer from the left, and go to \"Apply\" section, or choose 4th icon from the bottom navigation bar. From there you can choose a launcher you want to apply the icons to. Some launchers doesn\'t support auto-applying and you have to do it manually through their settings. - Go back to main section of the app and tap the tile titled \"Icons\". - Depending on the launcher you\'re using, you either have to long tap the icon and select \"Edit\" from the pop-up menu, or long tap the icon and move it to a \"Edit\" box. - Depending on the app\'s navigation type, you need to either slide the navigation drawer from the left, and go to \"Requests\" section, or choose the icon from the bottom navigation bar. - It happened because the icon pack was moved to SD Card, you should install it in internal storage. - The problem might come with the launcher you are using, when handling big resolution. You can fix it by increasing icon size to 115 – 120%. Or try using another launcher. - Send an icon request. - It\'s needed to be able write icon requests data and files, as well as saving wallpapers, and being able to change Wallpapers\' download location. - It\'s needed to be able to load wallpapers from cloud and download them. - It\'s needed to be able to check if your device has internet connection. - It\'s needed to be able to apply wallpaper directly from the app. - It\'s needed to be able to adjust wallpapers dimensions based on your screen resolution. - It\'s needed by Muzei Live Wallpaper. + You need a launcher with icon pack support. You’ll find a list of supported launchers in the “Apply” section or in the app’s description on the Play Store. + Depending on the app’s navigation type, either slide out the navigation drawer from the left and go to the “Apply” section, or choose “Apply” in the bottom navigation bar. On the “Apply” page, select your launcher. If your launcher isn’t listed, apply the icon pack via the launcher’s settings. + On the main page of the app, tap the tile titled “Icons.” + Depending on the launcher you’re using, either tap and hold the icon and select “Edit” from the pop-up menu, or tap and hold the icon and drag it to the “Edit” box near the top of the screen. + Depending on the app’s navigation type, either slide out the navigation drawer from the left and go to the “Request” section, or choose “Request” in the bottom navigation bar. + This happened because the icon pack has been moved to the SD card. You should move it back to internal storage. + Your launcher may be incorrectly handling the resolution of the icons. You can fix this by increasing the icon size to 115%–120% or switching to another launcher. + Please send an icon request. + It’s used to create icon request files, save wallpapers, and set the download location for wallpapers. + It’s used to load wallpapers from the cloud and download them. + It’s used to check if your device is connected to the internet. + It’s used to let you apply wallpapers directly from the app. + It’s used to adjust the dimensions of wallpapers to match the resolution of your device’s screen. + It’s required by Muzei Live Wallpaper. From 59571882c46cbb08aa2f29c24a66dc49d6287647 Mon Sep 17 00:00:00 2001 From: Patryk Michalik Date: Tue, 26 Jul 2022 17:23:42 +0200 Subject: [PATCH 2/3] `BlueprintAboutActivity.kt`: Import `dev.jahir.blueprint.BuildConfig` instead of `dev.jahir.kuper.BuildConfig` --- .../dev/jahir/blueprint/ui/activities/BlueprintAboutActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/kotlin/dev/jahir/blueprint/ui/activities/BlueprintAboutActivity.kt b/library/src/main/kotlin/dev/jahir/blueprint/ui/activities/BlueprintAboutActivity.kt index 49d9168d7..a4e31c6cf 100644 --- a/library/src/main/kotlin/dev/jahir/blueprint/ui/activities/BlueprintAboutActivity.kt +++ b/library/src/main/kotlin/dev/jahir/blueprint/ui/activities/BlueprintAboutActivity.kt @@ -1,7 +1,7 @@ package dev.jahir.blueprint.ui.activities import dev.jahir.frames.ui.activities.AboutActivity -import dev.jahir.kuper.BuildConfig +import dev.jahir.blueprint.BuildConfig class BlueprintAboutActivity : AboutActivity() { override val dashboardName = BuildConfig.DASHBOARD_NAME From 0b093816f2d5d5b0422eaeeefcdcbb61966c7083 Mon Sep 17 00:00:00 2001 From: Patryk Michalik Date: Tue, 26 Jul 2022 17:30:00 +0200 Subject: [PATCH 3/3] Update strings --- library/src/main/res/values/translatable_strings.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/library/src/main/res/values/translatable_strings.xml b/library/src/main/res/values/translatable_strings.xml index fca00cc8a..201829c18 100644 --- a/library/src/main/res/values/translatable_strings.xml +++ b/library/src/main/res/values/translatable_strings.xml @@ -83,11 +83,11 @@ This happened because the icon pack has been moved to the SD card. You should move it back to internal storage. Your launcher may be incorrectly handling the resolution of the icons. You can fix this by increasing the icon size to 115%–120% or switching to another launcher. Please send an icon request. - It’s used to create icon request files, save wallpapers, and set the download location for wallpapers. - It’s used to load wallpapers from the cloud and download them. - It’s used to check if your device is connected to the internet. - It’s used to let you apply wallpapers directly from the app. - It’s used to adjust the dimensions of wallpapers to match the resolution of your device’s screen. - It’s required by Muzei Live Wallpaper. + It’s needed to create icon request files, save wallpapers, and set the download location for wallpapers. + It’s needed to load wallpapers from the cloud and download them. + It’s needed to check if your device is connected to the internet. + It’s needed to let you apply wallpapers directly from the app. + It’s needed to adjust the dimensions of wallpapers based on the resolution of your device’s screen. + It’s needed by Muzei Live Wallpaper.