From e1849c9c633047979d8017262041e925ec3bd219 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 13 Jun 2019 13:51:52 -0700 Subject: Update to sdk 29 and update changelog --- core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefTransaction.kt | 2 +- core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefTransaction.kt b/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefTransaction.kt index 1070e11..3f8fe28 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefTransaction.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefTransaction.kt @@ -60,7 +60,7 @@ internal object KPrefFloatTransaction : KPrefTransaction { internal object KPrefStringTransaction : KPrefTransaction { override fun get(prefs: SharedPreferences, key: String, fallback: String) = - prefs.getString(key, fallback) + prefs.getString(key, fallback) ?: "" override fun set(editor: SharedPreferences.Editor, key: String, data: String) { editor.putString(key, data) diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt index e8680dc..d002fb8 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt @@ -239,7 +239,7 @@ fun Context.hasPermission(permissions: String) = !buildIsMarshmallowAndUp || Con fun Context.copyToClipboard(text: String?, label: String = "Copied Text", showToast: Boolean = true) { val clipboard = getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager - clipboard.primaryClip = ClipData.newPlainText(label, text ?: "") + clipboard.setPrimaryClip(ClipData.newPlainText(label, text ?: "")) if (showToast) toast(R.string.kau_text_copied) } -- cgit v1.2.3 From a3589553aa19e570f5df34c143afd5dead32e9ef Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 13 Jun 2019 14:07:53 -0700 Subject: Apply spotless --- .../kotlin/ca/allanwang/kau/colorpicker/CircleView.kt | 2 +- .../ca/allanwang/kau/colorpicker/ColorPickerDialog.kt | 2 +- .../kotlin/ca/allanwang/kau/ui/ProgressAnimatorTest.kt | 18 ++++++++++++++++-- .../allanwang/kau/kpref/activity/KPrefItemActions.kt | 17 ++++++++++++++++- 4 files changed, 34 insertions(+), 5 deletions(-) (limited to 'core') diff --git a/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/CircleView.kt b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/CircleView.kt index e748677..29257d8 100644 --- a/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/CircleView.kt +++ b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/CircleView.kt @@ -238,4 +238,4 @@ class CircleView @JvmOverloads constructor(context: Context, attrs: AttributeSet @ColorInt fun shiftColorUp(@ColorInt color: Int): Int = shiftColor(color, 1.1f) } -} \ No newline at end of file +} diff --git a/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerDialog.kt b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerDialog.kt index 02a1fff..487ed76 100644 --- a/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerDialog.kt +++ b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerDialog.kt @@ -63,4 +63,4 @@ fun MaterialDialog.kauColorChooser(c: ColorContract) { selection = c.callback ) positiveButton(R.string.kau_done) -} \ No newline at end of file +} diff --git a/core/src/test/kotlin/ca/allanwang/kau/ui/ProgressAnimatorTest.kt b/core/src/test/kotlin/ca/allanwang/kau/ui/ProgressAnimatorTest.kt index 60f8680..6b99b14 100644 --- a/core/src/test/kotlin/ca/allanwang/kau/ui/ProgressAnimatorTest.kt +++ b/core/src/test/kotlin/ca/allanwang/kau/ui/ProgressAnimatorTest.kt @@ -1,3 +1,18 @@ +/* + * Copyright 2019 Allan Wang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ca.allanwang.kau.ui import org.junit.Test @@ -71,5 +86,4 @@ class ProgressAnimatorTest { assertTrue(called) assertTrue(i > 0.5f) } - -} \ No newline at end of file +} diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefItemActions.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefItemActions.kt index e28bac6..c1cdc15 100644 --- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefItemActions.kt +++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefItemActions.kt @@ -1,3 +1,18 @@ +/* + * Copyright 2019 Allan Wang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ca.allanwang.kau.kpref.activity /** @@ -8,4 +23,4 @@ interface KPrefItemActions { * Attempts to reload current item by identifying it with its titleId */ fun reloadSelf() -} \ No newline at end of file +} -- cgit v1.2.3 From 20e7919f0b14ee21107f14933a05e2e20e00780b Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 13 Jun 2019 14:12:07 -0700 Subject: Open ctxCoroutine --- core/src/main/kotlin/ca/allanwang/kau/utils/CoroutineUtils.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/CoroutineUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/CoroutineUtils.kt index 57a9921..4d6ee54 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/utils/CoroutineUtils.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/utils/CoroutineUtils.kt @@ -18,6 +18,7 @@ package ca.allanwang.kau.utils import android.content.Context import android.os.Handler import android.os.Looper +import ca.allanwang.kau.internal.KauBaseActivity import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineStart import kotlinx.coroutines.android.asCoroutineDispatcher @@ -43,11 +44,11 @@ object ContextHelper : CoroutineScope { } /** - * Most context items implement [CoroutineScope] by default. + * Most context items implement [CoroutineScope] by default (through [KauBaseActivity]). * We will add a fallback just in case. * It is expected that the scope returned always has the Android main dispatcher as part of the context. */ -internal inline val Context.ctxCoroutine: CoroutineScope +inline val Context.ctxCoroutine: CoroutineScope get() = this as? CoroutineScope ?: ContextHelper /** -- cgit v1.2.3 From 69e3341677d92f699e4dc1202ca83056ed7b1b86 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 13 Jun 2019 20:27:07 -0700 Subject: Remove reflection usage, resolves #176 --- .../kotlin/ca/allanwang/kau/utils/ColorUtils.kt | 32 ++++------------------ 1 file changed, 5 insertions(+), 27 deletions(-) (limited to 'core') diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/ColorUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/ColorUtils.kt index bbb8953..3de0297 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/utils/ColorUtils.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/utils/ColorUtils.kt @@ -20,7 +20,6 @@ import android.content.Context import android.content.res.ColorStateList import android.graphics.Color import android.graphics.PorterDuff -import android.graphics.drawable.Drawable import android.os.Build import android.widget.CheckBox import android.widget.EditText @@ -28,13 +27,13 @@ import android.widget.ImageButton import android.widget.ProgressBar import android.widget.RadioButton import android.widget.SeekBar -import android.widget.TextView import androidx.annotation.ColorInt import androidx.annotation.FloatRange import androidx.annotation.IntRange import androidx.appcompat.widget.AppCompatEditText import androidx.appcompat.widget.Toolbar import androidx.core.graphics.drawable.DrawableCompat +import androidx.core.view.ViewCompat import com.afollestad.materialdialogs.R import java.util.Random @@ -248,37 +247,16 @@ fun Context.textColorStateList(@ColorInt color: Int): ColorStateList { return ColorStateList(states, colors) } -@SuppressLint("RestrictedApi") +/** + * Note that this does not tint the cursor, as there is no public api to do so. + */ fun EditText.tint(@ColorInt color: Int) { val editTextColorStateList = context.textColorStateList(color) if (this is AppCompatEditText) { - supportBackgroundTintList = editTextColorStateList + ViewCompat.setBackgroundTintList(this, editTextColorStateList) } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { backgroundTintList = editTextColorStateList } - tintCursor(color) -} - -fun EditText.tintCursor(@ColorInt color: Int) { - try { - val fCursorDrawableRes = TextView::class.java.getDeclaredField("mCursorDrawableRes") - fCursorDrawableRes.isAccessible = true - val mCursorDrawableRes = fCursorDrawableRes.getInt(this) - val fEditor = TextView::class.java.getDeclaredField("mEditor") - fEditor.isAccessible = true - val editor = fEditor.get(this) - val clazz = editor.javaClass - val fCursorDrawable = clazz.getDeclaredField("mCursorDrawable") - fCursorDrawable.isAccessible = true - val drawables: Array = Array(2, { - val drawable = context.drawable(mCursorDrawableRes) - drawable.setColorFilter(color, PorterDuff.Mode.SRC_IN) - drawable - }) - fCursorDrawable.set(editor, drawables) - } catch (e: Exception) { - e.printStackTrace() - } } fun Toolbar.tint(@ColorInt color: Int, tintTitle: Boolean = true) { -- cgit v1.2.3 From 8725ae5647e15a38281ca6778b33413490dff91b Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 13 Jun 2019 21:36:04 -0700 Subject: Translations (#207) * New translations strings_about.xml (Arabic) * New translations strings_colorpicker.xml (Arabic) * New translations strings_commons.xml (Arabic) * New translations strings_mediapicker.xml (Arabic) * New translations strings_about.xml (Afrikaans) * New translations strings_colorpicker.xml (Russian) * New translations strings_about.xml (Russian) * New translations strings_mediapicker.xml (Romanian) * New translations strings_commons.xml (Romanian) * New translations strings_colorpicker.xml (Romanian) * New translations strings_about.xml (Romanian) * New translations strings_mediapicker.xml (Russian) * New translations strings_mediapicker.xml (Japanese) * New translations strings_commons.xml (Japanese) * New translations strings_colorpicker.xml (Japanese) * New translations strings_commons.xml (Russian) * New translations strings_mediapicker.xml (Tagalog) * New translations strings_commons.xml (Tagalog) * New translations strings_colorpicker.xml (Tagalog) * New translations strings_about.xml (Tagalog) * New translations strings_about.xml (Japanese) * New translations strings_colorpicker.xml (Afrikaans) * New translations strings_mediapicker.xml (Czech) * New translations strings_commons.xml (Czech) * New translations strings_colorpicker.xml (Czech) * New translations strings_about.xml (Czech) * New translations strings_about.xml (Finnish) * New translations strings_mediapicker.xml (Catalan) * New translations strings_commons.xml (Catalan) * New translations strings_colorpicker.xml (Catalan) * New translations strings_about.xml (Catalan) * New translations strings_mediapicker.xml (Afrikaans) * New translations strings_commons.xml (Afrikaans) * New translations strings_colorpicker.xml (Finnish) * New translations strings_commons.xml (Greek) * New translations strings_mediapicker.xml (Hebrew) * New translations strings_commons.xml (Hebrew) * New translations strings_colorpicker.xml (Hebrew) * New translations strings_about.xml (Hebrew) * New translations strings_mediapicker.xml (Greek) * New translations strings_colorpicker.xml (Greek) * New translations strings_commons.xml (Finnish) * New translations strings_about.xml (Greek) * New translations strings_mediapicker.xml (Finnish) * New translations strings_about.xml (Tamil) * New translations strings_colorpicker.xml (Tamil) * New translations strings_commons.xml (Tamil) * New translations strings_mediapicker.xml (Tamil) * New translations strings_mediapicker.xml (Arabic) * New translations strings_commons.xml (Arabic) * New translations strings_about.xml (Arabic) * Add credits * Delete blank translations * Update changelog --- README.md | 1 + about/src/main/res/values-ar-rSA/strings_about.xml | 6 +++ .../res-public/values-ar-rSA/strings_commons.xml | 55 ++++++++++++++++++++++ docs/Changelog.md | 1 + files/translation_migration.sh | 0 .../main/res/values-ar-rSA/strings_mediapicker.xml | 11 +++++ sample/src/main/res/xml/kau_changelog.xml | 1 + 7 files changed, 75 insertions(+) create mode 100644 about/src/main/res/values-ar-rSA/strings_about.xml create mode 100644 core/src/main/res-public/values-ar-rSA/strings_commons.xml mode change 100644 => 100755 files/translation_migration.sh create mode 100644 mediapicker/src/main/res/values-ar-rSA/strings_mediapicker.xml (limited to 'core') diff --git a/README.md b/README.md index 0059e47..2c72eb1 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,7 @@ Special thanks to the following awesome people for translating significant porti | Language | Contributors | |----------|--------------| +| Arabic | [Mohammed Qubati](https://crowdin.com/profile/Mrkqubati) | | Chinese (Simplified) | [Alcatelia](https://crowdin.com/profile/Alcatelia) | | Chinese (Traditional) | [yipinghuang](https://crowdin.com/profile/yipinghuang) • [Su, Jun-Ming](https://crowdin.com/profile/sujunmin) • [Wei](https://crowdin.com/profile/wei4green) | | Danish | [mhtorp](https://crowdin.com/profile/mhtorp) | diff --git a/about/src/main/res/values-ar-rSA/strings_about.xml b/about/src/main/res/values-ar-rSA/strings_about.xml new file mode 100644 index 0000000..f80ee4d --- /dev/null +++ b/about/src/main/res/values-ar-rSA/strings_about.xml @@ -0,0 +1,6 @@ + + + + لن يتم تمكين هذا التطبيق بدون المكتبات الكبيرة التالية. + الأسئلة الشائعة + diff --git a/core/src/main/res-public/values-ar-rSA/strings_commons.xml b/core/src/main/res-public/values-ar-rSA/strings_commons.xml new file mode 100644 index 0000000..efaa623 --- /dev/null +++ b/core/src/main/res-public/values-ar-rSA/strings_commons.xml @@ -0,0 +1,55 @@ + + + + + عن التطبيق + حول %s + إضافة حساب + العودة + إلغاء + سجل التغييرات + إغلاق + التواصل معنا + نسخ + مخصص + مظلم + الافتراضي + لا تظهر مجدداً + تم + خطأ + خروج + هل أنت متأكد بأنك تريد الخروج؟ + هل أنت متأكد بأنك تريد الخروج %s؟ + زجاجي + فهمت + رائع + إخفاء + فاتح + تسجيل الدخول + تسجيل الخروج + هل أنت متأكد بأنك تريد تسجيل الخروج %s؟ + إدارة الحساب + ربما + القائمة + لا + لم يتم العثور على نتائج + لا يوجد + حسناً + Google play + تقييم + الإبلاغ عن خطأ + البحث + إرسال ملاحظات + الإرسال عبر + الاعدادات + المشاركة + تم نسخ النص إلى الحافظة. + شكراً + أوبس + تحذير + نعم + الإذن مرفوض + diff --git a/docs/Changelog.md b/docs/Changelog.md index 795b860..c68629f 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -2,6 +2,7 @@ ## v5.0.0 * Update Android SDK to 29 and Kotlin to 1.3.31 +* Update translations * :core: Update Material Dialogs to 3.x * :core: Change ProgressAnimator API * :core: Remove cursor tinting in EditText as it used reflection diff --git a/files/translation_migration.sh b/files/translation_migration.sh old mode 100644 new mode 100755 diff --git a/mediapicker/src/main/res/values-ar-rSA/strings_mediapicker.xml b/mediapicker/src/main/res/values-ar-rSA/strings_mediapicker.xml new file mode 100644 index 0000000..c05d161 --- /dev/null +++ b/mediapicker/src/main/res/values-ar-rSA/strings_mediapicker.xml @@ -0,0 +1,11 @@ + + + + لم يتم العثور على أي عنصر + لم يتم إختيار أي عنصر + لم يتم تحميل أي عنصر + لا توجد كاميرا + يرجى تثبيت تطبيق كاميرا والمحاولة مجدداً. + فشل في حفظ صورة مؤقتة. + اختيار وسائط + diff --git a/sample/src/main/res/xml/kau_changelog.xml b/sample/src/main/res/xml/kau_changelog.xml index d6e3d99..d59ce53 100644 --- a/sample/src/main/res/xml/kau_changelog.xml +++ b/sample/src/main/res/xml/kau_changelog.xml @@ -8,6 +8,7 @@ + -- cgit v1.2.3 From 8c259e6acc283e50348a8f8825504eed482bf610 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 1 Jul 2019 13:46:10 -0700 Subject: Merge scene transition definitions, resolves #213 --- core/src/main/kotlin/ca/allanwang/kau/utils/BundleUtils.kt | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'core') diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/BundleUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/BundleUtils.kt index 40c1c72..b857eb0 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/utils/BundleUtils.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/utils/BundleUtils.kt @@ -88,16 +88,6 @@ fun bundleOf(vararg params: kotlin.Pair): Bundle { return b } -/** - * Adds transition bundle if context is activity and build is lollipop+ - */ -@SuppressLint("NewApi") -fun Bundle.withSceneTransitionAnimation(context: Context) { - if (context !is Activity || !buildIsLollipopAndUp) return - val options = ActivityOptions.makeSceneTransitionAnimation(context) - putAll(options.toBundle()) -} - /** * Given the parent view and map of view ids to tags, * create a scene transition animation @@ -112,7 +102,7 @@ fun Bundle.withSceneTransitionAnimation(parent: View, data: Map) = * create a scene transition animation */ @SuppressLint("NewApi") -fun Bundle.withSceneTransitionAnimation(context: Context, data: Map) { +fun Bundle.withSceneTransitionAnimation(context: Context, data: Map = emptyMap()) { if (context !is Activity || !buildIsLollipopAndUp) return val options = ActivityOptions.makeSceneTransitionAnimation( context, -- cgit v1.2.3 From 1f9198a1c05223edc7abb095f483d02cda5f1122 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 1 Jul 2019 14:39:46 -0700 Subject: Add in memory kpref variant --- .../kotlin/ca/allanwang/kau/kpref/KPrefTest.kt | 75 +++++++++-------- .../main/kotlin/ca/allanwang/kau/kpref/KPref.kt | 10 ++- .../kotlin/ca/allanwang/kau/kpref/KPrefBuilder.kt | 75 +++++++++++++++++ .../kotlin/ca/allanwang/kau/kpref/KPrefDelegate.kt | 96 ++++++++++++++-------- .../ca/allanwang/kau/kpref/KPrefSingleDelegate.kt | 58 +++++++++++-- docs/Changelog.md | 1 + 6 files changed, 237 insertions(+), 78 deletions(-) create mode 100644 core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefBuilder.kt (limited to 'core') diff --git a/core/src/androidTest/kotlin/ca/allanwang/kau/kpref/KPrefTest.kt b/core/src/androidTest/kotlin/ca/allanwang/kau/kpref/KPrefTest.kt index 29f5af1..735302c 100644 --- a/core/src/androidTest/kotlin/ca/allanwang/kau/kpref/KPrefTest.kt +++ b/core/src/androidTest/kotlin/ca/allanwang/kau/kpref/KPrefTest.kt @@ -24,8 +24,6 @@ import org.junit.Before import org.junit.Test import org.junit.runner.RunWith import kotlin.test.assertEquals -import kotlin.test.assertFalse -import kotlin.test.assertTrue /** * Created by Allan Wang on 2017-08-01. @@ -34,9 +32,10 @@ import kotlin.test.assertTrue @MediumTest class KPrefTest { - lateinit var pref: TestPref + lateinit var androidPref: TestPref + lateinit var memPref: TestPref - class TestPref : KPref() { + class TestPref(builder: KPrefBuilder) : KPref(builder) { init { initialize(ApplicationProvider.getApplicationContext(), "kpref_test_${System.currentTimeMillis()}") @@ -57,51 +56,61 @@ class KPrefTest { @Before fun init() { - pref = TestPref() - pref.sp.edit().clear().commit() + androidPref = TestPref(KPrefBuilderAndroid) + androidPref.sp.edit().clear().commit() + memPref = TestPref(KPrefBuilderInMemory) + } + + private fun pref(action: TestPref.() -> Unit) { + androidPref.action() + memPref.action() + } + + private fun assertPrefEquals(expected: T, actual: TestPref.() -> T, message: String? = null) { + assertEquals(expected, androidPref.actual(), "Android KPrefs: $message") + assertEquals(expected, memPref.actual(), "In Mem KPrefs: $message") } @Test fun getDefaults() { - assertEquals(1, pref.one) - assertEquals(2f, pref.two) - assertEquals(true, pref.`true`) - assertEquals("hello", pref.hello) - assertEquals(3, pref.set.size) - assertTrue(pref.set.contains("po")) - assertTrue(pref.set.contains("ta")) - assertTrue(pref.set.contains("to")) - assertEquals(0, pref.sp.all.size, "Defaults should not be set automatically") + assertPrefEquals(1, { one }) + assertPrefEquals(2f, { two }) + assertPrefEquals(true, { `true` }) + assertPrefEquals("hello", { hello }) + assertPrefEquals(3, { set.size }) + assertPrefEquals(setOf("po", "ta", "to"), { set }) + assertEquals(0, androidPref.sp.all.size, "Defaults should not be set automatically") } @Test fun setter() { - assertEquals(1, pref.one) - pref.one = 2 - assertEquals(2, pref.one) - pref.hello = "goodbye" - assertEquals("goodbye", pref.hello) - assertEquals(pref.hello, pref.sp.getString("hello", "hello")) - assertEquals(2, pref.sp.all.size) + assertPrefEquals(1, { one }) + pref { one = 2 } + assertPrefEquals(2, { one }) + pref { hello = "goodbye" } + assertPrefEquals("goodbye", { hello }) + assertEquals(androidPref.hello, androidPref.sp.getString("hello", "badfallback")) + assertEquals(2, androidPref.sp.all.size) } @SuppressLint("CommitPrefEdits") @Test fun reset() { - pref.one = 2 - assertEquals(2, pref.one) - assertEquals(6, pref.prefMap.size, "Prefmap does not have all elements") - pref.reset() //only invalidates our lazy delegate; doesn't change the actual pref - assertEquals(2, pref.one, "Kpref did not properly fetch from shared prefs") - pref.sp.edit().putInt("one", -1).commit() - assertEquals(2, pref.one, "Lazy kpref should still retain old value") - pref.reset() - assertEquals(-1, pref.one, "Kpref did not refetch from shared prefs upon reset") + pref { one = 2 } + assertPrefEquals(2, { one }) + assertPrefEquals(6, { prefMap.size }, "Prefmap does not have all elements") + pref { reset() } //only invalidates our lazy delegate; doesn't change the actual pref + assertPrefEquals(2, { one }, "Kpref did not properly fetch from shared prefs") + // Android pref only + androidPref.sp.edit().putInt("one", -1).commit() + assertEquals(2, androidPref.one, "Lazy kpref should still retain old value") + androidPref.reset() + assertEquals(-1, androidPref.one, "Kpref did not refetch from shared prefs upon reset") } @Test fun single() { - assertTrue(pref.oneShot) - assertFalse(pref.oneShot) + assertPrefEquals(true, { oneShot }) + assertPrefEquals(false, { androidPref.oneShot }) } } diff --git a/core/src/main/kotlin/ca/allanwang/kau/kpref/KPref.kt b/core/src/main/kotlin/ca/allanwang/kau/kpref/KPref.kt index 7a6330f..fc7a76a 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/kpref/KPref.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/kpref/KPref.kt @@ -36,14 +36,18 @@ import ca.allanwang.kau.logging.KL * You may optionally override [deleteKeys]. This will be called on initialization * And delete all keys returned from that method */ -open class KPref { +open class KPref(builder: KPrefBuilder = KPrefBuilderAndroid) : KPrefBuilder by builder { lateinit var PREFERENCE_NAME: String lateinit var sp: SharedPreferences - fun initialize(c: Context, preferenceName: String) { + fun initialize( + c: Context, + preferenceName: String, + sharedPrefs: SharedPreferences = c.applicationContext.getSharedPreferences(preferenceName, Context.MODE_PRIVATE) + ) { PREFERENCE_NAME = preferenceName - sp = c.applicationContext.getSharedPreferences(preferenceName, Context.MODE_PRIVATE) + sp = sharedPrefs KL.d { "Shared Preference $preferenceName has been initialized" } val toDelete = deleteKeys() if (toDelete.isNotEmpty()) { diff --git a/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefBuilder.kt b/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefBuilder.kt new file mode 100644 index 0000000..4dd3012 --- /dev/null +++ b/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefBuilder.kt @@ -0,0 +1,75 @@ +package ca.allanwang.kau.kpref + +interface KPrefBuilder { + fun KPref.kpref(key: String, fallback: Boolean, postSetter: (value: Boolean) -> Unit = {}): KPrefDelegate + + fun KPref.kpref(key: String, fallback: Float, postSetter: (value: Float) -> Unit = {}): KPrefDelegate + + @Deprecated( + "Double is not supported in SharedPreferences; cast to float yourself", + ReplaceWith("kpref(key, fallback.toFloat(), postSetter)"), + DeprecationLevel.WARNING + ) + fun KPref.kpref(key: String, fallback: Double, postSetter: (value: Float) -> Unit = {}): KPrefDelegate = + kpref(key, fallback.toFloat(), postSetter) + + fun KPref.kpref(key: String, fallback: Int, postSetter: (value: Int) -> Unit = {}): KPrefDelegate + + fun KPref.kpref(key: String, fallback: Long, postSetter: (value: Long) -> Unit = {}): KPrefDelegate + + fun KPref.kpref( + key: String, + fallback: Set, + postSetter: (value: Set) -> Unit = {} + ): KPrefDelegate> + + fun KPref.kpref(key: String, fallback: String, postSetter: (value: String) -> Unit = {}): KPrefDelegate + + fun KPref.kprefSingle(key: String): KPrefSingleDelegate +} + +object KPrefBuilderAndroid : KPrefBuilder { + + override fun KPref.kpref(key: String, fallback: Boolean, postSetter: (value: Boolean) -> Unit) = + KPrefDelegateAndroid(key, fallback, this, KPrefBooleanTransaction, postSetter) + + override fun KPref.kpref(key: String, fallback: Float, postSetter: (value: Float) -> Unit) = + KPrefDelegateAndroid(key, fallback, this, KPrefFloatTransaction, postSetter) + + override fun KPref.kpref(key: String, fallback: Int, postSetter: (value: Int) -> Unit) = + KPrefDelegateAndroid(key, fallback, this, KPrefIntTransaction, postSetter) + + override fun KPref.kpref(key: String, fallback: Long, postSetter: (value: Long) -> Unit) = + KPrefDelegateAndroid(key, fallback, this, KPrefLongTransaction, postSetter) + + override fun KPref.kpref(key: String, fallback: Set, postSetter: (value: Set) -> Unit) = + KPrefDelegateAndroid(key, fallback, this, KPrefSetTransaction, postSetter) + + override fun KPref.kpref(key: String, fallback: String, postSetter: (value: String) -> Unit) = + KPrefDelegateAndroid(key, fallback, this, KPrefStringTransaction, postSetter) + + override fun KPref.kprefSingle(key: String) = KPrefSingleDelegateAndroid(key, this) +} + +object KPrefBuilderInMemory : KPrefBuilder { + + override fun KPref.kpref(key: String, fallback: Boolean, postSetter: (value: Boolean) -> Unit) = + KPrefDelegateInMemory(key, fallback, this, postSetter) + + override fun KPref.kpref(key: String, fallback: Float, postSetter: (value: Float) -> Unit) = + KPrefDelegateInMemory(key, fallback, this, postSetter) + + override fun KPref.kpref(key: String, fallback: Int, postSetter: (value: Int) -> Unit) = + KPrefDelegateInMemory(key, fallback, this, postSetter) + + override fun KPref.kpref(key: String, fallback: Long, postSetter: (value: Long) -> Unit) = + KPrefDelegateInMemory(key, fallback, this, postSetter) + + override fun KPref.kpref(key: String, fallback: Set, postSetter: (value: Set) -> Unit) = + KPrefDelegateInMemory(key, fallback, this, postSetter) + + override fun KPref.kpref(key: String, fallback: String, postSetter: (value: String) -> Unit) = + KPrefDelegateInMemory(key, fallback, this, postSetter) + + override fun KPref.kprefSingle(key: String) = KPrefSingleDelegateInMemory(key, this) +} \ No newline at end of file diff --git a/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefDelegate.kt b/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefDelegate.kt index 9813f24..684b139 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefDelegate.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefDelegate.kt @@ -17,32 +17,6 @@ package ca.allanwang.kau.kpref import ca.allanwang.kau.kotlin.ILazyResettable -fun KPref.kpref(key: String, fallback: Boolean, postSetter: (value: Boolean) -> Unit = {}) = - KPrefDelegate(key, fallback, this, KPrefBooleanTransaction, postSetter) - -fun KPref.kpref(key: String, fallback: Float, postSetter: (value: Float) -> Unit = {}) = - KPrefDelegate(key, fallback, this, KPrefFloatTransaction, postSetter) - -@Deprecated( - "Double is not supported in SharedPreferences; cast to float yourself", - ReplaceWith("kpref(key, fallback.toFloat(), postSetter)"), - DeprecationLevel.WARNING -) -fun KPref.kpref(key: String, fallback: Double, postSetter: (value: Float) -> Unit = {}) = - kpref(key, fallback.toFloat(), postSetter) - -fun KPref.kpref(key: String, fallback: Int, postSetter: (value: Int) -> Unit = {}) = - KPrefDelegate(key, fallback, this, KPrefIntTransaction, postSetter) - -fun KPref.kpref(key: String, fallback: Long, postSetter: (value: Long) -> Unit = {}) = - KPrefDelegate(key, fallback, this, KPrefLongTransaction, postSetter) - -fun KPref.kpref(key: String, fallback: Set, postSetter: (value: Set) -> Unit = {}) = - KPrefDelegate(key, fallback, this, KPrefSetTransaction, postSetter) - -fun KPref.kpref(key: String, fallback: String, postSetter: (value: String) -> Unit = {}) = - KPrefDelegate(key, fallback, this, KPrefStringTransaction, postSetter) - /** * Created by Allan Wang on 2017-06-07. * @@ -50,13 +24,20 @@ fun KPref.kpref(key: String, fallback: String, postSetter: (value: String) -> Un * Contains a unique key for the shared preference as well as a nonnull fallback item * Also contains an optional mutable postSetter that will be called every time a new value is given */ -class KPrefDelegate internal constructor( + +interface KPrefDelegate : ILazyResettable { + operator fun setValue(any: Any, property: kotlin.reflect.KProperty<*>, t: T) +} + +class KPrefException(message: String) : IllegalAccessException(message) + +class KPrefDelegateAndroid internal constructor( private val key: String, private val fallback: T, private val pref: KPref, private val transaction: KPrefTransaction, private var postSetter: (value: T) -> Unit = {} -) : ILazyResettable { +) : KPrefDelegate { private object UNINITIALIZED @@ -67,28 +48,26 @@ class KPrefDelegate internal constructor( init { if (pref.prefMap.containsKey(key)) throw KPrefException("$key is already used elsewhere in preference ${pref.PREFERENCE_NAME}") - pref.prefMap[key] = this@KPrefDelegate + pref.prefMap[key] = this@KPrefDelegateAndroid } override fun invalidate() { _value = UNINITIALIZED } + @Suppress("UNCHECKED_CAST") override val value: T get() { val _v1 = _value if (_v1 !== UNINITIALIZED) - @Suppress("UNCHECKED_CAST") return _v1 as T return synchronized(lock) { val _v2 = _value if (_v2 !== UNINITIALIZED) { - @Suppress("UNCHECKED_CAST") _v2 as T } else { _value = transaction.get(pref.sp, key, fallback) - @Suppress("UNCHECKED_CAST") _value as T } } @@ -98,7 +77,7 @@ class KPrefDelegate internal constructor( override fun toString(): String = if (isInitialized()) value.toString() else "Lazy kPref $key not initialized yet." - operator fun setValue(any: Any, property: kotlin.reflect.KProperty<*>, t: T) { + override operator fun setValue(any: Any, property: kotlin.reflect.KProperty<*>, t: T) { _value = t val editor = pref.sp.edit() transaction.set(editor, key, t) @@ -107,4 +86,53 @@ class KPrefDelegate internal constructor( } } -class KPrefException(message: String) : IllegalAccessException(message) +class KPrefDelegateInMemory internal constructor( + private val key: String, + private val fallback: T, + private val pref: KPref, + private var postSetter: (value: T) -> Unit = {} +) : KPrefDelegate { + + private object UNINITIALIZED + + @Volatile + private var _value: Any? = UNINITIALIZED + private val lock = this + + init { + if (pref.prefMap.containsKey(key)) + throw KPrefException("$key is already used elsewhere in preference ${pref.PREFERENCE_NAME}") + pref.prefMap[key] = this + } + + override fun invalidate() { + // No op + } + + @Suppress("UNCHECKED_CAST") + override val value: T + get() { + val _v1 = _value + if (_v1 !== UNINITIALIZED) + return _v1 as T + + return synchronized(lock) { + val _v2 = _value + if (_v2 !== UNINITIALIZED) { + _v2 as T + } else { + _value = fallback + _value as T + } + } + } + + override fun isInitialized(): Boolean = _value !== UNINITIALIZED + + override fun toString(): String = if (isInitialized()) value.toString() else "Lazy kPref $key not initialized yet." + + override operator fun setValue(any: Any, property: kotlin.reflect.KProperty<*>, t: T) { + _value = t + postSetter(t) + } +} diff --git a/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefSingleDelegate.kt b/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefSingleDelegate.kt index 204e07e..ef59e78 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefSingleDelegate.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefSingleDelegate.kt @@ -17,8 +17,6 @@ package ca.allanwang.kau.kpref import ca.allanwang.kau.kotlin.ILazyResettable -fun KPref.kprefSingle(key: String) = KPrefSingleDelegate(key, this) - /** * Created by Allan Wang on 2017-06-07. * @@ -27,17 +25,21 @@ fun KPref.kprefSingle(key: String) = KPrefSingleDelegate(key, this) * All subsequent retrievals will be [false] * This is useful for one time toggles such as showcasing items */ -class KPrefSingleDelegate internal constructor(private val key: String, private val pref: KPref, lock: Any? = null) : - ILazyResettable { +interface KPrefSingleDelegate : ILazyResettable + +class KPrefSingleDelegateAndroid internal constructor( + private val key: String, + private val pref: KPref +) : KPrefSingleDelegate { @Volatile private var _value: Boolean? = null - private val lock = lock ?: this + private val lock = this init { if (pref.prefMap.containsKey(key)) throw KPrefException("$key is already used elsewhere in preference ${pref.PREFERENCE_NAME}") - pref.prefMap.put(key, this@KPrefSingleDelegate) + pref.prefMap[key] = this } override fun invalidate() { @@ -47,9 +49,9 @@ class KPrefSingleDelegate internal constructor(private val key: String, private override val value: Boolean get() { val _v1 = _value - if (_v1 != null) + if (_v1 != null) { return _v1 - + } return synchronized(lock) { val _v2 = _value if (_v2 != null) { @@ -69,3 +71,43 @@ class KPrefSingleDelegate internal constructor(private val key: String, private override fun toString(): String = if (isInitialized()) value.toString() else "Lazy kPref $key not initialized yet." } + +class KPrefSingleDelegateInMemory internal constructor( + private val key: String, + private val pref: KPref +) : KPrefSingleDelegate { + @Volatile + private var _value: Boolean? = null + private val lock = this + + init { + if (pref.prefMap.containsKey(key)) + throw KPrefException("$key is already used elsewhere in preference ${pref.PREFERENCE_NAME}") + pref.prefMap[key] = this + } + + override fun invalidate() { + // No op + } + + override val value: Boolean + get() { + val _v1 = _value + if (_v1 != null) { + return _v1 + } + return synchronized(lock) { + val _v2 = _value + if (_v2 != null) { + _v2 + } else { + _value = false + true + } + } + } + + override fun isInitialized(): Boolean = _value != null + + override fun toString(): String = if (isInitialized()) value.toString() else "Lazy kPref $key not initialized yet." +} \ No newline at end of file diff --git a/docs/Changelog.md b/docs/Changelog.md index 2c653e0..0ccf69c 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -2,6 +2,7 @@ ## v5.0.1 * :adapter: Moved fastadapter elements to new module, :fastadapter:. To migrate, simply rename the dependency. If you don't use fast adapter, no changes are necessary +* :adapter: Make NoAnimatorChange an object; previously a class ## v5.0.0 * Update Android SDK to 29 and Kotlin to 1.3.31 -- cgit v1.2.3 From 39bda3064e75a8a4be100afa4f5e7adee33c2f17 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 1 Jul 2019 14:44:34 -0700 Subject: Update changelog and add post setter test --- .../androidTest/kotlin/ca/allanwang/kau/kpref/KPrefTest.kt | 12 +++++++++++- docs/Changelog.md | 2 ++ sample/src/main/res/xml/kau_changelog.xml | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/src/androidTest/kotlin/ca/allanwang/kau/kpref/KPrefTest.kt b/core/src/androidTest/kotlin/ca/allanwang/kau/kpref/KPrefTest.kt index 735302c..143b83f 100644 --- a/core/src/androidTest/kotlin/ca/allanwang/kau/kpref/KPrefTest.kt +++ b/core/src/androidTest/kotlin/ca/allanwang/kau/kpref/KPrefTest.kt @@ -41,11 +41,15 @@ class KPrefTest { initialize(ApplicationProvider.getApplicationContext(), "kpref_test_${System.currentTimeMillis()}") } + var postSetterCount: Int = 0 + var one by kpref("one", 1) var two by kpref("two", 2f) - var `true` by kpref("true", true) + var `true` by kpref("true", true, postSetter = { + postSetterCount++ + }) var hello by kpref("hello", "hello") @@ -113,4 +117,10 @@ class KPrefTest { assertPrefEquals(true, { oneShot }) assertPrefEquals(false, { androidPref.oneShot }) } + + @Test + fun postSetter() { + pref { `true` = true } + assertPrefEquals(1, { postSetterCount }, "Post setter was not called") + } } diff --git a/docs/Changelog.md b/docs/Changelog.md index 0ccf69c..b282830 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -3,6 +3,8 @@ ## v5.0.1 * :adapter: Moved fastadapter elements to new module, :fastadapter:. To migrate, simply rename the dependency. If you don't use fast adapter, no changes are necessary * :adapter: Make NoAnimatorChange an object; previously a class +* :core: KPref now supports in memory only variants for testing; pass KPrefBuilderInMemory to KPref constructor +* :core: KPref initializer takes in SharedPreferences so user can configure it ## v5.0.0 * Update Android SDK to 29 and Kotlin to 1.3.31 diff --git a/sample/src/main/res/xml/kau_changelog.xml b/sample/src/main/res/xml/kau_changelog.xml index 0e38015..6144685 100644 --- a/sample/src/main/res/xml/kau_changelog.xml +++ b/sample/src/main/res/xml/kau_changelog.xml @@ -9,8 +9,8 @@ - - + + -- cgit v1.2.3 From 33e415415bafc712a633880812ed90d03246c456 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 1 Jul 2019 14:48:31 -0700 Subject: Update kpref docs --- core/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'core') diff --git a/core/README.md b/core/README.md index b9a10f5..b1140bf 100644 --- a/core/README.md +++ b/core/README.md @@ -71,6 +71,14 @@ object MyPrefs : KPref() { Notice that it is a `val` and takes no default. It will return true the first time and false for all subsequent calls. +### KPref Testing + +If your android components can be tested without an emulator, you can also modify KPref to operate without shared preferences. +To do so, call `KPref(KPrefBuilderInMemory)` when creating your preferences. +This variant does not pass updates to the shared preferences. +To set the builder, you may wish to use dependency injection or service locators to supply the builder and the KPref. +In that case, your preferences would be a class instead of an object. + ## Changelog XML Create an xml resource with the following structure: -- cgit v1.2.3 From d94017e6f6df67e80604111028ea16f6c7f4e077 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Fri, 26 Jul 2019 14:53:29 -0700 Subject: Update versions and setup with google --- .gitignore | 4 +- .idea/codeStyles/Project.xml | 136 --------------------- .idea/vcs.xml | 6 - buildSrc/src/main/kotlin/kau/Versions.kt | 6 +- core-ui/src/main/res-public/values/public.xml | 4 +- .../ca/allanwang/kau/swipe/ViewDragHelper.java | 2 +- core/src/main/res-public/values/public.xml | 52 ++++---- gradle/wrapper/gradle-wrapper.properties | 2 +- 8 files changed, 36 insertions(+), 176 deletions(-) delete mode 100644 .idea/codeStyles/Project.xml delete mode 100644 .idea/vcs.xml (limited to 'core') diff --git a/.gitignore b/.gitignore index ef20a58..f08bd63 100644 --- a/.gitignore +++ b/.gitignore @@ -28,4 +28,6 @@ .idea/**/assetWizardSettings.xml .idea/**/caches .idea/modules.xml -.idea/modules \ No newline at end of file +.idea/modules +.idea/vcs.xml +.idea/codeStyles/Project.xml \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index be6976d..0000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/kau/Versions.kt b/buildSrc/src/main/kotlin/kau/Versions.kt index 515f702..4deb3b7 100644 --- a/buildSrc/src/main/kotlin/kau/Versions.kt +++ b/buildSrc/src/main/kotlin/kau/Versions.kt @@ -24,10 +24,10 @@ object Versions { const val constraintLayout = "1.1.3" // https://kotlinlang.org/docs/reference/using-gradle.html - const val kotlin = "1.3.31" + const val kotlin = "1.3.41" // https://github.com/Kotlin/kotlinx.coroutines/releases - const val coroutines = "1.3.0-M1" + const val coroutines = "1.3.0-RC" // https://github.com/mikepenz/AboutLibraries/releases const val aboutLibraries = "6.2.3" @@ -71,7 +71,7 @@ object Versions { const val bugsnagPlugin="4.1.1" // https://mvnrepository.com/artifact/com.android.tools.build/gradle?repo=google - const val gradlePlugin = "3.4.1" + const val gradlePlugin = "3.5.0-rc01" // https://github.com/dcendents/android-maven-gradle-plugin/releases const val mavenPlugin = "2.1" // https://github.com/Triple-T/gradle-play-publisher/releases diff --git a/core-ui/src/main/res-public/values/public.xml b/core-ui/src/main/res-public/values/public.xml index af7ce44..71657d6 100644 --- a/core-ui/src/main/res-public/values/public.xml +++ b/core-ui/src/main/res-public/values/public.xml @@ -1,8 +1,8 @@ - + - + diff --git a/core/src/main/kotlin/ca/allanwang/kau/swipe/ViewDragHelper.java b/core/src/main/kotlin/ca/allanwang/kau/swipe/ViewDragHelper.java index ac7fb7e..f6e907a 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/swipe/ViewDragHelper.java +++ b/core/src/main/kotlin/ca/allanwang/kau/swipe/ViewDragHelper.java @@ -25,7 +25,7 @@ import static ca.allanwang.kau.swipe.SwipeBackHelperKt.SWIPE_EDGE_TOP; * of useful operations and state tracking for allowing a user to drag and reposition * views within their parent ViewGroup. *

- * This is an extension of {@link androidx.core.widget.ViewDragHelper} + * This is an extension of {@link androidx.customview.widget.ViewDragHelper} * Along with additional methods defined in {@link ViewDragHelperExtras} */ class ViewDragHelper implements ViewDragHelperExtras { diff --git a/core/src/main/res-public/values/public.xml b/core/src/main/res-public/values/public.xml index 9761199..0b050dc 100644 --- a/core/src/main/res-public/values/public.xml +++ b/core/src/main/res-public/values/public.xml @@ -1,20 +1,27 @@ - + + + + + + + + + + + + + + - + - - - - - - - - - + + + @@ -43,6 +50,13 @@ + + + + + + + @@ -98,21 +112,7 @@ + - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9fccf04..f1f2eac 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip -- cgit v1.2.3