From 44d5f69de15e8e20feecaf7f22857a1dbaf7927e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Borcz?= Date: Fri, 28 May 2021 10:57:25 +0200 Subject: [PATCH] Remove jcenter repository and unused code from gradle config (#1360) --- app/build.gradle | 12 ++++-------- .../repositories/SchoolAnnouncementRepository.kt | 1 - .../ui/modules/timetable/TimetableDialog.kt | 1 - .../github/wulkanowy/utils/security/Scrambler.kt | 9 ++++++--- app/src/main/res/layout/item_student_info.xml | 4 ++-- build.gradle | 15 +-------------- 6 files changed, 13 insertions(+), 29 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 9b5408c8..0a71eb1d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -101,10 +101,6 @@ android { viewBinding = true } - lintOptions { - disable 'HardwareIds' - } - testOptions.unitTests { includeAndroidResources = true } @@ -181,7 +177,7 @@ dependencies { implementation "com.google.android.material:material:1.3.0" implementation "com.github.wulkanowy:material-chips-input:2.2.0" implementation "com.github.PhilJay:MPAndroidChart:v3.1.0" - implementation 'com.mikhaellopez:circularimageview:4.2.0' + implementation 'com.github.lopspower:CircularImageView:4.2.0' implementation "androidx.work:work-runtime-ktx:$work_manager" playImplementation "androidx.work:work-gcm:$work_manager" @@ -197,7 +193,7 @@ dependencies { kapt "androidx.hilt:hilt-compiler:$android_hilt" implementation "androidx.hilt:hilt-work:$android_hilt" - implementation "com.ncapdevi:frag-nav:3.3.0" + implementation 'com.github.ncapdevi:FragNav:3.3.0' implementation "com.github.YarikSOffice:lingver:1.3.0" implementation "com.squareup.moshi:moshi:$moshi" @@ -205,7 +201,7 @@ dependencies { kapt "com.squareup.moshi:moshi-kotlin-codegen:$moshi" implementation "com.jakewharton.timber:timber:4.7.1" implementation "at.favre.lib:slf4j-timber:1.0.1" - implementation "fr.bipi.treessence:treessence:0.3.2" + implementation 'com.github.bastienpaulfr:Treessence:1.0.4' implementation "com.mikepenz:aboutlibraries-core:$about_libraries" implementation "io.coil-kt:coil:1.2.1" implementation "io.github.wulkanowy:AppKillerManager:3.0.0" @@ -223,7 +219,7 @@ dependencies { releaseImplementation "com.github.ChuckerTeam.Chucker:library-no-op:$chucker" debugImplementation "com.github.ChuckerTeam.Chucker:library:$chucker" - debugImplementation "com.amitshekhar.android:debug-db:1.0.6" + debugImplementation 'com.github.amitshekhariitbhu.Android-Debug-Database:debug-db:v1.0.6' testImplementation "junit:junit:4.13.2" testImplementation "io.mockk:mockk:$mockk" diff --git a/app/src/main/java/io/github/wulkanowy/data/repositories/SchoolAnnouncementRepository.kt b/app/src/main/java/io/github/wulkanowy/data/repositories/SchoolAnnouncementRepository.kt index c4fa44c9..8579db7d 100644 --- a/app/src/main/java/io/github/wulkanowy/data/repositories/SchoolAnnouncementRepository.kt +++ b/app/src/main/java/io/github/wulkanowy/data/repositories/SchoolAnnouncementRepository.kt @@ -1,7 +1,6 @@ package io.github.wulkanowy.data.repositories import io.github.wulkanowy.data.db.dao.SchoolAnnouncementDao -import io.github.wulkanowy.data.db.entities.Conference import io.github.wulkanowy.data.db.entities.SchoolAnnouncement import io.github.wulkanowy.data.db.entities.Semester import io.github.wulkanowy.data.db.entities.Student diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetableDialog.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetableDialog.kt index 648d9a58..3f8622f8 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetableDialog.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/timetable/TimetableDialog.kt @@ -18,7 +18,6 @@ import io.github.wulkanowy.utils.getThemeAttrColor import io.github.wulkanowy.utils.lifecycleAwareVariable import io.github.wulkanowy.utils.toFormattedString import java.time.LocalDateTime -import java.util.Locale class TimetableDialog : DialogFragment() { diff --git a/app/src/main/java/io/github/wulkanowy/utils/security/Scrambler.kt b/app/src/main/java/io/github/wulkanowy/utils/security/Scrambler.kt index 5457a7e7..74ae1932 100644 --- a/app/src/main/java/io/github/wulkanowy/utils/security/Scrambler.kt +++ b/app/src/main/java/io/github/wulkanowy/utils/security/Scrambler.kt @@ -51,7 +51,10 @@ private val keyStore: KeyStore private val cipher: Cipher get() { - return if (SDK_INT >= M) Cipher.getInstance("RSA/ECB/OAEPWithSHA-256AndMGF1Padding", "AndroidKeyStoreBCWorkaround") + return if (SDK_INT >= M) Cipher.getInstance( + "RSA/ECB/OAEPWithSHA-256AndMGF1Padding", + "AndroidKeyStoreBCWorkaround" + ) else Cipher.getInstance("RSA/ECB/PKCS1Padding", "AndroidOpenSSL") } @@ -97,8 +100,8 @@ fun decrypt(cipherText: String): String { CipherInputStream(ByteArrayInputStream(decode(cipherText, DEFAULT)), it).let { input -> val values = ArrayList() - var nextByte = 0 - while ({ nextByte = input.read(); nextByte }() != -1) { + var nextByte: Int + while (run { nextByte = input.read(); nextByte } != -1) { values.add(nextByte.toByte()) } val bytes = ByteArray(values.size) diff --git a/app/src/main/res/layout/item_student_info.xml b/app/src/main/res/layout/item_student_info.xml index 8279b133..08eedebc 100644 --- a/app/src/main/res/layout/item_student_info.xml +++ b/app/src/main/res/layout/item_student_info.xml @@ -48,6 +48,6 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" app:srcCompat="@drawable/ic_chevron_right" - app:tint="?colorOnBackground" /> - + app:tint="?colorOnBackground" + tools:ignore="ContentDescription" /> diff --git a/build.gradle b/build.gradle index 8481d0c9..617b3ce2 100644 --- a/build.gradle +++ b/build.gradle @@ -1,13 +1,12 @@ buildscript { ext { - kotlin_version = '1.5.0' + kotlin_version = '1.5.10' about_libraries = '8.8.5' hilt_version = "2.35.1" } repositories { mavenCentral() google() - jcenter() maven { url "https://plugins.gradle.org/m2/" } maven { url "https://developer.huawei.com/repo/" } } @@ -26,22 +25,10 @@ buildscript { } } -project.ext.preDexLibs = !project.hasProperty("disablePreDex") -subprojects { - project.plugins.whenPluginAdded { plugin -> - if ("com.android.build.gradle.AppPlugin" == plugin.class.name) { - project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs - } else if ("com.android.build.gradle.LibraryPlugin" == plugin.class.name) { - project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs - } - } -} - allprojects { repositories { mavenCentral() google() - jcenter() maven { url "https://jitpack.io" } maven { url "https://developer.huawei.com/repo/" } }