From 6f97fd5f7c528594899e66d2d8b502a20ade6f53 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 13 Jun 2019 13:29:07 -0700 Subject: Revert iconics updates for now --- buildSrc/src/main/kotlin/kau/Dependencies.kt | 6 +++--- buildSrc/src/main/kotlin/kau/Versions.kt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'buildSrc') diff --git a/buildSrc/src/main/kotlin/kau/Dependencies.kt b/buildSrc/src/main/kotlin/kau/Dependencies.kt index c704500..a6268ae 100644 --- a/buildSrc/src/main/kotlin/kau/Dependencies.kt +++ b/buildSrc/src/main/kotlin/kau/Dependencies.kt @@ -24,9 +24,9 @@ object Dependencies { const val googleMaterial = "com.google.android.material:material:${Versions.googleMaterial}" const val iconics = "com.mikepenz:iconics-core:${Versions.iconics}" - const val iconicsGoogle = "com.mikepenz:google-material-typeface:${Versions.iconicsGoogle}.original-kotlin@aar" - const val iconicsMaterial = "com.mikepenz:material-design-iconic-typeface:${Versions.iconicsMaterial}-kotlin@aar" - const val iconicsCommunity = "com.mikepenz:community-material-typeface:${Versions.iconicsCommunity}-kotlin@aar" + const val iconicsGoogle = "com.mikepenz:google-material-typeface:${Versions.iconicsGoogle}.original@aar" + const val iconicsMaterial = "com.mikepenz:material-design-iconic-typeface:${Versions.iconicsMaterial}@aar" + const val iconicsCommunity = "com.mikepenz:community-material-typeface:${Versions.iconicsCommunity}@aar" const val aboutLibraries = "com.mikepenz:aboutlibraries:${Versions.aboutLibraries}" diff --git a/buildSrc/src/main/kotlin/kau/Versions.kt b/buildSrc/src/main/kotlin/kau/Versions.kt index e953929..7133ed5 100644 --- a/buildSrc/src/main/kotlin/kau/Versions.kt +++ b/buildSrc/src/main/kotlin/kau/Versions.kt @@ -43,8 +43,8 @@ object Versions { // https://github.com/mikepenz/Android-Iconics#1-provide-the-gradle-dependency const val iconics = "3.2.5" - const val iconicsGoogle = "3.0.1.4" - const val iconicsMaterial = "2.2.0.6" + const val iconicsGoogle = "3.0.1.3" + const val iconicsMaterial = "2.2.0.5" const val iconicsCommunity = "3.5.95.1" // https://github.com/afollestad/material-dialogs/releases -- cgit v1.2.3 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 --- buildSrc/src/main/kotlin/kau/Versions.kt | 4 ++-- core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefTransaction.kt | 2 +- core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt | 2 +- docs/Changelog.md | 3 +++ sample/src/main/res/xml/kau_changelog.xml | 5 +++-- 5 files changed, 10 insertions(+), 6 deletions(-) (limited to 'buildSrc') diff --git a/buildSrc/src/main/kotlin/kau/Versions.kt b/buildSrc/src/main/kotlin/kau/Versions.kt index 7133ed5..515f702 100644 --- a/buildSrc/src/main/kotlin/kau/Versions.kt +++ b/buildSrc/src/main/kotlin/kau/Versions.kt @@ -3,10 +3,10 @@ package kau object Versions { const val coreMinSdk = 19 const val minSdk = 21 - const val targetSdk = 28 + const val targetSdk = 29 // https://developer.android.com/studio/releases/build-tools - const val buildTools = "28.0.3" + const val buildTools = "29.0.0" // https://mvnrepository.com/artifact/androidx.appcompat/appcompat?repo=google const val appcompat = "1.0.2" 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) } diff --git a/docs/Changelog.md b/docs/Changelog.md index 61e5fb7..689fbd9 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -1,8 +1,11 @@ # Changelog ## v5.0.0 +* Update Android SDK to 29 and Kotlin to 1.3.31 * :core: Update Material Dialogs to 3.x +* :core: Change ProgressAnimator API * :colorpicker: Strip down to just the interface; unless you require the accent palette, it may be fine to just use MD's color extension +* :gradle-plugin: Convert to kotlin, rework dependencies, and remove extension hooks ## v4.1.0 * :core: Deprecate NetworkUtils, as the underlying functions are deprecated diff --git a/sample/src/main/res/xml/kau_changelog.xml b/sample/src/main/res/xml/kau_changelog.xml index 53265d0..b5ec47c 100644 --- a/sample/src/main/res/xml/kau_changelog.xml +++ b/sample/src/main/res/xml/kau_changelog.xml @@ -7,10 +7,11 @@ --> + + - - + -- cgit v1.2.3 From 1ae6a8c455bbe40ad247a29848432a4fe00459f7 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 1 Jul 2019 12:09:43 -0700 Subject: Add kau to plugin dependency class, resolves #211 --- buildSrc/src/main/kotlin/kau/Dependencies.kt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'buildSrc') diff --git a/buildSrc/src/main/kotlin/kau/Dependencies.kt b/buildSrc/src/main/kotlin/kau/Dependencies.kt index a6268ae..f6d07ec 100644 --- a/buildSrc/src/main/kotlin/kau/Dependencies.kt +++ b/buildSrc/src/main/kotlin/kau/Dependencies.kt @@ -4,6 +4,12 @@ package kau * Some common dependencies, backed by the supplied versions */ object Dependencies { + @JvmStatic + fun kau(version: String) = "ca.allanwang:kau:$version" + + @JvmStatic + fun kau(type: String, version: String) = "ca.allanwang.kau:$type:$version" + @JvmStatic fun kotlin(type: String) = "org.jetbrains.kotlin:kotlin-$type:${Versions.kotlin}" @@ -44,6 +50,7 @@ object Dependencies { const val fastAdapter = "com.mikepenz:fastadapter:${Versions.fastAdapter}" @JvmStatic fun fastAdapter(type: String) = "com.mikepenz:fastadapter-$type:${Versions.fastAdapter}" + @JvmField val fastAdapterCommons = fastAdapter("commons") -- 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 'buildSrc') 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