From d6bdf510a454341b1dbac60cd968797f53845e76 Mon Sep 17 00:00:00 2001 From: aminecmi Date: Sat, 5 Nov 2022 22:00:16 +0100 Subject: [PATCH] About config upgrade. --- androidApp/build.gradle.kts | 20 ++++++++++++++----- .../android/ReaderActivity.kt | 4 ++-- .../android/fragments/ArticleFragment.kt | 2 +- build.gradle.kts | 1 + 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index dee5f0e..462495a 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -6,6 +6,7 @@ plugins { id("com.android.application") kotlin("android") kotlin("kapt") + id("com.mikepenz.aboutlibraries.plugin") } fun Project.execWithOutput(cmd: String, ignore: Boolean = false): String { @@ -62,7 +63,7 @@ android { kotlinOptions { jvmTarget = "11" } - compileSdk = 32 + compileSdk = 33 buildToolsVersion = "31.0.0" buildFeatures { viewBinding = true @@ -70,7 +71,7 @@ android { defaultConfig { applicationId = "bou.amine.apps.readerforselfossv2.android" minSdk = 21 - targetSdk = 32 + targetSdk = 33 versionCode = versionCodeFromGit() versionName = versionNameFromGit() @@ -138,9 +139,8 @@ dependencies { implementation("androidx.multidex:multidex:2.0.1") // About - implementation("com.mikepenz:aboutlibraries-core:8.9.4") - implementation("com.mikepenz:aboutlibraries:8.9.4") - implementation("com.mikepenz:aboutlibraries-definitions:8.9.4") + implementation("com.mikepenz:aboutlibraries-core:10.5.1") + implementation("com.mikepenz:aboutlibraries:10.5.1") // Retrofit + http logging + okhttp implementation("com.squareup.retrofit2:retrofit:2.9.0") @@ -209,4 +209,14 @@ tasks.withType { ) showStandardStreams = true } +} + +aboutLibraries { + offlineMode = true + fetchRemoteLicense = false + fetchRemoteFunding = false + includePlatform = false + strictMode = com.mikepenz.aboutlibraries.plugin.StrictMode.FAIL + duplicationMode = com.mikepenz.aboutlibraries.plugin.DuplicateMode.MERGE + duplicationRule = com.mikepenz.aboutlibraries.plugin.DuplicateRule.GROUP } \ No newline at end of file diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/ReaderActivity.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/ReaderActivity.kt index 4214ef4..c30c43f 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/ReaderActivity.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/ReaderActivity.kt @@ -36,9 +36,9 @@ class ReaderActivity : AppCompatActivity(), DIAware { private fun showMenuItem(willAddToFavorite: Boolean) { if (willAddToFavorite) { - toolbarMenu.findItem(R.id.star).icon.setTint(Color.WHITE) + toolbarMenu.findItem(R.id.star).icon?.setTint(Color.WHITE) } else { - toolbarMenu.findItem(R.id.star).icon.setTint(Color.RED) + toolbarMenu.findItem(R.id.star).icon?.setTint(Color.RED) } } diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ArticleFragment.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ArticleFragment.kt index 5773335..2cc674d 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ArticleFragment.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ArticleFragment.kt @@ -389,7 +389,7 @@ class ArticleFragment : Fragment(), DIAware { } val gestureDetector = GestureDetector(activity, object : GestureDetector.SimpleOnGestureListener() { - override fun onSingleTapUp(e: MotionEvent?): Boolean { + override fun onSingleTapUp(e: MotionEvent): Boolean { return performClick() } }) diff --git a/build.gradle.kts b/build.gradle.kts index 42ac4ce..51f97aa 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,6 +12,7 @@ plugins { kotlin("android").version("1.7.20").apply(false) kotlin("multiplatform").version("1.7.20").apply(false) id("org.sonarqube").version("3.4.0.2513").apply(false) + id("com.mikepenz.aboutlibraries.plugin").version("10.5.1").apply(false) } apply(plugin = "org.sonarqube") -- 2.34.1