From d9322b0df4dd0b0f5a309f4510a11439f490c826 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 29 Mar 2020 18:55:00 +0200 Subject: [PATCH] Bump aboutlibraries-core from 7.1.0 to 8.0.0 (#731) --- app/build.gradle | 7 ++++++- app/proguard-rules.pro | 7 +++++++ .../ui/modules/about/license/LicenseItem.kt | 2 +- .../modules/about/license/LicensePresenter.kt | 4 ---- app/src/main/res/layout/item_license.xml | 4 +++- .../main/res/raw/custom_license_mappings.prop | 1 + .../res/raw/custom_license_year_mappings.prop | 3 +++ app/src/main/res/raw/custom_name_mappings.prop | 3 +++ .../main/res/values/library_wulkanowy_api.xml | 17 ----------------- build.gradle | 2 ++ 10 files changed, 26 insertions(+), 24 deletions(-) create mode 100644 app/src/main/res/raw/custom_license_mappings.prop create mode 100644 app/src/main/res/raw/custom_license_year_mappings.prop create mode 100644 app/src/main/res/raw/custom_name_mappings.prop delete mode 100644 app/src/main/res/values/library_wulkanowy_api.xml diff --git a/app/build.gradle b/app/build.gradle index a419f7de..c257979f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,6 +4,7 @@ apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-android-extensions' apply plugin: 'io.fabric' apply plugin: 'com.github.triplet.play' +apply plugin: 'com.mikepenz.aboutlibraries.plugin' apply from: 'jacoco.gradle' apply from: 'sonarqube.gradle' apply from: 'hooks.gradle' @@ -96,6 +97,10 @@ android { exclude 'META-INF/library_release.kotlin_module' exclude 'META-INF/library-core_release.kotlin_module' } + + aboutLibraries { + configPath = "app/src/main/res/raw" + } } androidExtensions { @@ -175,7 +180,7 @@ dependencies { 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.mikepenz:aboutlibraries-core:7.1.0" + implementation "com.mikepenz:aboutlibraries-core:$about_libraries" implementation 'com.wdullaer:materialdatetimepicker:4.2.3' implementation("io.coil-kt:coil:0.9.5") diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 77339fe9..1a8b8c32 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -43,3 +43,10 @@ #Config for Material Components -keep class com.google.android.material.tabs.** { *; } + + +#Config for About Libraries +-keep class .R +-keep class **.R$* { + ; +} diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/about/license/LicenseItem.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/about/license/LicenseItem.kt index 98c86e75..8dcb8922 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/about/license/LicenseItem.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/about/license/LicenseItem.kt @@ -19,7 +19,7 @@ class LicenseItem(val library: Library) : AbstractFlexibleItem>, holder: ViewHolder, position: Int, payloads: MutableList) { with(holder) { licenseItemName.text = library.libraryName - licenseItemSummary.text = library.license?.licenseName + licenseItemSummary.text = library.license?.licenseName?.takeIf { it.isNotBlank() } ?: library.libraryVersion } } diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/about/license/LicensePresenter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/about/license/LicensePresenter.kt index b5b8fcd1..dc48b098 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/about/license/LicensePresenter.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/about/license/LicensePresenter.kt @@ -27,10 +27,6 @@ class LicensePresenter @Inject constructor( private fun loadData() { disposable.add(Single.fromCallable { view?.appLibraries } - .map { - val exclude = listOf("Android-Iconics", "CircleImageView", "FastAdapter", "Jsoup", "okio", "Retrofit") - it.filter { library -> !exclude.contains(library.libraryName) } - } .map { it.map { library -> LicenseItem(library) } } .subscribeOn(schedulers.backgroundThread) .observeOn(schedulers.mainThread) diff --git a/app/src/main/res/layout/item_license.xml b/app/src/main/res/layout/item_license.xml index 6a864433..f44c211c 100644 --- a/app/src/main/res/layout/item_license.xml +++ b/app/src/main/res/layout/item_license.xml @@ -14,9 +14,11 @@ android:id="@+id/licenseItemName" android:layout_width="match_parent" android:layout_height="28dp" + android:ellipsize="end" android:gravity="bottom" + android:singleLine="true" android:textSize="16sp" - tools:text="@tools:sample/lorem" /> + tools:text="@tools:sample/lorem/random" /> - - - - Wulkanowy - https://github.com/wulkanowy - - UONET+ Scraping API - The UONET+ client using web scraping - https://github.com/wulkanowy/api - Development - - true - https://github.com/wulkanowy/api - - apache_2_0 - diff --git a/build.gradle b/build.gradle index cc32f316..3b77dee3 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,6 @@ buildscript { ext.kotlin_version = '1.3.71' + ext.about_libraries = '8.0.2' repositories { mavenCentral() google() @@ -16,6 +17,7 @@ buildscript { classpath "com.github.triplet.gradle:play-publisher:2.7.2" classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.8.0.1969" classpath "gradle.plugin.com.star-zero.gradle:githook:1.2.0" + classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${about_libraries}" } }