Switch to AboutLibraries

(cherry picked from commit 77531613325d32d64f543b96b02587a253949ecf)

# Conflicts:
#	app/build.gradle
#	app/src/main/java/eu/kanade/tachiyomi/ui/more/AboutController.kt
#	build.gradle.kts
This commit is contained in:
arkon 2020-06-08 18:26:20 -04:00 committed by Jobobby04
parent 2ee0e5ee42
commit 6574fed71a
4 changed files with 19 additions and 6 deletions

View File

@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'com.google.android.gms.oss-licenses-plugin' apply plugin: 'com.mikepenz.aboutlibraries.plugin'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-kapt'
@ -90,6 +90,9 @@ android {
buildConfigField "boolean", "INCLUDE_UPDATER", "true" buildConfigField "boolean", "INCLUDE_UPDATER", "true"
dimension "default" dimension "default"
} }
fdroid {
dimension "default"
}
dev { dev {
resConfigs "en", "xxhdpi" resConfigs "en", "xxhdpi"
dimension "default" dimension "default"
@ -274,6 +277,11 @@ dependencies {
implementation "io.github.reactivecircus.flowbinding:flowbinding-swiperefreshlayout:$flowbinding_version" implementation "io.github.reactivecircus.flowbinding:flowbinding-swiperefreshlayout:$flowbinding_version"
implementation "io.github.reactivecircus.flowbinding:flowbinding-viewpager:$flowbinding_version" implementation "io.github.reactivecircus.flowbinding:flowbinding-viewpager:$flowbinding_version"
// Licenses
final aboutlibraries_version = '8.2.0'
implementation "com.mikepenz:aboutlibraries-core:$aboutlibraries_version"
implementation "com.mikepenz:aboutlibraries:$aboutlibraries_version"
// Tests // Tests
testImplementation 'junit:junit:4.13' testImplementation 'junit:junit:4.13'
testImplementation 'org.assertj:assertj-core:3.12.2' testImplementation 'org.assertj:assertj-core:3.12.2'

View File

@ -7,7 +7,7 @@ import android.os.Build
import android.os.Bundle import android.os.Bundle
import androidx.preference.PreferenceScreen import androidx.preference.PreferenceScreen
import com.afollestad.materialdialogs.MaterialDialog import com.afollestad.materialdialogs.MaterialDialog
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity import com.mikepenz.aboutlibraries.LibsBuilder
import eu.kanade.tachiyomi.BuildConfig import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.updater.UpdateChecker import eu.kanade.tachiyomi.data.updater.UpdateChecker
@ -125,7 +125,12 @@ class AboutController : SettingsController() {
titleRes = R.string.licenses titleRes = R.string.licenses
onClick { onClick {
startActivity(Intent(activity, OssLicensesMenuActivity::class.java)) LibsBuilder()
.withActivityTitle(activity!!.getString(R.string.licenses))
.withAboutIconShown(false)
.withAboutVersionShown(false)
.withLicenseShown(true)
.start(activity!!)
} }
} }
} }
@ -210,7 +215,7 @@ class AboutController : SettingsController() {
return try { return try {
val inputDf = SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'", Locale.US) val inputDf = SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'", Locale.US)
inputDf.timeZone = TimeZone.getTimeZone("UTC") inputDf.timeZone = TimeZone.getTimeZone("UTC")
val buildTime = inputDf.parse(BuildConfig.BUILD_TIME)!! val buildTime = inputDf.parse(BuildConfig.BUILD_TIME)
val outputDf = DateFormat.getDateTimeInstance( val outputDf = DateFormat.getDateTimeInstance(
DateFormat.MEDIUM, DateFormat.SHORT, Locale.getDefault() DateFormat.MEDIUM, DateFormat.SHORT, Locale.getDefault()

View File

@ -367,7 +367,7 @@
<string name="cookies_cleared">Cookies cleared</string> <string name="cookies_cleared">Cookies cleared</string>
<string name="choices_reset">Dialog choices reset</string> <string name="choices_reset">Dialog choices reset</string>
<string name="pref_clear_database">Clear database</string> <string name="pref_clear_database">Clear database</string>
<string name="pref_clear_database_summary">Delete history for manga that are not in saved your library</string> <string name="pref_clear_database_summary">Delete history for manga that are not saved in your library</string>
<string name="clear_database_confirmation">Are you sure? Read chapters and progress of non-library manga will be lost</string> <string name="clear_database_confirmation">Are you sure? Read chapters and progress of non-library manga will be lost</string>
<string name="clear_database_completed">Entries deleted</string> <string name="clear_database_completed">Entries deleted</string>
<string name="pref_refresh_library_covers">Refresh library manga covers</string> <string name="pref_refresh_library_covers">Refresh library manga covers</string>

View File

@ -42,7 +42,7 @@ buildscript {
classpath("com.github.ben-manes:gradle-versions-plugin:0.28.0") classpath("com.github.ben-manes:gradle-versions-plugin:0.28.0")
classpath("com.github.zellius:android-shortcut-gradle-plugin:0.1.2") classpath("com.github.zellius:android-shortcut-gradle-plugin:0.1.2")
classpath("com.google.gms:google-services:4.3.3") classpath("com.google.gms:google-services:4.3.3")
classpath("com.google.android.gms:oss-licenses-plugin:0.10.2") classpath("com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:8.2.0")
// Realm (EH) // Realm (EH)
classpath("io.realm:realm-gradle-plugin:6.0.2") classpath("io.realm:realm-gradle-plugin:6.0.2")