From f1301c6ee55d3cf1b3169c0df96e3fd4012c658a Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Fri, 7 Jun 2019 14:52:55 -0400 Subject: Import versions in plugin --- buildSrc/build.gradle.kts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 buildSrc/build.gradle.kts (limited to 'buildSrc/build.gradle.kts') diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts new file mode 100644 index 00000000..7eda6676 --- /dev/null +++ b/buildSrc/build.gradle.kts @@ -0,0 +1,14 @@ +plugins { + `kotlin-dsl` +} + +repositories { + jcenter() + maven("https://jitpack.io") +} + +val KAU: String = "df94b2f" + +dependencies { + implementation("ca.allanwang.kau:gradle-plugin:$KAU") +} \ No newline at end of file -- cgit v1.2.3 From 1c2109cc583633c369688000c5a55c3a810aa8e3 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Fri, 7 Jun 2019 14:55:59 -0400 Subject: Add group to buildSrc --- buildSrc/build.gradle.kts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'buildSrc/build.gradle.kts') diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 7eda6676..e361a8f3 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -2,6 +2,8 @@ plugins { `kotlin-dsl` } +group = "com.pitchedapps" + repositories { jcenter() maven("https://jitpack.io") -- cgit v1.2.3 From 9bab9d1feb8a3571bff3d99dbf52109eb6dc0963 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Fri, 7 Jun 2019 15:37:39 -0400 Subject: Remove themed dialog variants --- app/build.gradle | 16 +++++------ .../frost/activities/BaseMainActivity.kt | 26 +++++++++-------- .../pitchedapps/frost/activities/ImageActivity.kt | 11 ++++---- .../frost/activities/SettingsActivity.kt | 10 ++++--- .../frost/activities/WebOverlayActivity.kt | 6 ++-- .../com/pitchedapps/frost/settings/Appearance.kt | 33 ++++++++++++---------- .../kotlin/com/pitchedapps/frost/settings/Debug.kt | 27 +++++++++--------- .../kotlin/com/pitchedapps/frost/settings/Feed.kt | 17 ++++++----- .../com/pitchedapps/frost/utils/Downloader.kt | 12 ++++---- .../kotlin/com/pitchedapps/frost/utils/Utils.kt | 4 +-- buildSrc/build.gradle.kts | 2 +- buildSrc/src/main/kotlin/Versions.kt | 2 ++ 12 files changed, 88 insertions(+), 78 deletions(-) (limited to 'buildSrc/build.gradle.kts') diff --git a/app/build.gradle b/app/build.gradle index 7dfb7a5e..c8ee5c5f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -188,21 +188,21 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:${KOTLIN}" //noinspection GradleDependency - implementation "ca.allanwang.kau:adapter:$KAU" + implementation "ca.allanwang.kau:adapter:${Versions.kau}" //noinspection GradleDependency - implementation "ca.allanwang.kau:about:$KAU" + implementation "ca.allanwang.kau:about:${Versions.kau}" //noinspection GradleDependency - implementation "ca.allanwang.kau:colorpicker:$KAU" + implementation "ca.allanwang.kau:colorpicker:${Versions.kau}" //noinspection GradleDependency - implementation "ca.allanwang.kau:mediapicker:$KAU" + implementation "ca.allanwang.kau:mediapicker:${Versions.kau}" //noinspection GradleDependency - implementation "ca.allanwang.kau:kpref-activity:$KAU" + implementation "ca.allanwang.kau:kpref-activity:${Versions.kau}" //noinspection GradleDependency - implementation "ca.allanwang.kau:searchview:$KAU" + implementation "ca.allanwang.kau:searchview:${Versions.kau}" //noinspection GradleDependency - implementation "ca.allanwang.kau:core:$KAU" + implementation "ca.allanwang.kau:core:${Versions.kau}" //noinspection GradleDependency - implementation "ca.allanwang.kau:core-ui:$KAU" + implementation "ca.allanwang.kau:core-ui:${Versions.kau}" implementation "androidx.core:core-ktx:${KTX}" diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt index 49d5f8bf..b2946852 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt @@ -40,6 +40,7 @@ import ca.allanwang.kau.searchview.SearchViewHolder import ca.allanwang.kau.searchview.bindSearchView import ca.allanwang.kau.utils.bindView import ca.allanwang.kau.utils.fadeScaleTransition +import ca.allanwang.kau.utils.materialDialog import ca.allanwang.kau.utils.restart import ca.allanwang.kau.utils.setIcon import ca.allanwang.kau.utils.setMenuIcons @@ -56,6 +57,7 @@ import co.zsmb.materialdrawerkt.draweritems.badgeable.secondaryItem import co.zsmb.materialdrawerkt.draweritems.divider import co.zsmb.materialdrawerkt.draweritems.profile.profile import co.zsmb.materialdrawerkt.draweritems.profile.profileSetting +import com.afollestad.materialdialogs.checkbox.checkBoxPrompt import com.google.android.material.appbar.AppBarLayout import com.google.android.material.tabs.TabLayout import com.mikepenz.google_material_typeface_library.GoogleMaterial @@ -99,7 +101,6 @@ import com.pitchedapps.frost.utils.frostNavigationBar import com.pitchedapps.frost.utils.launchLogin import com.pitchedapps.frost.utils.launchNewTask import com.pitchedapps.frost.utils.launchWebOverlay -import com.pitchedapps.frost.utils.materialDialogThemed import com.pitchedapps.frost.utils.setFrostColors import com.pitchedapps.frost.views.BadgedIcon import com.pitchedapps.frost.views.FrostVideoViewer @@ -293,21 +294,21 @@ abstract class BaseMainActivity : BaseActivity(), MainActivityContract, FbCookie.reset() launchLogin(cookies(), true) } else { - materialDialogThemed { + materialDialog { title(R.string.kau_logout) - content( + message( + text = String.format( string(R.string.kau_logout_confirm_as_x), currentCookie.name ?: Prefs.userId.toString() ) ) - positiveText(R.string.kau_yes) - negativeText(R.string.kau_no) - onPositive { _, _ -> + positiveButton(R.string.kau_yes) { this@BaseMainActivity.launch { FbCookie.logout(this@BaseMainActivity) } } + negativeButton(R.string.kau_no) } } } @@ -518,13 +519,14 @@ abstract class BaseMainActivity : BaseActivity(), MainActivityContract, } if (currentFragment.onBackPressed()) return true if (Prefs.exitConfirmation) { - materialDialogThemed { + materialDialog { title(R.string.kau_exit) - content(R.string.kau_exit_confirmation) - positiveText(R.string.kau_yes) - negativeText(R.string.kau_no) - onPositive { _, _ -> finish() } - checkBoxPromptRes(R.string.kau_do_not_show_again, false) { _, b -> Prefs.exitConfirmation = !b } + message(R.string.kau_exit_confirmation) + positiveButton(R.string.kau_yes) { finish() } + negativeButton(R.string.kau_no) + checkBoxPrompt(R.string.kau_do_not_show_again, isCheckedDefault = false) { + Prefs.exitConfirmation = !it + } } return true } diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt index b94acb63..6b031a03 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt @@ -33,6 +33,7 @@ import ca.allanwang.kau.utils.copyFromInputStream import ca.allanwang.kau.utils.fadeOut import ca.allanwang.kau.utils.isHidden import ca.allanwang.kau.utils.isVisible +import ca.allanwang.kau.utils.materialDialog import ca.allanwang.kau.utils.scaleXY import ca.allanwang.kau.utils.setIcon import ca.allanwang.kau.utils.tint @@ -58,7 +59,6 @@ import com.pitchedapps.frost.utils.frostSnackbar import com.pitchedapps.frost.utils.frostUriFromFile import com.pitchedapps.frost.utils.isIndirectImageUrl import com.pitchedapps.frost.utils.logFrostEvent -import com.pitchedapps.frost.utils.materialDialogThemed import com.pitchedapps.frost.utils.sendFrostEmail import com.pitchedapps.frost.utils.setFrostColors import com.sothree.slidinguppanel.SlidingUpPanelLayout @@ -297,18 +297,17 @@ internal enum class FabStates( val err = activity.errorRef?.takeIf { it !is FileNotFoundException && it.message != "Image failed to decode using JPEG decoder" } ?: return - activity.materialDialogThemed { + activity.materialDialog { title(R.string.kau_error) - content(R.string.bad_image_overlay) - positiveText(R.string.kau_yes) - onPositive { _, _ -> + message(R.string.bad_image_overlay) + positiveButton(R.string.kau_yes) { activity.sendFrostEmail(R.string.debug_image_link_subject) { addItem("Url", activity.imageUrl) addItem("Type", err.javaClass.name) addItem("Message", err.message ?: "Null") } } - negativeText(R.string.kau_no) + negativeButton(R.string.kau_no) } } }, diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt index bc20aa2d..3007933c 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt @@ -29,12 +29,14 @@ import ca.allanwang.kau.kpref.activity.KPrefActivity import ca.allanwang.kau.kpref.activity.KPrefAdapterBuilder import ca.allanwang.kau.ui.views.RippleCanvas import ca.allanwang.kau.utils.finishSlideOut +import ca.allanwang.kau.utils.materialDialog import ca.allanwang.kau.utils.setMenuIcons import ca.allanwang.kau.utils.startActivityForResult import ca.allanwang.kau.utils.startLink import ca.allanwang.kau.utils.string import ca.allanwang.kau.utils.tint import ca.allanwang.kau.utils.withSceneTransitionAnimation +import com.afollestad.materialdialogs.list.listItems import com.mikepenz.community_material_typeface_library.CommunityMaterial import com.mikepenz.google_material_typeface_library.GoogleMaterial import com.pitchedapps.frost.R @@ -55,7 +57,6 @@ import com.pitchedapps.frost.utils.frostChangelog import com.pitchedapps.frost.utils.frostNavigationBar import com.pitchedapps.frost.utils.launchNewTask import com.pitchedapps.frost.utils.loadAssets -import com.pitchedapps.frost.utils.materialDialogThemed import com.pitchedapps.frost.utils.setFrostTheme import kotlinx.coroutines.NonCancellable import kotlinx.coroutines.launch @@ -235,10 +236,11 @@ class SettingsActivity : KPrefActivity() { override fun onOptionsItemSelected(item: MenuItem): Boolean { when (item.itemId) { - R.id.action_email -> materialDialogThemed { + R.id.action_email -> materialDialog { title(R.string.subject) - items(Support.values().map { string(it.title) }) - itemsCallback { _, _, which, _ -> Support.values()[which].sendEmail(this@SettingsActivity) } + listItems(items = Support.values().map { string(it.title) }) { _, index, _ -> + Support.values()[index].sendEmail(this@SettingsActivity) + } } R.id.action_changelog -> frostChangelog() else -> return super.onOptionsItemSelected(item) diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt index ec4ff9dd..9a1e7308 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt @@ -36,6 +36,7 @@ import ca.allanwang.kau.utils.copyToClipboard import ca.allanwang.kau.utils.darken import ca.allanwang.kau.utils.dpToPx import ca.allanwang.kau.utils.finishSlideOut +import ca.allanwang.kau.utils.materialDialog import ca.allanwang.kau.utils.navigationBarColor import ca.allanwang.kau.utils.setMenuIcons import ca.allanwang.kau.utils.shareText @@ -69,7 +70,6 @@ import com.pitchedapps.frost.utils.L import com.pitchedapps.frost.utils.Prefs import com.pitchedapps.frost.utils.Showcase import com.pitchedapps.frost.utils.frostSnackbar -import com.pitchedapps.frost.utils.materialDialogThemed import com.pitchedapps.frost.utils.setFrostColors import com.pitchedapps.frost.views.FrostContentWeb import com.pitchedapps.frost.views.FrostVideoViewer @@ -109,9 +109,9 @@ class FrostWebActivity : WebOverlayActivityBase(false) { refreshReceiver.receive() refreshReceiver.cancel() withMainContext { - materialDialogThemed { + materialDialog { title(R.string.invalid_share_url) - content(R.string.invalid_share_url_desc) + message(R.string.invalid_share_url_desc) } } } diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt index a6437123..718b2dbb 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Appearance.kt @@ -20,7 +20,9 @@ import ca.allanwang.kau.kpref.activity.KPrefAdapterBuilder import ca.allanwang.kau.kpref.activity.items.KPrefColorPicker import ca.allanwang.kau.kpref.activity.items.KPrefSeekbar import ca.allanwang.kau.ui.views.RippleCanvas +import ca.allanwang.kau.utils.materialDialog import ca.allanwang.kau.utils.string +import com.afollestad.materialdialogs.list.listItemsSingleChoice import com.pitchedapps.frost.R import com.pitchedapps.frost.activities.SettingsActivity import com.pitchedapps.frost.enums.MainActivityLayout @@ -33,7 +35,6 @@ import com.pitchedapps.frost.utils.frostEvent import com.pitchedapps.frost.utils.frostNavigationBar import com.pitchedapps.frost.utils.frostSnackbar import com.pitchedapps.frost.utils.launchTabCustomizerActivity -import com.pitchedapps.frost.utils.materialDialogThemed import com.pitchedapps.frost.utils.setFrostTheme import com.pitchedapps.frost.views.KPrefTextSeekbar @@ -46,20 +47,21 @@ fun SettingsActivity.getAppearancePrefs(): KPrefAdapterBuilder.() -> Unit = { text(R.string.theme, Prefs::theme, { Prefs.theme = it }) { onClick = { - materialDialogThemed { + materialDialog { title(R.string.theme) - items(Theme.values().map { string(it.textRes) }) - itemsCallbackSingleChoice(item.pref) { _, _, which, _ -> - if (item.pref != which) { - item.pref = which + listItemsSingleChoice( + items = Theme.values().map { string(it.textRes) }, + initialSelection = item.pref + ) { _, index, _ -> + if (item.pref != index) { + item.pref = index shouldRestartMain() reload() setFrostTheme(true) themeExterior() invalidateOptionsMenu() - frostEvent("Theme", "Count" to Theme(which).name) + frostEvent("Theme", "Count" to Theme(index).name) } - true } } } @@ -134,16 +136,17 @@ fun SettingsActivity.getAppearancePrefs(): KPrefAdapterBuilder.() -> Unit = { text(R.string.main_activity_layout, Prefs::mainActivityLayoutType, { Prefs.mainActivityLayoutType = it }) { textGetter = { string(Prefs.mainActivityLayout.titleRes) } onClick = { - materialDialogThemed { + materialDialog { title(R.string.main_activity_layout_desc) - items(MainActivityLayout.values.map { string(it.titleRes) }) - itemsCallbackSingleChoice(item.pref) { _, _, which, _ -> - if (item.pref != which) { - item.pref = which + listItemsSingleChoice( + items = MainActivityLayout.values.map { string(it.titleRes) }, + initialSelection = item.pref + ) { _, index, _ -> + if (item.pref != index) { + item.pref = index shouldRestartMain() - frostEvent("Main Layout", "Type" to MainActivityLayout(which).name) + frostEvent("Main Layout", "Type" to MainActivityLayout(index).name) } - true } } } diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Debug.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Debug.kt index 1ee06464..ea50a57b 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Debug.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Debug.kt @@ -24,6 +24,8 @@ import ca.allanwang.kau.utils.startActivityForResult import ca.allanwang.kau.utils.string import ca.allanwang.kau.utils.toast import ca.allanwang.kau.utils.withMainContext +import com.afollestad.materialdialogs.callbacks.onDismiss +import com.afollestad.materialdialogs.list.listItems import com.pitchedapps.frost.R import com.pitchedapps.frost.activities.DebugActivity import com.pitchedapps.frost.activities.SettingsActivity @@ -68,20 +70,18 @@ fun SettingsActivity.getDebugPrefs(): KPrefAdapterBuilder.() -> Unit = { val parsers = arrayOf(NotifParser, MessageParser, SearchParser) materialDialog { - items(parsers.map { string(it.nameRes) }) - itemsCallback { dialog, _, position, _ -> + listItems(items = parsers.map { string(it.nameRes) }) { dialog, position, _ -> dialog.dismiss() val parser = parsers[position] var attempt: Job? = null val loading = materialDialog { - content(parser.nameRes) - progress(true, 100) - negativeText(R.string.kau_cancel) - onNegative { dialog, _ -> + message(parser.nameRes) + // TODO change dialog? No more progress view + negativeButton(R.string.kau_cancel) { attempt?.cancel() - dialog.dismiss() + it.dismiss() } - canceledOnTouchOutside(false) + cancelOnTouchOutside(false) } attempt = launch(Dispatchers.IO) { @@ -122,18 +122,17 @@ fun SettingsActivity.sendDebug(url: String, html: String?) { val md = materialDialog { title(R.string.parsing_data) - progress(false, 100) - negativeText(R.string.kau_cancel) - onNegative { dialog, _ -> dialog.dismiss() } - canceledOnTouchOutside(false) - dismissListener { job.cancel() } + // TODO remove dialog? No progress ui + negativeButton(R.string.kau_cancel) { it.dismiss() } + cancelOnTouchOutside(false) + onDismiss { job.cancel() } } val progressChannel = Channel(10) launchMain { for (p in progressChannel) { - md.setProgress(p) +// md.setProgress(p) } } diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt index baf68634..f7cf3ee3 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Feed.kt @@ -17,13 +17,14 @@ package com.pitchedapps.frost.settings import ca.allanwang.kau.kpref.activity.KPrefAdapterBuilder +import ca.allanwang.kau.utils.materialDialog import ca.allanwang.kau.utils.string +import com.afollestad.materialdialogs.list.listItemsSingleChoice import com.pitchedapps.frost.R import com.pitchedapps.frost.activities.SettingsActivity import com.pitchedapps.frost.enums.FeedSort import com.pitchedapps.frost.utils.Prefs import com.pitchedapps.frost.utils.REQUEST_REFRESH -import com.pitchedapps.frost.utils.materialDialogThemed /** * Created by Allan Wang on 2017-06-29. @@ -33,15 +34,17 @@ fun SettingsActivity.getFeedPrefs(): KPrefAdapterBuilder.() -> Unit = { text(R.string.newsfeed_sort, Prefs::feedSort, { Prefs.feedSort = it }) { descRes = R.string.newsfeed_sort_desc onClick = { - materialDialogThemed { + materialDialog { title(R.string.newsfeed_sort) - items(FeedSort.values().map { string(it.textRes) }) - itemsCallbackSingleChoice(item.pref) { _, _, which, _ -> - if (item.pref != which) { - item.pref = which + listItemsSingleChoice( + items = FeedSort.values().map { string(it.textRes) }, + initialSelection = item.pref + ) { _, index, _ -> + if (item.pref != index) { + item.pref = index shouldRestartMain() } - true + } } } diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Downloader.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Downloader.kt index 50863e10..b0012b0d 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Downloader.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Downloader.kt @@ -25,6 +25,7 @@ import android.webkit.URLUtil import ca.allanwang.kau.permissions.PERMISSION_WRITE_EXTERNAL_STORAGE import ca.allanwang.kau.permissions.kauRequestPermissions import ca.allanwang.kau.utils.isAppEnabled +import ca.allanwang.kau.utils.materialDialog import ca.allanwang.kau.utils.showAppInfo import ca.allanwang.kau.utils.string import ca.allanwang.kau.utils.toast @@ -64,12 +65,13 @@ fun Context.frostDownload( return L.e { "Invalid download $uri" } } if (!isAppEnabled(DOWNLOAD_MANAGER_PACKAGE)) { - materialDialogThemed { + materialDialog { title(R.string.no_download_manager) - content(R.string.no_download_manager_desc) - positiveText(R.string.kau_yes) - onPositive { _, _ -> showAppInfo(DOWNLOAD_MANAGER_PACKAGE) } - negativeText(R.string.kau_no) + message(R.string.no_download_manager_desc) + positiveButton(R.string.kau_yes) { + showAppInfo(DOWNLOAD_MANAGER_PACKAGE) + } + negativeButton(R.string.kau_no) } return } diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt index a479cb83..a6a9e721 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt @@ -342,9 +342,7 @@ val dependentSegments = arrayOf( inline val String?.isExplicitIntent get() = this != null && (startsWith("intent://") || startsWith("market://")) -fun Context.frostChangelog() = showChangelog(R.xml.frost_changelog, Prefs.textColor) { - theme() -} +fun Context.frostChangelog() = showChangelog(R.xml.frost_changelog) fun Context.frostUriFromFile(file: File): Uri = FileProvider.getUriForFile( diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index e361a8f3..50603069 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -9,7 +9,7 @@ repositories { maven("https://jitpack.io") } -val KAU: String = "df94b2f" +val KAU: String = "db3b6c0" dependencies { implementation("ca.allanwang.kau:gradle-plugin:$KAU") diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index bc82b27a..6ed886e4 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -1,3 +1,5 @@ object Versions { + const val kau = "db3b6c0" + } \ No newline at end of file -- cgit v1.2.3 From 1af2414105b33e92b7a9902b016aa7f4a9b3c869 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 8 Jun 2019 02:10:02 -0400 Subject: Fix versions and imports --- app/build.gradle | 96 +++++++++++----------- .../kotlin/com/pitchedapps/frost/StartActivity.kt | 2 +- .../pitchedapps/frost/activities/AboutActivity.kt | 4 +- .../frost/activities/BaseMainActivity.kt | 2 +- .../pitchedapps/frost/activities/DebugActivity.kt | 2 +- .../pitchedapps/frost/activities/ImageActivity.kt | 2 +- .../pitchedapps/frost/activities/IntroActivity.kt | 2 +- .../frost/activities/SettingsActivity.kt | 4 +- .../frost/activities/TabCustomizerActivity.kt | 2 +- .../frost/activities/WebOverlayActivity.kt | 4 +- .../com/pitchedapps/frost/facebook/FbItem.kt | 6 +- .../pitchedapps/frost/fragments/WebFragments.kt | 2 +- .../pitchedapps/frost/intro/IntroImageFragments.kt | 2 +- .../com/pitchedapps/frost/views/AccountItem.kt | 2 +- .../pitchedapps/frost/views/FrostVideoViewer.kt | 2 +- .../kotlin/com/pitchedapps/frost/views/Keywords.kt | 2 +- build.gradle | 12 ++- buildSrc/build.gradle.kts | 12 ++- buildSrc/src/main/kotlin/Versions.kt | 34 +++++++- gradle.properties | 52 +----------- 20 files changed, 117 insertions(+), 129 deletions(-) (limited to 'buildSrc/build.gradle.kts') diff --git a/app/build.gradle b/app/build.gradle index d6cb216f..302d79c1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -180,92 +180,92 @@ dependencies { androidTestImplementation kau.Dependencies.espresso androidTestImplementation kau.Dependencies.testRules androidTestImplementation kau.Dependencies.testRunner - androidTestImplementation "org.jetbrains.kotlin:kotlin-reflect:${KOTLIN}" + androidTestImplementation kau.Dependencies.kotlinReflect testImplementation kau.Dependencies.kotlinTest - testImplementation "org.jetbrains.kotlin:kotlin-reflect:${KOTLIN}" + testImplementation kau.Dependencies.kotlinReflect testImplementation kau.Dependencies.junit - implementation "org.jetbrains.kotlin:kotlin-stdlib:${KOTLIN}" + implementation kau.Dependencies.kotlin //noinspection GradleDependency - implementation "ca.allanwang.kau:adapter:${Versions.kau}" + implementation "ca.allanwang.kau:adapter:${KAU}" //noinspection GradleDependency - implementation "ca.allanwang.kau:about:${Versions.kau}" + implementation "ca.allanwang.kau:about:${KAU}" //noinspection GradleDependency - implementation "ca.allanwang.kau:colorpicker:${Versions.kau}" + implementation "ca.allanwang.kau:colorpicker:${KAU}" //noinspection GradleDependency - implementation "ca.allanwang.kau:mediapicker:${Versions.kau}" + implementation "ca.allanwang.kau:mediapicker:${KAU}" //noinspection GradleDependency - implementation "ca.allanwang.kau:kpref-activity:${Versions.kau}" + implementation "ca.allanwang.kau:kpref-activity:${KAU}" //noinspection GradleDependency - implementation "ca.allanwang.kau:searchview:${Versions.kau}" + implementation "ca.allanwang.kau:searchview:${KAU}" //noinspection GradleDependency - implementation "ca.allanwang.kau:core:${Versions.kau}" + implementation "ca.allanwang.kau:core:${KAU}" //noinspection GradleDependency - implementation "ca.allanwang.kau:core-ui:${Versions.kau}" + implementation "ca.allanwang.kau:core-ui:${KAU}" - implementation "androidx.core:core-ktx:${KTX}" + implementation "androidx.core:core-ktx:${Versions.ktx}" - implementation "androidx.biometric:biometric:${ANDX_BIOMETRIC}" + implementation "androidx.biometric:biometric:${Versions.andxBiometric}" - implementation "org.koin:koin-android:${KOIN}" - testImplementation "org.koin:koin-test:${KOIN}" - androidTestImplementation "org.koin:koin-test:${KOIN}" + implementation "org.koin:koin-android:${Versions.koin}" + testImplementation "org.koin:koin-test:${Versions.koin}" + androidTestImplementation "org.koin:koin-test:${Versions.koin}" -// androidTestImplementation "io.mockk:mockk:${MOCKK}" +// androidTestImplementation "io.mockk:mockk:${Versions.mockk}" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${kau.Versions.coroutines}" + implementation kau.Dependencies.coroutines - implementation "org.apache.commons:commons-text:${COMMONS_TEXT}" + implementation "org.apache.commons:commons-text:${Versions.apacheCommonsText}" - implementation "com.devbrackets.android:exomedia:${EXOMEDIA}" + implementation "com.devbrackets.android:exomedia:${Versions.exoMedia}" - implementation "com.mikepenz:fastadapter-extensions:${kau.Versions.fastAdapter}@aar" + implementation kau.Dependencies.fastAdapter("extensions") //noinspection GradleDependency - implementation "com.github.bumptech.glide:okhttp3-integration:${kau.Versions.glide}" + implementation kau.Dependencies.glide //noinspection GradleDependency - kapt "com.github.bumptech.glide:compiler:${kau.Versions.glide}" + kapt kau.Dependencies.glideKapt - implementation "com.fasterxml.jackson.core:jackson-databind:${JACKSON}" + implementation "com.fasterxml.jackson.core:jackson-databind:${Versions.jackson}" //noinspection GradleDependency - releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:${LEAK_CANARY}" + releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:${Versions.leakCanary}" //noinspection GradleDependency - releaseTestImplementation "com.squareup.leakcanary:leakcanary-android-no-op:${LEAK_CANARY}" + releaseTestImplementation "com.squareup.leakcanary:leakcanary-android-no-op:${Versions.leakCanary}" //noinspection GradleDependency - debugImplementation "com.squareup.leakcanary:leakcanary-android:${LEAK_CANARY}" -// testImplementation "com.squareup.leakcanary:leakcanary-android-no-op:${LEAK_CANARY}" + debugImplementation "com.squareup.leakcanary:leakcanary-android:${Versions.leakCanary}" +// testImplementation "com.squareup.leakcanary:leakcanary-android-no-op:${Versions.leakCanary}" - implementation "com.github.Raizlabs.DBFlow:dbflow:${DBFLOW}" - implementation "com.github.Raizlabs.DBFlow:dbflow-core:${DBFLOW}" - kapt "com.github.Raizlabs.DBFlow:dbflow-processor:${DBFLOW}" - implementation "com.github.Raizlabs.DBFlow:dbflow-kotlinextensions:${DBFLOW}" + implementation "com.github.Raizlabs.DBFlow:dbflow:${Versions.dbflow}" + implementation "com.github.Raizlabs.DBFlow:dbflow-core:${Versions.dbflow}" + kapt "com.github.Raizlabs.DBFlow:dbflow-processor:${Versions.dbflow}" + implementation "com.github.Raizlabs.DBFlow:dbflow-kotlinextensions:${Versions.dbflow}" //Icons - implementation "com.mikepenz:material-design-iconic-typeface:${kau.Versions.iconicsMaterial}@aar" - implementation "com.mikepenz:community-material-typeface:${kau.Versions.iconicsCommunity}@aar" + implementation kau.Dependencies.iconicsMaterial + implementation kau.Dependencies.iconicsCommunity - implementation "org.jsoup:jsoup:${JSOUP}" + implementation "org.jsoup:jsoup:${Versions.jsoup}" - implementation "com.squareup.okhttp3:okhttp:${OKHTTP}" - implementation "com.squareup.okhttp3:logging-interceptor:${OKHTTP}" - testImplementation "com.squareup.okhttp3:mockwebserver:${OKHTTP}" - androidTestImplementation "com.squareup.okhttp3:mockwebserver:${OKHTTP}" + implementation "com.squareup.okhttp3:okhttp:${Versions.okhttp}" + implementation "com.squareup.okhttp3:logging-interceptor:${Versions.okhttp}" + testImplementation "com.squareup.okhttp3:mockwebserver:${Versions.okhttp}" + androidTestImplementation "com.squareup.okhttp3:mockwebserver:${Versions.okhttp}" - implementation "co.zsmb:materialdrawer-kt:${MATERIAL_DRAWER_KT}" + implementation "co.zsmb:materialdrawer-kt:${Versions.materialDrawerKt}" - implementation "com.bugsnag:bugsnag-android:${BUGSNAG}" + implementation kau.Dependencies.bugsnag - implementation "com.davemorrissey.labs:subsampling-scale-image-view:${SCALE_IMAGE_VIEW}" + implementation "com.davemorrissey.labs:subsampling-scale-image-view:${Versions.scaleImageView}" - implementation "com.sothree.slidinguppanel:library:${SLIDING_PANEL}" + implementation "com.sothree.slidinguppanel:library:${Versions.slidingPanel}" - implementation "androidx.room:room-coroutines:${ROOM}" - implementation "androidx.room:room-runtime:${ROOM}" - kapt "androidx.room:room-compiler:${ROOM}" - testImplementation "androidx.room:room-testing:${ROOM}" + implementation "androidx.room:room-ktx:${Versions.room}" + implementation "androidx.room:room-runtime:${Versions.room}" + kapt "androidx.room:room-compiler:${Versions.room}" + testImplementation "androidx.room:room-testing:${Versions.room}" } @@ -290,7 +290,7 @@ configurations.all { resolutionStrategy.eachDependency { DependencyResolveDetails details -> def requested = details.requested if (requested.group == 'org.jetbrains.kotlin' && requested.name in kotlinResolutions) { - details.useVersion KOTLIN + details.useVersion kau.Versions.kotlin } } } diff --git a/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt index cf8acdd3..cc1ae466 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt @@ -28,7 +28,7 @@ import ca.allanwang.kau.utils.buildIsLollipopAndUp import ca.allanwang.kau.utils.setIcon import ca.allanwang.kau.utils.startActivity import ca.allanwang.kau.utils.string -import com.mikepenz.google_material_typeface_library.GoogleMaterial +import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.pitchedapps.frost.activities.LoginActivity import com.pitchedapps.frost.activities.MainActivity import com.pitchedapps.frost.activities.SelectorActivity diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt index 56125303..3c5f71c2 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt @@ -40,10 +40,10 @@ import ca.allanwang.kau.utils.withMinAlpha import com.mikepenz.aboutlibraries.Libs import com.mikepenz.aboutlibraries.entity.Library import com.mikepenz.aboutlibraries.entity.License -import com.mikepenz.community_material_typeface_library.CommunityMaterial +import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial import com.mikepenz.fastadapter.IItem import com.mikepenz.fastadapter.items.AbstractItem -import com.mikepenz.google_material_typeface_library.GoogleMaterial +import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.mikepenz.iconics.typeface.IIcon import com.pitchedapps.frost.BuildConfig import com.pitchedapps.frost.R diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt index b2946852..ea062cf7 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/BaseMainActivity.kt @@ -60,7 +60,7 @@ import co.zsmb.materialdrawerkt.draweritems.profile.profileSetting import com.afollestad.materialdialogs.checkbox.checkBoxPrompt import com.google.android.material.appbar.AppBarLayout import com.google.android.material.tabs.TabLayout -import com.mikepenz.google_material_typeface_library.GoogleMaterial +import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.mikepenz.iconics.IconicsDrawable import com.mikepenz.iconics.typeface.IIcon import com.mikepenz.materialdrawer.AccountHeader diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/DebugActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/DebugActivity.kt index a1b41830..0ad0204f 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/DebugActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/DebugActivity.kt @@ -25,7 +25,7 @@ import ca.allanwang.kau.internal.KauBaseActivity import ca.allanwang.kau.utils.launchMain import ca.allanwang.kau.utils.setIcon import ca.allanwang.kau.utils.visible -import com.mikepenz.google_material_typeface_library.GoogleMaterial +import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.pitchedapps.frost.R import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.injectors.JsActions diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt index 6b031a03..de553376 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt @@ -42,7 +42,7 @@ import ca.allanwang.kau.utils.withMinAlpha import com.davemorrissey.labs.subscaleview.ImageSource import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView import com.google.android.material.floatingactionbutton.FloatingActionButton -import com.mikepenz.google_material_typeface_library.GoogleMaterial +import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.mikepenz.iconics.typeface.IIcon import com.pitchedapps.frost.R import com.pitchedapps.frost.facebook.FB_IMAGE_ID_MATCHER diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt index 1e106765..e1d03314 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt @@ -41,7 +41,7 @@ import ca.allanwang.kau.utils.postDelayed import ca.allanwang.kau.utils.scaleXY import ca.allanwang.kau.utils.setIcon import ca.allanwang.kau.utils.statusBarColor -import com.mikepenz.google_material_typeface_library.GoogleMaterial +import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.pitchedapps.frost.R import com.pitchedapps.frost.intro.BaseIntroFragment import com.pitchedapps.frost.intro.IntroAccountFragment diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt index 3007933c..e78da3be 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/SettingsActivity.kt @@ -37,8 +37,8 @@ import ca.allanwang.kau.utils.string import ca.allanwang.kau.utils.tint import ca.allanwang.kau.utils.withSceneTransitionAnimation import com.afollestad.materialdialogs.list.listItems -import com.mikepenz.community_material_typeface_library.CommunityMaterial -import com.mikepenz.google_material_typeface_library.GoogleMaterial +import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial +import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.pitchedapps.frost.R import com.pitchedapps.frost.enums.Support import com.pitchedapps.frost.settings.getAppearancePrefs diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt index 6ad7d3f2..c6bcbb6a 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt @@ -32,7 +32,7 @@ import ca.allanwang.kau.utils.withAlpha import com.mikepenz.fastadapter.commons.adapters.FastItemAdapter import com.mikepenz.fastadapter_extensions.drag.ItemTouchCallback import com.mikepenz.fastadapter_extensions.drag.SimpleDragCallback -import com.mikepenz.google_material_typeface_library.GoogleMaterial +import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.pitchedapps.frost.R import com.pitchedapps.frost.db.GenericDao import com.pitchedapps.frost.db.TAB_COUNT diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt index 9a1e7308..ff31b56b 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt @@ -47,8 +47,8 @@ import ca.allanwang.kau.utils.toast import ca.allanwang.kau.utils.withAlpha import ca.allanwang.kau.utils.withMainContext import com.google.android.material.snackbar.BaseTransientBottomBar -import com.mikepenz.community_material_typeface_library.CommunityMaterial -import com.mikepenz.google_material_typeface_library.GoogleMaterial +import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial +import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.pitchedapps.frost.R import com.pitchedapps.frost.contracts.ActivityContract import com.pitchedapps.frost.contracts.FileChooserContract diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt index 82e15111..16952e49 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt @@ -17,10 +17,10 @@ package com.pitchedapps.frost.facebook import androidx.annotation.StringRes -import com.mikepenz.community_material_typeface_library.CommunityMaterial -import com.mikepenz.google_material_typeface_library.GoogleMaterial +import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial +import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.mikepenz.iconics.typeface.IIcon -import com.mikepenz.material_design_iconic_typeface_library.MaterialDesignIconic +import com.mikepenz.iconics.typeface.library.materialdesigniconic.MaterialDesignIconic import com.pitchedapps.frost.R import com.pitchedapps.frost.fragments.BaseFragment import com.pitchedapps.frost.fragments.MenuFragment diff --git a/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragments.kt b/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragments.kt index 72367eaa..c81c780b 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragments.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/fragments/WebFragments.kt @@ -17,7 +17,7 @@ package com.pitchedapps.frost.fragments import android.webkit.WebView -import com.mikepenz.google_material_typeface_library.GoogleMaterial +import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.pitchedapps.frost.R import com.pitchedapps.frost.contracts.MainFabContract import com.pitchedapps.frost.facebook.FbItem diff --git a/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroImageFragments.kt b/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroImageFragments.kt index 1fd8c76e..bddf42b2 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroImageFragments.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroImageFragments.kt @@ -27,7 +27,7 @@ import ca.allanwang.kau.utils.setIcon import ca.allanwang.kau.utils.tint import ca.allanwang.kau.utils.visible import ca.allanwang.kau.utils.withAlpha -import com.mikepenz.google_material_typeface_library.GoogleMaterial +import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.pitchedapps.frost.R import com.pitchedapps.frost.utils.Prefs import com.pitchedapps.frost.utils.launchTabCustomizerActivity diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt index 0269b1a9..98909e0a 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt @@ -31,7 +31,7 @@ import com.bumptech.glide.load.DataSource import com.bumptech.glide.load.engine.GlideException import com.bumptech.glide.request.RequestListener import com.bumptech.glide.request.target.Target -import com.mikepenz.google_material_typeface_library.GoogleMaterial +import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.pitchedapps.frost.R import com.pitchedapps.frost.db.CookieEntity import com.pitchedapps.frost.facebook.profilePictureUrl diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt index 4d88ad3d..6593a8df 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt @@ -38,7 +38,7 @@ import ca.allanwang.kau.utils.setMenuIcons import ca.allanwang.kau.utils.visible import ca.allanwang.kau.utils.withMinAlpha import com.devbrackets.android.exomedia.listener.VideoControlsVisibilityListener -import com.mikepenz.google_material_typeface_library.GoogleMaterial +import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.pitchedapps.frost.R import com.pitchedapps.frost.db.FrostDatabase import com.pitchedapps.frost.db.currentCookie diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt index e63fcc21..0d596086 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/Keywords.kt @@ -34,7 +34,7 @@ import com.mikepenz.fastadapter.FastAdapter import com.mikepenz.fastadapter.commons.adapters.FastItemAdapter import com.mikepenz.fastadapter.items.AbstractItem import com.mikepenz.fastadapter.listeners.ClickEventHook -import com.mikepenz.google_material_typeface_library.GoogleMaterial +import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.mikepenz.iconics.typeface.IIcon import com.pitchedapps.frost.R import com.pitchedapps.frost.utils.Prefs diff --git a/build.gradle b/build.gradle index db5deb92..cc64b047 100644 --- a/build.gradle +++ b/build.gradle @@ -8,13 +8,11 @@ buildscript { dependencies { classpath kau.Plugins.android -// classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta02' -// classpath "com.android.tools.build:gradle:${ANDROID_GRADLE}" - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${KOTLIN}" - classpath "com.bugsnag:bugsnag-android-gradle-plugin:${BUGSNAG_PLUGIN}" - classpath "com.diffplug.spotless:spotless-plugin-gradle:${SPOTLESS}" - classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:${DEX_PLUGIN}" - classpath "com.gladed.androidgitversion:gradle-android-git-version:${GIT_PLUGIN}" + classpath kau.Plugins.kotlin + classpath kau.Plugins.bugsnag + classpath kau.Plugins.spotless + classpath kau.Plugins.dexCount + classpath kau.Plugins.gitVersion } wrapper.setDistributionType(Wrapper.DistributionType.ALL) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 50603069..0c518118 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -9,8 +9,16 @@ repositories { maven("https://jitpack.io") } -val KAU: String = "db3b6c0" +// Currently can't read properties from root project +// Reading it manually since it's simple +val rootProps = + File(project.rootDir.let { if (it.name == "buildSrc") it.parent else it.absolutePath }, "gradle.properties") +val kau = rootProps.useLines { + it.first { s -> s.startsWith("KAU=") } +}.substring(4).trim() + +println("Using kau $kau") dependencies { - implementation("ca.allanwang.kau:gradle-plugin:$KAU") + implementation("ca.allanwang.kau:gradle-plugin:$kau") } \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index 6ed886e4..df15d665 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -1,5 +1,37 @@ object Versions { - const val kau = "db3b6c0" + const val andxBiometric = "1.0.0-alpha04" + // https://mvnrepository.com/artifact/org.apache.commons/commons-text + // Updates blocked due to javax.script dependency + const val apacheCommonsText = "1.4" + // https://github.com/Raizlabs/DBFlow/releases + const val dbflow = "4.2.4" + // https://github.com/brianwernick/ExoMedia/releases + const val exoMedia = "4.3.0" + // https://github.com/InsertKoinIO/koin/blob/master/CHANGELOG.md + const val koin = "2.0.0-rc-2" + // https://github.com/mockk/mockk/releases + const val mockk = "1.9.3" + // https://mvnrepository.com/artifact/androidx.core/core-ktx?repo=google + const val ktx = "1.0.2" + + // https://github.com/FasterXML/jackson-core/releases + const val jackson = "2.9.8" + // https://github.com/jhy/jsoup/releases + const val jsoup = "1.11.3" + // https://github.com/square/leakcanary/releases + const val leakCanary = "1.6.2" + // https://github.com/zsmb13/MaterialDrawerKt/releases + const val materialDrawerKt = "2.0.1" + // https://github.com/square/okhttp/releases + const val okhttp = "3.14.1" + // https://developer.android.com/jetpack/androidx/releases/room + const val room = "2.1.0-rc01" + // http://robolectric.org/getting-started/ + const val roboelectric = "4.2" + // https://github.com/davemorrissey/subsampling-scale-image-view#quick-start + const val scaleImageView = "3.10.0" + // https://github.com/umano/AndroidSlidingUpPanel#importing-the-library + const val slidingPanel = "3.4.0" } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 749c1f51..4b4a34bd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,57 +16,7 @@ org.gradle.daemon = true APP_ID=Frost APP_GROUP=com.pitchedapps -KAU=1ac55ac -KOTLIN=1.3.31 - -# https://mvnrepository.com/artifact/com.android.tools.build/gradle?repo=google -ANDROID_GRADLE=3.4.1 - -# https://github.com/diffplug/spotless/blob/master/plugin-gradle/CHANGES.md -SPOTLESS=3.21.1 - -ANDX_BIOMETRIC=1.0.0-alpha04 - -# https://github.com/bugsnag/bugsnag-android/releases -BUGSNAG=4.12.0 -# https://github.com/bugsnag/bugsnag-android-gradle-plugin/releases -BUGSNAG_PLUGIN=4.1.1 -# https://github.com/KeepSafe/dexcount-gradle-plugin/releases -DEX_PLUGIN=0.8.5 -# https://github.com/gladed/gradle-android-git-version/releases -GIT_PLUGIN=0.4.9 -# https://mvnrepository.com/artifact/org.apache.commons/commons-text -# Updates blocked due to javax.script dependency -COMMONS_TEXT=1.4 -# https://github.com/Raizlabs/DBFlow/releases -DBFLOW=4.2.4 -# https://github.com/brianwernick/ExoMedia/releases -EXOMEDIA=4.3.0 -# https://github.com/InsertKoinIO/koin/blob/master/CHANGELOG.md -KOIN=2.0.0-rc-2 -# https://github.com/mockk/mockk/releases -MOCKK=1.9.3 -# https://mvnrepository.com/artifact/androidx.core/core-ktx?repo=google -KTX=1.0.1 - -# https://github.com/FasterXML/jackson-core/releases -JACKSON=2.9.8 -# https://github.com/jhy/jsoup/releases -JSOUP=1.11.3 -# https://github.com/square/leakcanary/releases -LEAK_CANARY=1.6.2 -# https://github.com/zsmb13/MaterialDrawerKt/releases -MATERIAL_DRAWER_KT=2.0.1 -# https://github.com/square/okhttp/releases -OKHTTP=3.14.1 -# https://developer.android.com/jetpack/androidx/releases/room -ROOM=2.1.0-alpha04 -# http://robolectric.org/getting-started/ -ROBOELECTRIC=4.2 -# https://github.com/davemorrissey/subsampling-scale-image-view#quick-start -SCALE_IMAGE_VIEW=3.10.0 -# https://github.com/umano/AndroidSlidingUpPanel#importing-the-library -SLIDING_PANEL=3.4.0 +KAU=318e42c android.useAndroidX=true android.enableJetifier=true -- cgit v1.2.3