From b36462f9305956d06176cf0af9f903973483a33d Mon Sep 17 00:00:00 2001 From: Ezerous Date: Wed, 1 Sep 2021 14:21:11 +0300 Subject: [PATCH] Drop KitKat support, up libs --- README.md | 4 +- app/build.gradle | 50 ++- app/src/main/assets/apache_libraries.html | 10 +- app/src/main/assets/mit_libraries.html | 2 +- app/src/main/assets/other_libraries.html | 2 +- .../bookmarks/BookmarksFragment.java | 13 +- .../mthmmy/activities/main/MainActivity.java | 9 - .../activities/profile/ProfileActivity.java | 9 - .../profile/stats/StatsFragment.java | 7 +- .../activities/shoutbox/ShoutAdapter.java | 4 - .../activities/topic/TopicActivity.java | 9 - .../mthmmy/activities/topic/TopicAdapter.java | 18 +- .../activities/upload/UploadActivity.java | 65 ++-- .../activities/upload/UploadsCourse.java | 8 +- .../gr/thmmy/mthmmy/base/BaseActivity.java | 112 +------ .../gr/thmmy/mthmmy/base/BaseApplication.java | 38 +-- .../mthmmy/services/UploadsReceiver.java | 95 +----- .../utils/parsing/ThmmyDateTimeParser.java | 5 +- .../main/res/layout-v21/activity_profile.xml | 124 ------- .../layout-v21/activity_topic_post_row.xml | 262 --------------- app/src/main/res/layout/activity_profile.xml | 1 + .../res/layout/activity_topic_post_row.xml | 4 +- app/src/main/res/values-v21/styles.xml | 11 - app/src/main/res/values/styles.xml | 10 +- app/src/main/res/values/uploads_courses.xml | 307 +++++++++--------- build.gradle | 6 +- 26 files changed, 243 insertions(+), 942 deletions(-) delete mode 100644 app/src/main/res/layout-v21/activity_profile.xml delete mode 100644 app/src/main/res/layout-v21/activity_topic_post_row.xml delete mode 100644 app/src/main/res/values-v21/styles.xml diff --git a/README.md b/README.md index 598072af..7d0fd105 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # mTHMMY [![GitHub release](https://img.shields.io/github/release/ThmmyNoLife/mTHMMY.svg?color=orange)](https://github.com/ThmmyNoLife/mTHMMY/releases) -[![API](https://img.shields.io/badge/API-19%2B-blue.svg?style=flat)](https://android-arsenal.com/api?level=19) +[![API](https://img.shields.io/badge/API-21%2B-blue.svg?style=flat)](https://android-arsenal.com/api?level=21) [![Discord Channel](https://img.shields.io/discord/252539000571559947?style=flat&color=738bd7&label=discord)][discord-server] ![Last Commit](https://img.shields.io/github/last-commit/ThmmyNoLife/mTHMMY/develop.svg?style=flat) @@ -11,7 +11,7 @@ A mobile app for [thmmy.gr](https://www.thmmy.gr). ## Requirements -mTHMMY can be installed on any smartphone with Android 4.4 KitKat or newer. +mTHMMY can be installed on any smartphone with Android 5.0 Lollipop or newer. ## Download diff --git a/app/build.gradle b/app/build.gradle index 2ae628d2..7284acd8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,16 +7,15 @@ apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.firebase.crashlytics' android { - compileSdkVersion 29 - buildToolsVersion = '29.0.3' + compileSdkVersion 30 + buildToolsVersion = '30.0.2' defaultConfig { - vectorDrawables.useSupportLibrary = true //TODO: Remove when minSdkVersion >= 21 applicationId "gr.thmmy.mthmmy" - minSdkVersion 19 - targetSdkVersion 29 - versionCode 29 - versionName "1.9.0" + minSdkVersion 21 + targetSdkVersion 30 + versionCode 30 + versionName "2.0.0" archivesBaseName = "mTHMMY-v$versionName" buildConfigField "String", "CURRENT_BRANCH", "\"" + getCurrentBranch() + "\"" buildConfigField "String", "COMMIT_HASH", "\"" + getCommitHash() + "\"" @@ -25,14 +24,11 @@ android { buildTypes { release { - multiDexEnabled true //TODO: Remove when minSdkVersion >= 21 minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - multiDexKeepProguard file('proguard-rules.pro') //TODO: Remove when minSdkVersion >= 21 } debug { - multiDexEnabled true //TODO: Remove when minSdkVersion >= 21 def date = new Date().format('ddMMyy_HHmmss') archivesBaseName = archivesBaseName + "-$date" firebaseCrashlytics { @@ -76,27 +72,24 @@ tasks.whenTaskAdded { task -> dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project(":emojis") - implementation 'androidx.appcompat:appcompat:1.3.0-alpha02' + implementation 'androidx.appcompat:appcompat:1.4.0-alpha03' implementation 'androidx.preference:preference:1.1.1' implementation 'androidx.legacy:legacy-preference-v14:1.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.cardview:cardview:1.0.0' - implementation 'androidx.recyclerview:recyclerview:1.1.0' + implementation 'androidx.recyclerview:recyclerview:1.2.1' implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' - implementation 'androidx.constraintlayout:constraintlayout:2.0.4' - implementation 'androidx.exifinterface:exifinterface:1.2.0' - implementation 'androidx.multidex:multidex:2.0.1' //TODO: Remove when minSdkVersion >= 21 - implementation 'com.google.android.material:material:1.1.0' - implementation 'com.google.firebase:firebase-analytics:17.4.4' - implementation 'com.google.firebase:firebase-crashlytics:17.3.0' - implementation 'com.google.firebase:firebase-messaging:21.0.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.0' + implementation 'androidx.exifinterface:exifinterface:1.3.3' + implementation 'com.google.android.material:material:1.4.0' + implementation platform('com.google.firebase:firebase-bom:28.4.0') + implementation 'com.google.firebase:firebase-analytics' + implementation 'com.google.firebase:firebase-crashlytics' + implementation 'com.google.firebase:firebase-messaging' implementation 'com.snatik:storage:2.1.0' - implementation('com.squareup.okhttp3:okhttp:3.12.12') { - //TODO: Warning: OkHttp has dropped support for Android 19 since OkHttp 3.13! - force = true //TODO: Remove when minSdkVersion >= 21 - } - implementation 'org.jsoup:jsoup:1.13.1' - implementation 'joda-time:joda-time:2.10.8' + implementation 'com.squareup.okhttp3:okhttp:3.14.9' + implementation 'org.jsoup:jsoup:1.14.2' + implementation 'joda-time:joda-time:2.10.10' implementation 'com.github.franmontiel:PersistentCookieJar:1.0.1' implementation 'com.github.PhilJay:MPAndroidChart:3.0.3' implementation 'com.mikepenz:materialdrawer:6.1.1' @@ -108,11 +101,10 @@ dependencies { implementation 'com.jakewharton.timber:timber:4.7.1' implementation 'ru.noties:markwon:2.0.2' implementation 'net.gotev:uploadservice:3.5.2' - implementation 'net.gotev:uploadservice-okhttp:3.4.2' - //TODO: Warning: v.3.5 depends on okhttp 3.13! - implementation 'com.itkacher.okhttpprofiler:okhttpprofiler:1.0.7' + implementation 'net.gotev:uploadservice-okhttp:3.5.2' + implementation 'com.localebro:okhttpprofiler:1.0.8' //Plugin: https://plugins.jetbrains.com/plugin/11249-okhttp-profiler - implementation 'com.github.bumptech.glide:glide:4.11.0' + implementation 'com.github.bumptech.glide:glide:4.12.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0' testImplementation 'junit:junit:4.12' testImplementation 'org.powermock:powermock-core:2.0.2' diff --git a/app/src/main/assets/apache_libraries.html b/app/src/main/assets/apache_libraries.html index 0d6ba704..b3b983b4 100644 --- a/app/src/main/assets/apache_libraries.html +++ b/app/src/main/assets/apache_libraries.html @@ -6,7 +6,7 @@ diff --git a/app/src/main/assets/mit_libraries.html b/app/src/main/assets/mit_libraries.html index 59344819..c775905d 100644 --- a/app/src/main/assets/mit_libraries.html +++ b/app/src/main/assets/mit_libraries.html @@ -6,7 +6,7 @@