From 03dbee731b37e3429bf450684174a8f4d0d4f5d5 Mon Sep 17 00:00:00 2001 From: Osip Fatkullin Date: Fri, 17 May 2024 15:33:20 +0200 Subject: [PATCH 1/7] ktx: Move all extensions into ktx catalog --- README.md => ktx/README.md | 5 +++-- {core-ktx => ktx/core-ktx}/CHANGELOG.md | 0 {core-ktx => ktx/core-ktx}/README.md | 5 +++-- {core-ktx => ktx/core-ktx}/build.gradle.kts | 0 .../core-ktx}/src/main/AndroidManifest.xml | 0 .../core-ktx}/src/main/kotlin/Context.kt | 0 .../src/main/kotlin/content/SharedPreferences.kt | 0 .../kotlin/content/SharedPreferencesDelegates.kt | 0 .../core-ktx}/src/main/kotlin/graphics/Canvas.kt | 0 .../core-ktx}/src/main/kotlin/view/Keyboard.kt | 0 .../fragment-args-ktx}/CHANGELOG.md | 0 .../fragment-args-ktx}/README.md | 5 +++-- .../fragment-args-ktx}/build.gradle.kts | 0 .../src/main/AndroidManifest.xml | 0 .../src/main/kotlin/FragmentArgsDelegates.kt | 0 .../src/main/kotlin/internal/Delegate.kt | 0 {fragment-ktx => ktx/fragment-ktx}/CHANGELOG.md | 0 {fragment-ktx => ktx/fragment-ktx}/README.md | 5 +++-- .../fragment-ktx}/build.gradle.kts | 0 .../fragment-ktx}/src/main/AndroidManifest.xml | 0 .../src/main/kotlin/OnBackPressedCallback.kt | 0 .../lifecycle-livedata-ktx}/CHANGELOG.md | 0 .../lifecycle-livedata-ktx}/README.md | 5 +++-- .../lifecycle-livedata-ktx}/build.gradle.kts | 0 .../src/main/AndroidManifest.xml | 0 .../src/main/kotlin/EventQueue.kt | 0 .../src/main/kotlin/LiveData.kt | 0 .../src/main/kotlin/LiveDataAccessors.kt | 0 .../src/main/kotlin/Transformations.kt | 0 .../src/test/kotlin/EventQueueTest.kt | 0 .../src/test/kotlin/InstantExecutorExtension.kt | 0 .../src/test/kotlin/LiveDataAccessorsTest.kt | 0 .../src/test/kotlin/LiveDataTest.kt | 0 .../src/test/kotlin/TransformationsTest.kt | 0 {resources-ktx => ktx/resources-ktx}/CHANGELOG.md | 0 {resources-ktx => ktx/resources-ktx}/README.md | 5 +++-- .../resources-ktx}/build.gradle.kts | 0 .../resources-ktx}/src/main/AndroidManifest.xml | 0 .../resources-ktx}/src/main/kotlin/Attributes.kt | 0 .../src/main/kotlin/DimensionConverters.kt | 0 .../src/main/kotlin/DrawableWithTint.kt | 0 .../src/main/kotlin/FragmentResourcesAccessors.kt | 0 .../src/main/kotlin/ViewResourcesAccessors.kt | 0 .../viewbinding-ktx}/CHANGELOG.md | 0 {viewbinding-ktx => ktx/viewbinding-ktx}/README.md | 5 +++-- .../viewbinding-ktx}/build.gradle.kts | 0 .../viewbinding-ktx}/src/main/AndroidManifest.xml | 0 .../src/main/kotlin/ViewBinding.kt | 0 .../src/main/kotlin/ViewBindingDelegate.kt | 0 .../viewbinding-ktx}/viewbinding.pro | 0 settings.gradle.kts | 14 +++++++------- 51 files changed, 28 insertions(+), 21 deletions(-) rename README.md => ktx/README.md (95%) rename {core-ktx => ktx/core-ktx}/CHANGELOG.md (100%) rename {core-ktx => ktx/core-ktx}/README.md (94%) rename {core-ktx => ktx/core-ktx}/build.gradle.kts (100%) rename {core-ktx => ktx/core-ktx}/src/main/AndroidManifest.xml (100%) rename {core-ktx => ktx/core-ktx}/src/main/kotlin/Context.kt (100%) rename {core-ktx => ktx/core-ktx}/src/main/kotlin/content/SharedPreferences.kt (100%) rename {core-ktx => ktx/core-ktx}/src/main/kotlin/content/SharedPreferencesDelegates.kt (100%) rename {core-ktx => ktx/core-ktx}/src/main/kotlin/graphics/Canvas.kt (100%) rename {core-ktx => ktx/core-ktx}/src/main/kotlin/view/Keyboard.kt (100%) rename {fragment-args-ktx => ktx/fragment-args-ktx}/CHANGELOG.md (100%) rename {fragment-args-ktx => ktx/fragment-args-ktx}/README.md (94%) rename {fragment-args-ktx => ktx/fragment-args-ktx}/build.gradle.kts (100%) rename {fragment-args-ktx => ktx/fragment-args-ktx}/src/main/AndroidManifest.xml (100%) rename {fragment-args-ktx => ktx/fragment-args-ktx}/src/main/kotlin/FragmentArgsDelegates.kt (100%) rename {fragment-args-ktx => ktx/fragment-args-ktx}/src/main/kotlin/internal/Delegate.kt (100%) rename {fragment-ktx => ktx/fragment-ktx}/CHANGELOG.md (100%) rename {fragment-ktx => ktx/fragment-ktx}/README.md (86%) rename {fragment-ktx => ktx/fragment-ktx}/build.gradle.kts (100%) rename {fragment-ktx => ktx/fragment-ktx}/src/main/AndroidManifest.xml (100%) rename {fragment-ktx => ktx/fragment-ktx}/src/main/kotlin/OnBackPressedCallback.kt (100%) rename {lifecycle-livedata-ktx => ktx/lifecycle-livedata-ktx}/CHANGELOG.md (100%) rename {lifecycle-livedata-ktx => ktx/lifecycle-livedata-ktx}/README.md (96%) rename {lifecycle-livedata-ktx => ktx/lifecycle-livedata-ktx}/build.gradle.kts (100%) rename {lifecycle-livedata-ktx => ktx/lifecycle-livedata-ktx}/src/main/AndroidManifest.xml (100%) rename {lifecycle-livedata-ktx => ktx/lifecycle-livedata-ktx}/src/main/kotlin/EventQueue.kt (100%) rename {lifecycle-livedata-ktx => ktx/lifecycle-livedata-ktx}/src/main/kotlin/LiveData.kt (100%) rename {lifecycle-livedata-ktx => ktx/lifecycle-livedata-ktx}/src/main/kotlin/LiveDataAccessors.kt (100%) rename {lifecycle-livedata-ktx => ktx/lifecycle-livedata-ktx}/src/main/kotlin/Transformations.kt (100%) rename {lifecycle-livedata-ktx => ktx/lifecycle-livedata-ktx}/src/test/kotlin/EventQueueTest.kt (100%) rename {lifecycle-livedata-ktx => ktx/lifecycle-livedata-ktx}/src/test/kotlin/InstantExecutorExtension.kt (100%) rename {lifecycle-livedata-ktx => ktx/lifecycle-livedata-ktx}/src/test/kotlin/LiveDataAccessorsTest.kt (100%) rename {lifecycle-livedata-ktx => ktx/lifecycle-livedata-ktx}/src/test/kotlin/LiveDataTest.kt (100%) rename {lifecycle-livedata-ktx => ktx/lifecycle-livedata-ktx}/src/test/kotlin/TransformationsTest.kt (100%) rename {resources-ktx => ktx/resources-ktx}/CHANGELOG.md (100%) rename {resources-ktx => ktx/resources-ktx}/README.md (94%) rename {resources-ktx => ktx/resources-ktx}/build.gradle.kts (100%) rename {resources-ktx => ktx/resources-ktx}/src/main/AndroidManifest.xml (100%) rename {resources-ktx => ktx/resources-ktx}/src/main/kotlin/Attributes.kt (100%) rename {resources-ktx => ktx/resources-ktx}/src/main/kotlin/DimensionConverters.kt (100%) rename {resources-ktx => ktx/resources-ktx}/src/main/kotlin/DrawableWithTint.kt (100%) rename {resources-ktx => ktx/resources-ktx}/src/main/kotlin/FragmentResourcesAccessors.kt (100%) rename {resources-ktx => ktx/resources-ktx}/src/main/kotlin/ViewResourcesAccessors.kt (100%) rename {viewbinding-ktx => ktx/viewbinding-ktx}/CHANGELOG.md (100%) rename {viewbinding-ktx => ktx/viewbinding-ktx}/README.md (97%) rename {viewbinding-ktx => ktx/viewbinding-ktx}/build.gradle.kts (100%) rename {viewbinding-ktx => ktx/viewbinding-ktx}/src/main/AndroidManifest.xml (100%) rename {viewbinding-ktx => ktx/viewbinding-ktx}/src/main/kotlin/ViewBinding.kt (100%) rename {viewbinding-ktx => ktx/viewbinding-ktx}/src/main/kotlin/ViewBindingDelegate.kt (100%) rename {viewbinding-ktx => ktx/viewbinding-ktx}/viewbinding.pro (100%) diff --git a/README.md b/ktx/README.md similarity index 95% rename from README.md rename to ktx/README.md index 23d7cad..8ffe513 100644 --- a/README.md +++ b/ktx/README.md @@ -1,5 +1,6 @@ # Redmadrobot Android KTX - [![Build Status](https://img.shields.io/github/workflow/status/RedMadRobot/redmadrobot-android-ktx/CI/main?style=flat-square)][ci] [![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] + [![Build Status](https://img.shields.io/github/workflow/status/RedMadRobot/redmadrobot-android-ktx/CI/main?style=flat-square)][ci] + [![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] Missing Android KTX extensions. @@ -59,4 +60,4 @@ For major changes, please open a [discussion][discussions] first to discuss what [viewbinding-ktx]: viewbinding-ktx [ci]: https://github.com/RedMadRobot/redmadrobot-android-ktx/actions [discussions]: https://github.com/RedMadRobot/redmadrobot-android-ktx/discussions -[license]: LICENSE +[license]: ../LICENSE diff --git a/core-ktx/CHANGELOG.md b/ktx/core-ktx/CHANGELOG.md similarity index 100% rename from core-ktx/CHANGELOG.md rename to ktx/core-ktx/CHANGELOG.md diff --git a/core-ktx/README.md b/ktx/core-ktx/README.md similarity index 94% rename from core-ktx/README.md rename to ktx/core-ktx/README.md index a91a274..fdf4b8e 100644 --- a/core-ktx/README.md +++ b/ktx/core-ktx/README.md @@ -1,5 +1,6 @@ # core-ktx -[![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/core-ktx?style=flat-square)][mavenCentral] [![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] +[![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/core-ktx?style=flat-square)][mavenCentral] +[![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] Kotlin extensions in addition to androidx core-ktx. @@ -117,4 +118,4 @@ Merge requests are welcome. For major changes, please open an issue first to discuss what you would like to change. [mavenCentral]: https://search.maven.org/artifact/com.redmadrobot.extensions/core-ktx -[license]: ../LICENSE +[license]: ../../LICENSE diff --git a/core-ktx/build.gradle.kts b/ktx/core-ktx/build.gradle.kts similarity index 100% rename from core-ktx/build.gradle.kts rename to ktx/core-ktx/build.gradle.kts diff --git a/core-ktx/src/main/AndroidManifest.xml b/ktx/core-ktx/src/main/AndroidManifest.xml similarity index 100% rename from core-ktx/src/main/AndroidManifest.xml rename to ktx/core-ktx/src/main/AndroidManifest.xml diff --git a/core-ktx/src/main/kotlin/Context.kt b/ktx/core-ktx/src/main/kotlin/Context.kt similarity index 100% rename from core-ktx/src/main/kotlin/Context.kt rename to ktx/core-ktx/src/main/kotlin/Context.kt diff --git a/core-ktx/src/main/kotlin/content/SharedPreferences.kt b/ktx/core-ktx/src/main/kotlin/content/SharedPreferences.kt similarity index 100% rename from core-ktx/src/main/kotlin/content/SharedPreferences.kt rename to ktx/core-ktx/src/main/kotlin/content/SharedPreferences.kt diff --git a/core-ktx/src/main/kotlin/content/SharedPreferencesDelegates.kt b/ktx/core-ktx/src/main/kotlin/content/SharedPreferencesDelegates.kt similarity index 100% rename from core-ktx/src/main/kotlin/content/SharedPreferencesDelegates.kt rename to ktx/core-ktx/src/main/kotlin/content/SharedPreferencesDelegates.kt diff --git a/core-ktx/src/main/kotlin/graphics/Canvas.kt b/ktx/core-ktx/src/main/kotlin/graphics/Canvas.kt similarity index 100% rename from core-ktx/src/main/kotlin/graphics/Canvas.kt rename to ktx/core-ktx/src/main/kotlin/graphics/Canvas.kt diff --git a/core-ktx/src/main/kotlin/view/Keyboard.kt b/ktx/core-ktx/src/main/kotlin/view/Keyboard.kt similarity index 100% rename from core-ktx/src/main/kotlin/view/Keyboard.kt rename to ktx/core-ktx/src/main/kotlin/view/Keyboard.kt diff --git a/fragment-args-ktx/CHANGELOG.md b/ktx/fragment-args-ktx/CHANGELOG.md similarity index 100% rename from fragment-args-ktx/CHANGELOG.md rename to ktx/fragment-args-ktx/CHANGELOG.md diff --git a/fragment-args-ktx/README.md b/ktx/fragment-args-ktx/README.md similarity index 94% rename from fragment-args-ktx/README.md rename to ktx/fragment-args-ktx/README.md index cc5090c..0ce8e53 100644 --- a/fragment-args-ktx/README.md +++ b/ktx/fragment-args-ktx/README.md @@ -1,5 +1,6 @@ # fragment-args-ktx -[![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/fragment-args-ktx?style=flat-square)][mavenCentral] [![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] +[![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/fragment-args-ktx?style=flat-square)][mavenCentral] +[![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] Delegates for safe dealing with fragments' arguments. @@ -94,4 +95,4 @@ Merge requests are welcome. For major changes, please open an issue first to discuss what you would like to change. [mavenCentral]: https://search.maven.org/artifact/com.redmadrobot.extensions/fragment-args-ktx -[license]: ../LICENSE +[license]: ../../LICENSE diff --git a/fragment-args-ktx/build.gradle.kts b/ktx/fragment-args-ktx/build.gradle.kts similarity index 100% rename from fragment-args-ktx/build.gradle.kts rename to ktx/fragment-args-ktx/build.gradle.kts diff --git a/fragment-args-ktx/src/main/AndroidManifest.xml b/ktx/fragment-args-ktx/src/main/AndroidManifest.xml similarity index 100% rename from fragment-args-ktx/src/main/AndroidManifest.xml rename to ktx/fragment-args-ktx/src/main/AndroidManifest.xml diff --git a/fragment-args-ktx/src/main/kotlin/FragmentArgsDelegates.kt b/ktx/fragment-args-ktx/src/main/kotlin/FragmentArgsDelegates.kt similarity index 100% rename from fragment-args-ktx/src/main/kotlin/FragmentArgsDelegates.kt rename to ktx/fragment-args-ktx/src/main/kotlin/FragmentArgsDelegates.kt diff --git a/fragment-args-ktx/src/main/kotlin/internal/Delegate.kt b/ktx/fragment-args-ktx/src/main/kotlin/internal/Delegate.kt similarity index 100% rename from fragment-args-ktx/src/main/kotlin/internal/Delegate.kt rename to ktx/fragment-args-ktx/src/main/kotlin/internal/Delegate.kt diff --git a/fragment-ktx/CHANGELOG.md b/ktx/fragment-ktx/CHANGELOG.md similarity index 100% rename from fragment-ktx/CHANGELOG.md rename to ktx/fragment-ktx/CHANGELOG.md diff --git a/fragment-ktx/README.md b/ktx/fragment-ktx/README.md similarity index 86% rename from fragment-ktx/README.md rename to ktx/fragment-ktx/README.md index 3374c66..4410725 100644 --- a/fragment-ktx/README.md +++ b/ktx/fragment-ktx/README.md @@ -1,5 +1,6 @@ # fragment-ktx -[![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/fragment-ktx?style=flat-square)][mavenCentral] [![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] +[![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/fragment-ktx?style=flat-square)][mavenCentral] +[![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] A set of extensions in addition to androidx fragment-ktx. @@ -43,4 +44,4 @@ Merge requests are welcome. For major changes, please open an issue first to discuss what you would like to change. [mavenCentral]: https://search.maven.org/artifact/com.redmadrobot.extensions/fragment-ktx -[license]: ../LICENSE +[license]: ../../LICENSE diff --git a/fragment-ktx/build.gradle.kts b/ktx/fragment-ktx/build.gradle.kts similarity index 100% rename from fragment-ktx/build.gradle.kts rename to ktx/fragment-ktx/build.gradle.kts diff --git a/fragment-ktx/src/main/AndroidManifest.xml b/ktx/fragment-ktx/src/main/AndroidManifest.xml similarity index 100% rename from fragment-ktx/src/main/AndroidManifest.xml rename to ktx/fragment-ktx/src/main/AndroidManifest.xml diff --git a/fragment-ktx/src/main/kotlin/OnBackPressedCallback.kt b/ktx/fragment-ktx/src/main/kotlin/OnBackPressedCallback.kt similarity index 100% rename from fragment-ktx/src/main/kotlin/OnBackPressedCallback.kt rename to ktx/fragment-ktx/src/main/kotlin/OnBackPressedCallback.kt diff --git a/lifecycle-livedata-ktx/CHANGELOG.md b/ktx/lifecycle-livedata-ktx/CHANGELOG.md similarity index 100% rename from lifecycle-livedata-ktx/CHANGELOG.md rename to ktx/lifecycle-livedata-ktx/CHANGELOG.md diff --git a/lifecycle-livedata-ktx/README.md b/ktx/lifecycle-livedata-ktx/README.md similarity index 96% rename from lifecycle-livedata-ktx/README.md rename to ktx/lifecycle-livedata-ktx/README.md index e54081f..a67a786 100644 --- a/lifecycle-livedata-ktx/README.md +++ b/ktx/lifecycle-livedata-ktx/README.md @@ -1,5 +1,6 @@ # lifecycle-livedata-ktx -[![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/lifecycle-livedata-ktx?style=flat-square)][mavenCentral] [![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] +[![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/lifecycle-livedata-ktx?style=flat-square)][mavenCentral] +[![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] Extended set of extensions for dealing with `LiveData`. @@ -94,4 +95,4 @@ Merge requests are welcome. For major changes, please open an issue first to discuss what you would like to change. [mavenCentral]: https://search.maven.org/artifact/com.redmadrobot.extensions/lifecycle-livedata-ktx -[license]: ../LICENSE +[license]: ../../LICENSE diff --git a/lifecycle-livedata-ktx/build.gradle.kts b/ktx/lifecycle-livedata-ktx/build.gradle.kts similarity index 100% rename from lifecycle-livedata-ktx/build.gradle.kts rename to ktx/lifecycle-livedata-ktx/build.gradle.kts diff --git a/lifecycle-livedata-ktx/src/main/AndroidManifest.xml b/ktx/lifecycle-livedata-ktx/src/main/AndroidManifest.xml similarity index 100% rename from lifecycle-livedata-ktx/src/main/AndroidManifest.xml rename to ktx/lifecycle-livedata-ktx/src/main/AndroidManifest.xml diff --git a/lifecycle-livedata-ktx/src/main/kotlin/EventQueue.kt b/ktx/lifecycle-livedata-ktx/src/main/kotlin/EventQueue.kt similarity index 100% rename from lifecycle-livedata-ktx/src/main/kotlin/EventQueue.kt rename to ktx/lifecycle-livedata-ktx/src/main/kotlin/EventQueue.kt diff --git a/lifecycle-livedata-ktx/src/main/kotlin/LiveData.kt b/ktx/lifecycle-livedata-ktx/src/main/kotlin/LiveData.kt similarity index 100% rename from lifecycle-livedata-ktx/src/main/kotlin/LiveData.kt rename to ktx/lifecycle-livedata-ktx/src/main/kotlin/LiveData.kt diff --git a/lifecycle-livedata-ktx/src/main/kotlin/LiveDataAccessors.kt b/ktx/lifecycle-livedata-ktx/src/main/kotlin/LiveDataAccessors.kt similarity index 100% rename from lifecycle-livedata-ktx/src/main/kotlin/LiveDataAccessors.kt rename to ktx/lifecycle-livedata-ktx/src/main/kotlin/LiveDataAccessors.kt diff --git a/lifecycle-livedata-ktx/src/main/kotlin/Transformations.kt b/ktx/lifecycle-livedata-ktx/src/main/kotlin/Transformations.kt similarity index 100% rename from lifecycle-livedata-ktx/src/main/kotlin/Transformations.kt rename to ktx/lifecycle-livedata-ktx/src/main/kotlin/Transformations.kt diff --git a/lifecycle-livedata-ktx/src/test/kotlin/EventQueueTest.kt b/ktx/lifecycle-livedata-ktx/src/test/kotlin/EventQueueTest.kt similarity index 100% rename from lifecycle-livedata-ktx/src/test/kotlin/EventQueueTest.kt rename to ktx/lifecycle-livedata-ktx/src/test/kotlin/EventQueueTest.kt diff --git a/lifecycle-livedata-ktx/src/test/kotlin/InstantExecutorExtension.kt b/ktx/lifecycle-livedata-ktx/src/test/kotlin/InstantExecutorExtension.kt similarity index 100% rename from lifecycle-livedata-ktx/src/test/kotlin/InstantExecutorExtension.kt rename to ktx/lifecycle-livedata-ktx/src/test/kotlin/InstantExecutorExtension.kt diff --git a/lifecycle-livedata-ktx/src/test/kotlin/LiveDataAccessorsTest.kt b/ktx/lifecycle-livedata-ktx/src/test/kotlin/LiveDataAccessorsTest.kt similarity index 100% rename from lifecycle-livedata-ktx/src/test/kotlin/LiveDataAccessorsTest.kt rename to ktx/lifecycle-livedata-ktx/src/test/kotlin/LiveDataAccessorsTest.kt diff --git a/lifecycle-livedata-ktx/src/test/kotlin/LiveDataTest.kt b/ktx/lifecycle-livedata-ktx/src/test/kotlin/LiveDataTest.kt similarity index 100% rename from lifecycle-livedata-ktx/src/test/kotlin/LiveDataTest.kt rename to ktx/lifecycle-livedata-ktx/src/test/kotlin/LiveDataTest.kt diff --git a/lifecycle-livedata-ktx/src/test/kotlin/TransformationsTest.kt b/ktx/lifecycle-livedata-ktx/src/test/kotlin/TransformationsTest.kt similarity index 100% rename from lifecycle-livedata-ktx/src/test/kotlin/TransformationsTest.kt rename to ktx/lifecycle-livedata-ktx/src/test/kotlin/TransformationsTest.kt diff --git a/resources-ktx/CHANGELOG.md b/ktx/resources-ktx/CHANGELOG.md similarity index 100% rename from resources-ktx/CHANGELOG.md rename to ktx/resources-ktx/CHANGELOG.md diff --git a/resources-ktx/README.md b/ktx/resources-ktx/README.md similarity index 94% rename from resources-ktx/README.md rename to ktx/resources-ktx/README.md index a2cee67..3e4fd09 100644 --- a/resources-ktx/README.md +++ b/ktx/resources-ktx/README.md @@ -1,5 +1,6 @@ # resources-ktx -[![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/resources-ktx?style=flat-square)][mavenCentral] [![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] +[![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/resources-ktx?style=flat-square)][mavenCentral] +[![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] A set of Kotlin extensions for accessing resources. @@ -86,4 +87,4 @@ Merge requests are welcome. For major changes, please open an issue first to discuss what you would like to change. [mavenCentral]: https://search.maven.org/artifact/com.redmadrobot.extensions/resources-ktx -[license]: ../LICENSE +[license]: ../../LICENSE diff --git a/resources-ktx/build.gradle.kts b/ktx/resources-ktx/build.gradle.kts similarity index 100% rename from resources-ktx/build.gradle.kts rename to ktx/resources-ktx/build.gradle.kts diff --git a/resources-ktx/src/main/AndroidManifest.xml b/ktx/resources-ktx/src/main/AndroidManifest.xml similarity index 100% rename from resources-ktx/src/main/AndroidManifest.xml rename to ktx/resources-ktx/src/main/AndroidManifest.xml diff --git a/resources-ktx/src/main/kotlin/Attributes.kt b/ktx/resources-ktx/src/main/kotlin/Attributes.kt similarity index 100% rename from resources-ktx/src/main/kotlin/Attributes.kt rename to ktx/resources-ktx/src/main/kotlin/Attributes.kt diff --git a/resources-ktx/src/main/kotlin/DimensionConverters.kt b/ktx/resources-ktx/src/main/kotlin/DimensionConverters.kt similarity index 100% rename from resources-ktx/src/main/kotlin/DimensionConverters.kt rename to ktx/resources-ktx/src/main/kotlin/DimensionConverters.kt diff --git a/resources-ktx/src/main/kotlin/DrawableWithTint.kt b/ktx/resources-ktx/src/main/kotlin/DrawableWithTint.kt similarity index 100% rename from resources-ktx/src/main/kotlin/DrawableWithTint.kt rename to ktx/resources-ktx/src/main/kotlin/DrawableWithTint.kt diff --git a/resources-ktx/src/main/kotlin/FragmentResourcesAccessors.kt b/ktx/resources-ktx/src/main/kotlin/FragmentResourcesAccessors.kt similarity index 100% rename from resources-ktx/src/main/kotlin/FragmentResourcesAccessors.kt rename to ktx/resources-ktx/src/main/kotlin/FragmentResourcesAccessors.kt diff --git a/resources-ktx/src/main/kotlin/ViewResourcesAccessors.kt b/ktx/resources-ktx/src/main/kotlin/ViewResourcesAccessors.kt similarity index 100% rename from resources-ktx/src/main/kotlin/ViewResourcesAccessors.kt rename to ktx/resources-ktx/src/main/kotlin/ViewResourcesAccessors.kt diff --git a/viewbinding-ktx/CHANGELOG.md b/ktx/viewbinding-ktx/CHANGELOG.md similarity index 100% rename from viewbinding-ktx/CHANGELOG.md rename to ktx/viewbinding-ktx/CHANGELOG.md diff --git a/viewbinding-ktx/README.md b/ktx/viewbinding-ktx/README.md similarity index 97% rename from viewbinding-ktx/README.md rename to ktx/viewbinding-ktx/README.md index 27b82d8..d917bd6 100644 --- a/viewbinding-ktx/README.md +++ b/ktx/viewbinding-ktx/README.md @@ -1,5 +1,6 @@ # viewbinding-ktx -[![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/viewbinding-ktx?style=flat-square)][mavenCentral] [![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] +[![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/viewbinding-ktx?style=flat-square)][mavenCentral] +[![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] A set of Kotlin extensions for dealing with ViewBinding. @@ -133,4 +134,4 @@ Merge requests are welcome. For major changes, please open an issue first to discuss what you would like to change. [mavenCentral]: https://search.maven.org/artifact/com.redmadrobot.extensions/viewbinding-ktx -[license]: ../LICENSE +[license]: ../../LICENSE diff --git a/viewbinding-ktx/build.gradle.kts b/ktx/viewbinding-ktx/build.gradle.kts similarity index 100% rename from viewbinding-ktx/build.gradle.kts rename to ktx/viewbinding-ktx/build.gradle.kts diff --git a/viewbinding-ktx/src/main/AndroidManifest.xml b/ktx/viewbinding-ktx/src/main/AndroidManifest.xml similarity index 100% rename from viewbinding-ktx/src/main/AndroidManifest.xml rename to ktx/viewbinding-ktx/src/main/AndroidManifest.xml diff --git a/viewbinding-ktx/src/main/kotlin/ViewBinding.kt b/ktx/viewbinding-ktx/src/main/kotlin/ViewBinding.kt similarity index 100% rename from viewbinding-ktx/src/main/kotlin/ViewBinding.kt rename to ktx/viewbinding-ktx/src/main/kotlin/ViewBinding.kt diff --git a/viewbinding-ktx/src/main/kotlin/ViewBindingDelegate.kt b/ktx/viewbinding-ktx/src/main/kotlin/ViewBindingDelegate.kt similarity index 100% rename from viewbinding-ktx/src/main/kotlin/ViewBindingDelegate.kt rename to ktx/viewbinding-ktx/src/main/kotlin/ViewBindingDelegate.kt diff --git a/viewbinding-ktx/viewbinding.pro b/ktx/viewbinding-ktx/viewbinding.pro similarity index 100% rename from viewbinding-ktx/viewbinding.pro rename to ktx/viewbinding-ktx/viewbinding.pro diff --git a/settings.gradle.kts b/settings.gradle.kts index fe8f7ec..ea870e8 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -25,13 +25,13 @@ dependencyResolutionManagement { } } -rootProject.name = "ktx" +rootProject.name = "gears" include( - "core-ktx", - "fragment-ktx", - "fragment-args-ktx", - "lifecycle-livedata-ktx", - "resources-ktx", - "viewbinding-ktx", + ":ktx:core-ktx", + ":ktx:fragment-ktx", + ":ktx:fragment-args-ktx", + ":ktx:lifecycle-livedata-ktx", + ":ktx:resources-ktx", + ":ktx:viewbinding-ktx", ) From e8c3eb294fd561a4ce83fc09911c04c35a5056ce Mon Sep 17 00:00:00 2001 From: Osip Fatkullin Date: Fri, 17 May 2024 15:49:13 +0200 Subject: [PATCH 2/7] feat: redmadrobot-android-ktx -> gears-android --- buildSrc/src/main/kotlin/convention.publishing.gradle.kts | 4 ++-- ktx/README.md | 8 ++++---- ktx/core-ktx/CHANGELOG.md | 8 ++++---- ktx/core-ktx/README.md | 4 ++-- ktx/fragment-args-ktx/CHANGELOG.md | 6 +++--- ktx/fragment-args-ktx/README.md | 4 ++-- ktx/fragment-ktx/CHANGELOG.md | 4 ++-- ktx/fragment-ktx/README.md | 4 ++-- ktx/lifecycle-livedata-ktx/CHANGELOG.md | 2 +- ktx/lifecycle-livedata-ktx/README.md | 4 ++-- ktx/resources-ktx/CHANGELOG.md | 4 ++-- ktx/resources-ktx/README.md | 4 ++-- ktx/viewbinding-ktx/CHANGELOG.md | 2 +- ktx/viewbinding-ktx/README.md | 4 ++-- 14 files changed, 31 insertions(+), 31 deletions(-) diff --git a/buildSrc/src/main/kotlin/convention.publishing.gradle.kts b/buildSrc/src/main/kotlin/convention.publishing.gradle.kts index edfdcc4..03d9187 100644 --- a/buildSrc/src/main/kotlin/convention.publishing.gradle.kts +++ b/buildSrc/src/main/kotlin/convention.publishing.gradle.kts @@ -11,7 +11,7 @@ redmadrobot { publishing { signArtifacts = !isRunningOnCi pom { - setGitHubProject("RedMadRobot/redmadrobot-android-ktx") + setGitHubProject("RedMadRobot/gears-android") licenses { mit() @@ -27,7 +27,7 @@ redmadrobot { publishing { repositories { - if (isRunningOnCi) githubPackages("RedMadRobot/redmadrobot-android-ktx") + if (isRunningOnCi) githubPackages("RedMadRobot/gears-android") if (isReleaseVersion && credentialsExist("ossrh")) ossrh() } } diff --git a/ktx/README.md b/ktx/README.md index 8ffe513..acf4c3d 100644 --- a/ktx/README.md +++ b/ktx/README.md @@ -1,6 +1,6 @@ # Redmadrobot Android KTX - [![Build Status](https://img.shields.io/github/workflow/status/RedMadRobot/redmadrobot-android-ktx/CI/main?style=flat-square)][ci] - [![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] + [![Build Status](https://img.shields.io/github/workflow/status/RedMadRobot/gears-android/CI/main?style=flat-square)][ci] + [![License](https://img.shields.io/github/license/RedMadRobot/gears-android?style=flat-square)][license] Missing Android KTX extensions. @@ -58,6 +58,6 @@ For major changes, please open a [discussion][discussions] first to discuss what [lifecycle-livedata-ktx]: lifecycle-livedata-ktx [resources-ktx]: resources-ktx [viewbinding-ktx]: viewbinding-ktx -[ci]: https://github.com/RedMadRobot/redmadrobot-android-ktx/actions -[discussions]: https://github.com/RedMadRobot/redmadrobot-android-ktx/discussions +[ci]: https://github.com/RedMadRobot/gears-android/actions +[discussions]: https://github.com/RedMadRobot/gears-android/discussions [license]: ../LICENSE diff --git a/ktx/core-ktx/CHANGELOG.md b/ktx/core-ktx/CHANGELOG.md index 6221b8c..7042078 100644 --- a/ktx/core-ktx/CHANGELOG.md +++ b/ktx/core-ktx/CHANGELOG.md @@ -53,7 +53,7 @@ First release -[1.6.0-2]: https://github.com/RedMadRobot/redmadrobot-android-ktx/compare/core-ktx-v1.6.0-1...ec4d0fb8 -[1.6.0-1]: https://github.com/RedMadRobot/redmadrobot-android-ktx/compare/resources-ktx-v1.3.1-0...core-ktx-v1.6.0-1 -[1.6.0-0]: https://github.com/RedMadRobot/redmadrobot-android-ktx/compare/viewbinding-ktx-v4.2.1-0...core-ktx-v1.6.0-0 -[1.5.0-0]: https://github.com/RedMadRobot/redmadrobot-android-ktx/compare/e6b11af4...core-ktx-v1.5.0-0 +[1.6.0-2]: https://github.com/RedMadRobot/gears-android/compare/core-ktx-v1.6.0-1...ec4d0fb8 +[1.6.0-1]: https://github.com/RedMadRobot/gears-android/compare/resources-ktx-v1.3.1-0...core-ktx-v1.6.0-1 +[1.6.0-0]: https://github.com/RedMadRobot/gears-android/compare/viewbinding-ktx-v4.2.1-0...core-ktx-v1.6.0-0 +[1.5.0-0]: https://github.com/RedMadRobot/gears-android/compare/e6b11af4...core-ktx-v1.5.0-0 diff --git a/ktx/core-ktx/README.md b/ktx/core-ktx/README.md index fdf4b8e..ac65eaa 100644 --- a/ktx/core-ktx/README.md +++ b/ktx/core-ktx/README.md @@ -1,6 +1,6 @@ -# core-ktx +# core-ktx [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/core-ktx?style=flat-square)][mavenCentral] -[![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] +[![License](https://img.shields.io/github/license/RedMadRobot/gears-android?style=flat-square)][license] Kotlin extensions in addition to androidx core-ktx. diff --git a/ktx/fragment-args-ktx/CHANGELOG.md b/ktx/fragment-args-ktx/CHANGELOG.md index 940692c..3dc0052 100644 --- a/ktx/fragment-args-ktx/CHANGELOG.md +++ b/ktx/fragment-args-ktx/CHANGELOG.md @@ -50,6 +50,6 @@ First release -[1.3.6-1]: https://github.com/RedMadRobot/redmadrobot-android-ktx/compare/ec4d0fb8...fragment-args-ktx-v1.3.6-1 -[1.3.6-0]: https://github.com/RedMadRobot/redmadrobot-android-ktx/compare/fe55b501...fragment-args-ktx-v1.3.6-0 -[1.3.5-0]: https://github.com/RedMadRobot/redmadrobot-android-ktx/compare/core-ktx-v1.5.0-0...fragment-args-ktx-v1.3.5-0 +[1.3.6-1]: https://github.com/RedMadRobot/gears-android/compare/ec4d0fb8...fragment-args-ktx-v1.3.6-1 +[1.3.6-0]: https://github.com/RedMadRobot/gears-android/compare/fe55b501...fragment-args-ktx-v1.3.6-0 +[1.3.5-0]: https://github.com/RedMadRobot/gears-android/compare/core-ktx-v1.5.0-0...fragment-args-ktx-v1.3.5-0 diff --git a/ktx/fragment-args-ktx/README.md b/ktx/fragment-args-ktx/README.md index 0ce8e53..2c92858 100644 --- a/ktx/fragment-args-ktx/README.md +++ b/ktx/fragment-args-ktx/README.md @@ -1,6 +1,6 @@ -# fragment-args-ktx +# fragment-args-ktx [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/fragment-args-ktx?style=flat-square)][mavenCentral] -[![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] +[![License](https://img.shields.io/github/license/RedMadRobot/gears-android?style=flat-square)][license] Delegates for safe dealing with fragments' arguments. diff --git a/ktx/fragment-ktx/CHANGELOG.md b/ktx/fragment-ktx/CHANGELOG.md index e4c1405..50a7ac0 100644 --- a/ktx/fragment-ktx/CHANGELOG.md +++ b/ktx/fragment-ktx/CHANGELOG.md @@ -13,5 +13,5 @@ First release -[1.3.6-0]: https://github.com/RedMadRobot/redmadrobot-android-ktx/compare/fragment-args-ktx-v1.3.6-0...fragment-ktx-v1.3.6-0 -[1.3.5-0]: https://github.com/RedMadRobot/redmadrobot-android-ktx/compare/fragment-args-ktx-v1.3.5-0...fragment-ktx-v1.3.5-0 +[1.3.6-0]: https://github.com/RedMadRobot/gears-android/compare/fragment-args-ktx-v1.3.6-0...fragment-ktx-v1.3.6-0 +[1.3.5-0]: https://github.com/RedMadRobot/gears-android/compare/fragment-args-ktx-v1.3.5-0...fragment-ktx-v1.3.5-0 diff --git a/ktx/fragment-ktx/README.md b/ktx/fragment-ktx/README.md index 4410725..e8e0996 100644 --- a/ktx/fragment-ktx/README.md +++ b/ktx/fragment-ktx/README.md @@ -1,6 +1,6 @@ -# fragment-ktx +# fragment-ktx [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/fragment-ktx?style=flat-square)][mavenCentral] -[![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] +[![License](https://img.shields.io/github/license/RedMadRobot/gears-android?style=flat-square)][license] A set of extensions in addition to androidx fragment-ktx. diff --git a/ktx/lifecycle-livedata-ktx/CHANGELOG.md b/ktx/lifecycle-livedata-ktx/CHANGELOG.md index 0b20470..e58aeb9 100644 --- a/ktx/lifecycle-livedata-ktx/CHANGELOG.md +++ b/ktx/lifecycle-livedata-ktx/CHANGELOG.md @@ -38,4 +38,4 @@ First release -[2.3.1-0]: https://github.com/RedMadRobot/redmadrobot-android-ktx/compare/fragment-ktx-v1.3.5-0...lifecycle-livedata-ktx-v2.3.1-0 +[2.3.1-0]: https://github.com/RedMadRobot/gears-android/compare/fragment-ktx-v1.3.5-0...lifecycle-livedata-ktx-v2.3.1-0 diff --git a/ktx/lifecycle-livedata-ktx/README.md b/ktx/lifecycle-livedata-ktx/README.md index a67a786..37df189 100644 --- a/ktx/lifecycle-livedata-ktx/README.md +++ b/ktx/lifecycle-livedata-ktx/README.md @@ -1,6 +1,6 @@ -# lifecycle-livedata-ktx +# lifecycle-livedata-ktx [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/lifecycle-livedata-ktx?style=flat-square)][mavenCentral] -[![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] +[![License](https://img.shields.io/github/license/RedMadRobot/gears-android?style=flat-square)][license] Extended set of extensions for dealing with `LiveData`. diff --git a/ktx/resources-ktx/CHANGELOG.md b/ktx/resources-ktx/CHANGELOG.md index 4bb1864..9dd5601 100644 --- a/ktx/resources-ktx/CHANGELOG.md +++ b/ktx/resources-ktx/CHANGELOG.md @@ -53,5 +53,5 @@ First release -[1.3.1-0]: https://github.com/RedMadRobot/redmadrobot-android-ktx/compare/fragment-ktx-v1.3.6-0...resources-ktx-v1.3.1-0 -[1.3.0-0]: https://github.com/RedMadRobot/redmadrobot-android-ktx/compare/lifecycle-livedata-ktx-v2.3.1-0...resources-ktx-v1.3.0-0 +[1.3.1-0]: https://github.com/RedMadRobot/gears-android/compare/fragment-ktx-v1.3.6-0...resources-ktx-v1.3.1-0 +[1.3.0-0]: https://github.com/RedMadRobot/gears-android/compare/lifecycle-livedata-ktx-v2.3.1-0...resources-ktx-v1.3.0-0 diff --git a/ktx/resources-ktx/README.md b/ktx/resources-ktx/README.md index 3e4fd09..3a2286e 100644 --- a/ktx/resources-ktx/README.md +++ b/ktx/resources-ktx/README.md @@ -1,6 +1,6 @@ -# resources-ktx +# resources-ktx [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/resources-ktx?style=flat-square)][mavenCentral] -[![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] +[![License](https://img.shields.io/github/license/RedMadRobot/gears-android?style=flat-square)][license] A set of Kotlin extensions for accessing resources. diff --git a/ktx/viewbinding-ktx/CHANGELOG.md b/ktx/viewbinding-ktx/CHANGELOG.md index 4ae4217..b0609f9 100644 --- a/ktx/viewbinding-ktx/CHANGELOG.md +++ b/ktx/viewbinding-ktx/CHANGELOG.md @@ -39,4 +39,4 @@ First release -[4.2.1-0]: https://github.com/RedMadRobot/redmadrobot-android-ktx/compare/resources-ktx-v1.3.0-0...viewbinding-ktx-v4.2.1-0 +[4.2.1-0]: https://github.com/RedMadRobot/gears-android/compare/resources-ktx-v1.3.0-0...viewbinding-ktx-v4.2.1-0 diff --git a/ktx/viewbinding-ktx/README.md b/ktx/viewbinding-ktx/README.md index d917bd6..743e51f 100644 --- a/ktx/viewbinding-ktx/README.md +++ b/ktx/viewbinding-ktx/README.md @@ -1,6 +1,6 @@ -# viewbinding-ktx +# viewbinding-ktx [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/viewbinding-ktx?style=flat-square)][mavenCentral] -[![License](https://img.shields.io/github/license/RedMadRobot/redmadrobot-android-ktx?style=flat-square)][license] +[![License](https://img.shields.io/github/license/RedMadRobot/gears-android?style=flat-square)][license] A set of Kotlin extensions for dealing with ViewBinding. From 272bcd525780ea5c43f790e5aa374aca45f2df8e Mon Sep 17 00:00:00 2001 From: Osip Fatkullin Date: Fri, 17 May 2024 15:50:31 +0200 Subject: [PATCH 3/7] build: Move KTX-specific build logic into its own build script plugin --- .../src/main/kotlin/convention.library.ktx.gradle.kts | 11 +++++++++++ .../src/main/kotlin/convention.publishing.gradle.kts | 10 +--------- ktx/build.gradle.kts | 3 +++ ktx/core-ktx/build.gradle.kts | 2 +- ktx/fragment-args-ktx/build.gradle.kts | 2 +- ktx/fragment-ktx/build.gradle.kts | 2 +- ktx/gradle.properties | 1 + ktx/lifecycle-livedata-ktx/build.gradle.kts | 2 +- ktx/resources-ktx/build.gradle.kts | 2 +- ktx/viewbinding-ktx/build.gradle.kts | 2 +- 10 files changed, 22 insertions(+), 15 deletions(-) create mode 100644 buildSrc/src/main/kotlin/convention.library.ktx.gradle.kts create mode 100644 ktx/build.gradle.kts create mode 100644 ktx/gradle.properties diff --git a/buildSrc/src/main/kotlin/convention.library.ktx.gradle.kts b/buildSrc/src/main/kotlin/convention.library.ktx.gradle.kts new file mode 100644 index 0000000..b99182f --- /dev/null +++ b/buildSrc/src/main/kotlin/convention.library.ktx.gradle.kts @@ -0,0 +1,11 @@ +import com.redmadrobot.build.dsl.kotlinCompile + +plugins { + id("convention.library.android") +} + +kotlinCompile { + kotlinOptions { + moduleName = "redmadrobot.${project.name}" + } +} diff --git a/buildSrc/src/main/kotlin/convention.publishing.gradle.kts b/buildSrc/src/main/kotlin/convention.publishing.gradle.kts index 03d9187..5c0bcd6 100644 --- a/buildSrc/src/main/kotlin/convention.publishing.gradle.kts +++ b/buildSrc/src/main/kotlin/convention.publishing.gradle.kts @@ -5,8 +5,6 @@ plugins { id("com.redmadrobot.publish") } -group = "com.redmadrobot.extensions" - redmadrobot { publishing { signArtifacts = !isRunningOnCi @@ -19,7 +17,7 @@ redmadrobot { developers { developer(id = "osipxd", name = "Osip Fatkullin", email = "o.fatkullin@redmadrobot.com") - developer(id = "sonulen", name = "Andrey Tolmachev", email = "sonulen@gmail.com") + developer(id = "sonulen", name = "Andrey Tolmachev", email = "a.tolmachev@redmadrobot.com") } } } @@ -31,9 +29,3 @@ publishing { if (isReleaseVersion && credentialsExist("ossrh")) ossrh() } } - -kotlinCompile { - kotlinOptions { - moduleName = "redmadrobot.${project.name}" - } -} diff --git a/ktx/build.gradle.kts b/ktx/build.gradle.kts new file mode 100644 index 0000000..182e20b --- /dev/null +++ b/ktx/build.gradle.kts @@ -0,0 +1,3 @@ +// For some reason gradle.properties in this project doesn't affect its subprojects +val ktxGroup = group +subprojects { group = ktxGroup } diff --git a/ktx/core-ktx/build.gradle.kts b/ktx/core-ktx/build.gradle.kts index 0092bb9..a9202af 100644 --- a/ktx/core-ktx/build.gradle.kts +++ b/ktx/core-ktx/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - convention.library.android + convention.library.ktx } version = "1.6.0-2" diff --git a/ktx/fragment-args-ktx/build.gradle.kts b/ktx/fragment-args-ktx/build.gradle.kts index 3f2ef24..8e6434f 100644 --- a/ktx/fragment-args-ktx/build.gradle.kts +++ b/ktx/fragment-args-ktx/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - convention.library.android + convention.library.ktx } version = "1.3.6-1" diff --git a/ktx/fragment-ktx/build.gradle.kts b/ktx/fragment-ktx/build.gradle.kts index 42a61f8..a180a27 100644 --- a/ktx/fragment-ktx/build.gradle.kts +++ b/ktx/fragment-ktx/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - convention.library.android + convention.library.ktx } version = "1.3.6-0" diff --git a/ktx/gradle.properties b/ktx/gradle.properties new file mode 100644 index 0000000..baf39c3 --- /dev/null +++ b/ktx/gradle.properties @@ -0,0 +1 @@ +group=com.redmadrobot.extensions diff --git a/ktx/lifecycle-livedata-ktx/build.gradle.kts b/ktx/lifecycle-livedata-ktx/build.gradle.kts index cf9f374..5628930 100644 --- a/ktx/lifecycle-livedata-ktx/build.gradle.kts +++ b/ktx/lifecycle-livedata-ktx/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - convention.library.android + convention.library.ktx } version = "2.3.1-0" diff --git a/ktx/resources-ktx/build.gradle.kts b/ktx/resources-ktx/build.gradle.kts index d9df9ad..0cd8470 100644 --- a/ktx/resources-ktx/build.gradle.kts +++ b/ktx/resources-ktx/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - convention.library.android + convention.library.ktx id("kotlin-parcelize") } diff --git a/ktx/viewbinding-ktx/build.gradle.kts b/ktx/viewbinding-ktx/build.gradle.kts index 4cf521d..1313438 100644 --- a/ktx/viewbinding-ktx/build.gradle.kts +++ b/ktx/viewbinding-ktx/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - convention.library.android + convention.library.ktx } version = "4.2.1-0" From 342e43e86c6d8dce3fb20f75b56d61c806e680d4 Mon Sep 17 00:00:00 2001 From: Osip Fatkullin Date: Fri, 17 May 2024 17:22:28 +0200 Subject: [PATCH 4/7] docs: Add readme --- README.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++ ktx/README.md | 26 +++++++---------------- 2 files changed, 64 insertions(+), 19 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..c57c82e --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +# Gears :gear: + +[![Build Status](https://img.shields.io/github/actions/workflow/status/RedMadRobot/gears-android/main.yml?branch=main&style=flat-square)][ci] +[![License](https://img.shields.io/github/license/RedMadRobot/gears-android?style=flat-square)][license] + +**Gears** — small libraries used in red_mad_robot to build awesome Android applications. +Gears could be used together or alone. + +--- + + + +- [Libraries](#libraries) +- [Why Gears?](#why-gears) +- [Contribution](#contribution) +- [License](#license) + + + +## Libraries + +### :hammer_and_wrench: **[red_mad_robot Android KTX](ktx/)** + +- [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/core-ktx?style=flat-square&label=core-ktx)][core-ktx] - Extensions in addition to androidx core-ktx +- [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/fragment-ktx?style=flat-square&label=fragment-ktx)][fragment-ktx] - A set of extensions in addition to androidx fragment-ktx +- [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/fragment-args-ktx?style=flat-square&label=fragment-args-ktx)][fragment-args-ktx] - Delegates for safe dealing with fragments' arguments +- [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/lifecycle-livedata-ktx?style=flat-square&label=lifecycle-livedata-ktx)][lifecycle-livedata-ktx] - Extended set of extensions for dealing with `LiveData` +- [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/resources-ktx?style=flat-square&label=resources-ktx)][resources-ktx] - A set of extensions for accessing resources +- [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/viewbinding-ktx?style=flat-square&label=viewbinding-ktx)][viewbinding-ktx] - A set of extensions for dealing with ViewBinding + +## Why Gears? + +The goal of this monorepository is to simplify creation and publication of libraries. +These libraries, which we are calling "gears," are small but important parts of our tech stack that we want to share between our projects. + +Libraries may be initially developed here and then moved out from this repository as part of their lifecycle. +Large libraries or those with unique build infrastructure should be moved into a separate repository. + +## Contribution + +Merge requests are welcome. +For major changes, please open a [discussion][discussions] first to discuss what you would like to change. + +## License + +[MIT][license] + +[core-ktx]: ktx/core-ktx/ +[fragment-ktx]: ktx/fragment-ktx/ +[fragment-args-ktx]: ktx/fragment-args-ktx/ +[lifecycle-livedata-ktx]: ktx/lifecycle-livedata-ktx/ +[resources-ktx]: ktx/resources-ktx/ +[viewbinding-ktx]: ktx/viewbinding-ktx/ +[license]: LICENSE + +[ci]: https://github.com/RedMadRobot/gears-android/actions?query=branch%3Amain++ +[discussions]: https://github.com/RedMadRobot/gears-android/discussions diff --git a/ktx/README.md b/ktx/README.md index acf4c3d..70700ef 100644 --- a/ktx/README.md +++ b/ktx/README.md @@ -1,26 +1,25 @@ -# Redmadrobot Android KTX - [![Build Status](https://img.shields.io/github/workflow/status/RedMadRobot/gears-android/CI/main?style=flat-square)][ci] - [![License](https://img.shields.io/github/license/RedMadRobot/gears-android?style=flat-square)][license] +# red_mad_robot Android KTX + +[![License](https://img.shields.io/github/license/RedMadRobot/gears-android?style=flat-square)][license] Missing Android KTX extensions. -> :exclamation: It is not replacement of [Android KTX][ktx], it is just additional extensions and delegates that we found useful. +> [!IMPORTANT] +> It is not a replacement of [Android KTX][ktx], it is just additional extensions and delegates that we found useful. --- - - [Modules](#modules) - [Versioning](#versioning) -- [Contribution](#contribution) -- [License](#license) ## Modules -Module's pages contain README with detailed description of module. +> [!TIP] +> Click on a badge to open library documentation. - [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/core-ktx?style=flat-square&label=core-ktx)][core-ktx] - Extensions in addition to androidx core-ktx - [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.extensions/fragment-ktx?style=flat-square&label=fragment-ktx)][fragment-ktx] - A set of extensions in addition to androidx fragment-ktx @@ -41,15 +40,6 @@ com.redmadrobot.extensions:fragment-args-ktx:2.2.0-0 - `2.2.0` - version of `androidx.fragment:fragment` - `0` - version of extensions. First version of extensions for `fragment:2.2.0` -## Contribution - -Merge requests are welcome. -For major changes, please open a [discussion][discussions] first to discuss what you would like to change. - -## License - -[MIT][license] - [ktx]: https://developer.android.com/kotlin/ktx [core-ktx]: core-ktx @@ -58,6 +48,4 @@ For major changes, please open a [discussion][discussions] first to discuss what [lifecycle-livedata-ktx]: lifecycle-livedata-ktx [resources-ktx]: resources-ktx [viewbinding-ktx]: viewbinding-ktx -[ci]: https://github.com/RedMadRobot/gears-android/actions -[discussions]: https://github.com/RedMadRobot/gears-android/discussions [license]: ../LICENSE From 2d6bb75619574a3ef14c78f57c4ff7607ea70549 Mon Sep 17 00:00:00 2001 From: Osip Fatkullin Date: Fri, 17 May 2024 17:45:01 +0200 Subject: [PATCH 5/7] build: Android Gradle Plugin 8.4.0 --- gradle/libs.versions.toml | 4 ++-- ktx/core-ktx/build.gradle.kts | 4 ++++ ktx/core-ktx/src/main/AndroidManifest.xml | 1 - ktx/fragment-args-ktx/build.gradle.kts | 4 ++++ ktx/fragment-args-ktx/src/main/AndroidManifest.xml | 1 - ktx/fragment-ktx/build.gradle.kts | 4 ++++ ktx/fragment-ktx/src/main/AndroidManifest.xml | 1 - ktx/lifecycle-livedata-ktx/build.gradle.kts | 4 ++++ ktx/lifecycle-livedata-ktx/src/main/AndroidManifest.xml | 1 - ktx/resources-ktx/build.gradle.kts | 2 +- ktx/resources-ktx/src/main/AndroidManifest.xml | 1 - ktx/viewbinding-ktx/build.gradle.kts | 1 + ktx/viewbinding-ktx/src/main/AndroidManifest.xml | 1 - 13 files changed, 20 insertions(+), 9 deletions(-) delete mode 100644 ktx/core-ktx/src/main/AndroidManifest.xml delete mode 100644 ktx/fragment-args-ktx/src/main/AndroidManifest.xml delete mode 100644 ktx/fragment-ktx/src/main/AndroidManifest.xml delete mode 100644 ktx/lifecycle-livedata-ktx/src/main/AndroidManifest.xml delete mode 100644 ktx/resources-ktx/src/main/AndroidManifest.xml delete mode 100644 ktx/viewbinding-ktx/src/main/AndroidManifest.xml diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b65e4e1..b23be7a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,8 +1,8 @@ [versions] -androidGradlePlugin = "7.4.2" +androidGradlePlugin = "8.4.0" assertj-core = "3.25.1" androidx-arch-core = "2.2.0" -viewbinding = "8.3.2" +viewbinding = "8.4.0" [libraries] androidx-viewbinding = { module = "androidx.databinding:viewbinding", version.ref = "viewbinding" } diff --git a/ktx/core-ktx/build.gradle.kts b/ktx/core-ktx/build.gradle.kts index a9202af..7c24023 100644 --- a/ktx/core-ktx/build.gradle.kts +++ b/ktx/core-ktx/build.gradle.kts @@ -5,6 +5,10 @@ plugins { version = "1.6.0-2" description = "Kotlin extensions in addition to androidx core-ktx" +android { + namespace = "$group.core" +} + dependencies { api(kotlin("stdlib")) api(androidx.core) diff --git a/ktx/core-ktx/src/main/AndroidManifest.xml b/ktx/core-ktx/src/main/AndroidManifest.xml deleted file mode 100644 index e23a623..0000000 --- a/ktx/core-ktx/src/main/AndroidManifest.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ktx/fragment-args-ktx/build.gradle.kts b/ktx/fragment-args-ktx/build.gradle.kts index 8e6434f..81b29d7 100644 --- a/ktx/fragment-args-ktx/build.gradle.kts +++ b/ktx/fragment-args-ktx/build.gradle.kts @@ -5,6 +5,10 @@ plugins { version = "1.3.6-1" description = "Delegates for safe dealing with fragments' arguments" +android { + namespace = "$group.fragment.args" +} + dependencies { api(kotlin("stdlib")) api(androidx.fragment) diff --git a/ktx/fragment-args-ktx/src/main/AndroidManifest.xml b/ktx/fragment-args-ktx/src/main/AndroidManifest.xml deleted file mode 100644 index a98195a..0000000 --- a/ktx/fragment-args-ktx/src/main/AndroidManifest.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ktx/fragment-ktx/build.gradle.kts b/ktx/fragment-ktx/build.gradle.kts index a180a27..659b6a6 100644 --- a/ktx/fragment-ktx/build.gradle.kts +++ b/ktx/fragment-ktx/build.gradle.kts @@ -5,6 +5,10 @@ plugins { version = "1.3.6-0" description = "A set of extensions in addition to androidx fragment-ktx" +android { + namespace = "$group.lifecycle.livedata" +} + dependencies { api(kotlin("stdlib")) api(androidx.fragment) diff --git a/ktx/fragment-ktx/src/main/AndroidManifest.xml b/ktx/fragment-ktx/src/main/AndroidManifest.xml deleted file mode 100644 index dc00170..0000000 --- a/ktx/fragment-ktx/src/main/AndroidManifest.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ktx/lifecycle-livedata-ktx/build.gradle.kts b/ktx/lifecycle-livedata-ktx/build.gradle.kts index 5628930..75ddf13 100644 --- a/ktx/lifecycle-livedata-ktx/build.gradle.kts +++ b/ktx/lifecycle-livedata-ktx/build.gradle.kts @@ -5,6 +5,10 @@ plugins { version = "2.3.1-0" description = "Extended set of extensions for dealing with LiveData" +android { + namespace = "$group.lifecycle.livedata" +} + dependencies { api(kotlin("stdlib")) api(androidx.lifecycle.common) diff --git a/ktx/lifecycle-livedata-ktx/src/main/AndroidManifest.xml b/ktx/lifecycle-livedata-ktx/src/main/AndroidManifest.xml deleted file mode 100644 index 5da67ba..0000000 --- a/ktx/lifecycle-livedata-ktx/src/main/AndroidManifest.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ktx/resources-ktx/build.gradle.kts b/ktx/resources-ktx/build.gradle.kts index 0cd8470..7d0bcfa 100644 --- a/ktx/resources-ktx/build.gradle.kts +++ b/ktx/resources-ktx/build.gradle.kts @@ -7,7 +7,7 @@ version = "1.3.1-0" description = "A set of Kotlin extensions for accessing resources" android { - namespace = "com.redmadrobot.extensions.resources-ktx" + namespace = "$group.resources" } dependencies { diff --git a/ktx/resources-ktx/src/main/AndroidManifest.xml b/ktx/resources-ktx/src/main/AndroidManifest.xml deleted file mode 100644 index 238a801..0000000 --- a/ktx/resources-ktx/src/main/AndroidManifest.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ktx/viewbinding-ktx/build.gradle.kts b/ktx/viewbinding-ktx/build.gradle.kts index 1313438..c110657 100644 --- a/ktx/viewbinding-ktx/build.gradle.kts +++ b/ktx/viewbinding-ktx/build.gradle.kts @@ -6,6 +6,7 @@ version = "4.2.1-0" description = "A set of Kotlin extensions for dealing with ViewBinding" android { + namespace = "$group.viewbinding" defaultConfig.consumerProguardFile("viewbinding.pro") } diff --git a/ktx/viewbinding-ktx/src/main/AndroidManifest.xml b/ktx/viewbinding-ktx/src/main/AndroidManifest.xml deleted file mode 100644 index a5fa7a6..0000000 --- a/ktx/viewbinding-ktx/src/main/AndroidManifest.xml +++ /dev/null @@ -1 +0,0 @@ - From aa570e87e2c2f45c8bbc0008101c15d238526fad Mon Sep 17 00:00:00 2001 From: Osip Fatkullin Date: Fri, 17 May 2024 18:09:27 +0200 Subject: [PATCH 6/7] style: Update .editorconfig --- .editorconfig | 192 +++++++++++++++++++++++++++++++------------------- 1 file changed, 121 insertions(+), 71 deletions(-) diff --git a/.editorconfig b/.editorconfig index 6612cab..072ce38 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,62 +8,92 @@ indent_style = space insert_final_newline = true trim_trailing_whitespace = true max_line_length = 120 -ij_visual_guides = 100 +# Uncomment if you want to show non-strict recommended guideline +#ij_visual_guides = 100 -## General +# General ij_continuation_indent_size = 8 ij_smart_tabs = false ij_wrap_on_typing = false ij_any_keep_indents_on_empty_lines = false -## Formatter Control +# Formatter ij_formatter_tags_enabled = true ij_formatter_on_tag = @formatter:on ij_formatter_off_tag = @formatter:off -[{*.kt, *.kts}] -ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL -ij_continuation_indent_size = 4 # To match ktlint settings -ij_kotlin_keep_indents_on_empty_lines = false +[{*.kt,*.kts}] +# Tabs and Indents +# continuation_indent_size = 4 to match ktlint settings +ij_kotlin_continuation_indent_size = 4 +ij_kotlin_keep_indents_on_empty_lines = unset + +# Spaces +## Before parentheses +ij_kotlin_space_before_if_parentheses = true +ij_kotlin_space_before_for_parentheses = true +ij_kotlin_space_before_while_parentheses = true +ij_kotlin_space_before_catch_parentheses = true +ij_kotlin_space_before_when_parentheses = true +## Around operators +ij_kotlin_spaces_around_assignment_operators = true +ij_kotlin_spaces_around_logical_operators = true +ij_kotlin_spaces_around_equality_operators = true +ij_kotlin_spaces_around_relational_operators = true +ij_kotlin_spaces_around_additive_operators = true +ij_kotlin_spaces_around_multiplicative_operators = true +ij_kotlin_spaces_around_unary_operator = false +ij_kotlin_spaces_around_range = false +## Other +ij_kotlin_space_before_comma = false +ij_kotlin_space_after_comma = true +ij_kotlin_space_before_type_colon = false +ij_kotlin_space_after_type_colon = true +ij_kotlin_space_before_extend_colon = true +ij_kotlin_space_after_extend_colon = true +ij_kotlin_insert_whitespaces_in_simple_one_line_method = true +ij_kotlin_spaces_around_function_type_arrow = true +ij_kotlin_spaces_around_when_arrow = true +ij_kotlin_space_before_lambda_arrow = true -## Wrapping and Braces -# Keep when reformatting +# Wrapping and Braces +## Keep when reformatting ij_kotlin_keep_line_breaks = true ij_kotlin_keep_first_column_comment = true -# Extends/implements list +## Extends/implements list ij_kotlin_extends_list_wrap = normal ij_kotlin_align_multiline_extends_list = false ij_kotlin_continuation_indent_in_supertype_lists = false -# Function declaration parameters +## Function declaration parameters ij_kotlin_method_parameters_wrap = on_every_item ij_kotlin_align_multiline_parameters = true ij_kotlin_method_parameters_new_line_after_left_paren = true ij_kotlin_method_parameters_right_paren_on_new_line = true ij_kotlin_continuation_indent_in_parameter_lists = false -# Function call arguments +## Function call arguments ij_kotlin_call_parameters_wrap = on_every_item ij_kotlin_align_multiline_parameters_in_calls = false ij_kotlin_call_parameters_new_line_after_left_paren = true ij_kotlin_call_parameters_right_paren_on_new_line = true ij_kotlin_continuation_indent_in_argument_lists = false -# Function parentheses +## Function parentheses ij_kotlin_align_multiline_method_parentheses = false -# Chained function calls +## Chained function calls ij_kotlin_method_call_chain_wrap = normal ij_kotlin_wrap_first_method_in_call_chain = false ij_kotlin_continuation_indent_for_chained_calls = false -# 'if()' statement +## 'if()' statement ij_kotlin_else_on_new_line = false ij_kotlin_if_rparen_on_new_line = true ij_kotlin_continuation_indent_in_if_conditions = false -# 'do ... while()' statement +## 'do ... while()' statement ij_kotlin_while_on_new_line = false -# 'try' statement +## 'try' statement ij_kotlin_catch_on_new_line = false ij_kotlin_finally_on_new_line = false -# Binary expressions +## Binary expressions ij_kotlin_align_multiline_binary_operation = false -# Wraps +## Wraps ij_kotlin_assignment_wrap = normal ij_kotlin_enum_constants_wrap = off ij_kotlin_class_annotation_wrap = split_into_lines @@ -71,75 +101,66 @@ ij_kotlin_method_annotation_wrap = split_into_lines ij_kotlin_field_annotation_wrap = split_into_lines ij_kotlin_parameter_annotation_wrap = off ij_kotlin_variable_annotation_wrap = off -# 'when' statements +## 'when' statements ij_kotlin_align_in_columns_case_branch = false -# Braces placement +ij_kotlin_line_break_after_multiline_when_entry = true +## Braces placement ij_kotlin_lbrace_on_next_line = false -# Expression body functions +## Expression body functions ij_kotlin_wrap_expression_body_functions = 1 ij_kotlin_continuation_indent_for_expression_bodies = false -# Elvis expressions +## Elvis expressions ij_kotlin_wrap_elvis_expressions = 1 ij_kotlin_continuation_indent_in_elvis = false -## Spaces -# Before Parentheses -ij_kotlin_space_before_if_parentheses = true -ij_kotlin_space_before_for_parentheses = true -ij_kotlin_space_before_while_parentheses = true -ij_kotlin_space_before_catch_parentheses = true -ij_kotlin_space_before_when_parentheses = true -# Around Operators -ij_kotlin_spaces_around_assignment_operators = true -ij_kotlin_spaces_around_logical_operators = true -ij_kotlin_spaces_around_equality_operators = true -ij_kotlin_spaces_around_relational_operators = true -ij_kotlin_spaces_around_additive_operators = true -ij_kotlin_spaces_around_multiplicative_operators = true -ij_kotlin_spaces_around_unary_operator = false -ij_kotlin_spaces_around_range = false -# Other -ij_kotlin_space_before_comma = false -ij_kotlin_space_after_comma = true -ij_kotlin_space_before_type_colon = false -ij_kotlin_space_after_type_colon = true -ij_kotlin_space_after_extend_colon = true -ij_kotlin_space_before_extend_colon = true -ij_kotlin_insert_whitespaces_in_simple_one_line_method = true -ij_kotlin_spaces_around_function_type_arrow = true -ij_kotlin_spaces_around_when_arrow = true -ij_kotlin_space_before_lambda_arrow = true - -## Blank Lines -# Keep Maximum Blank Lines +# Blank Lines +## Keep maximum blank lines ij_kotlin_keep_blank_lines_in_declarations = 1 ij_kotlin_keep_blank_lines_in_code = 1 ij_kotlin_keep_blank_lines_before_right_brace = 0 -# Minimum Blank Lines +## Minimum blank lines ij_kotlin_blank_lines_after_class_header = 0 ij_kotlin_blank_lines_around_block_when_branches = 1 ij_kotlin_blank_lines_before_declaration_with_comment_or_annotation_on_separate_line = 1 -## Imports +# Imports ij_kotlin_name_count_to_use_star_import = 5 ij_kotlin_name_count_to_use_star_import_for_members = 3 ij_kotlin_import_nested_classes = false -ij_kotlin_packages_to_use_import_on_demand = java.util.*, kotlinx.android.synthetic.**, io.ktor.** -ij_kotlin_imports_layout = *, java.**, javax.**, kotlin.**, ^ +ij_kotlin_packages_to_use_import_on_demand = java.util.*,kotlinx.android.synthetic.**,io.ktor.** +ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^ -## Other +# Other +## Trailing comma ij_kotlin_allow_trailing_comma = true -ij_kotlin_allow_trailing_comma_on_call_site = true +ij_kotlin_allow_trailing_comma_on_call_site = false -## Code generation +# Code generation +## Comment code ij_kotlin_line_comment_at_first_column = true ij_kotlin_line_comment_add_space = false +ij_kotlin_line_comment_add_space_on_reformat = false ij_kotlin_block_comment_at_first_column = true +ij_kotlin_block_comment_add_space = false -[**/res/**.xml] -ij_continuation_indent_size = 4 +# Compose +ij_kotlin_use_custom_formatting_for_modifiers = true -## Other +# Load/Save +ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL + +[*.kts] +# Always use wildcard imports in scripts +ij_kotlin_name_count_to_use_star_import = 2 + +# EditorConfig can not set some of XML code style options. +# Remember to set default Android XML code style: Editor > Code Style > XML > Set from... -> Android +[{**/res/**.xml,**/AndroidManifest.xml}] +# Tabs and Indents +ij_xml_continuation_indent_size = 4 +ij_xml_keep_indents_on_empty_lines = unset + +# Other ij_xml_keep_line_breaks = false ij_xml_keep_line_breaks_in_text = true ij_xml_keep_blank_lines = 2 @@ -148,31 +169,60 @@ ij_xml_text_wrap = normal ij_xml_align_text = false ij_xml_align_attributes = false ij_xml_keep_whitespaces = false -# Spaces +## Spaces ij_xml_space_around_equals_in_attribute = false ij_xml_space_after_tag_name = false ij_xml_space_inside_empty_tag = true -# CDATA +## CDATA ij_xml_keep_whitespaces_around_cdata = preserve ij_xml_keep_whitespaces_inside_cdata = false -## Code Generation +# Code Generation ij_xml_line_comment_at_first_column = true ij_xml_block_comment_at_first_column = true +ij_xml_block_comment_add_space = false -## Android +# Android ij_xml_use_custom_settings = true [*.md] trim_trailing_whitespace = false -[{*.yaml, *.yml}] +# Wrapping and Braces +ij_markdown_wrap_text_if_long = false +ij_markdown_wrap_text_inside_blockquotes = false +## When reformatting +ij_markdown_keep_line_breaks_inside_text_blocks = true +ij_markdown_insert_quote_arrows_on_wrap = true +ij_markdown_format_tables = true + +# Tabs and Indents +ij_markdown_keep_indents_on_empty_lines = unset + +# Blank Lines +## Keep maximum blank lines +ij_markdown_max_lines_around_header = 1 +ij_markdown_max_lines_around_block_elements = 1 +ij_markdown_max_lines_between_paragraphs = 1 +## Minimum blank lines +ij_markdown_min_lines_around_header = 1 +ij_markdown_min_lines_around_block_elements = 1 +ij_markdown_min_lines_between_paragraphs = 1 + +# Spaces +## Force one space +ij_markdown_force_one_space_between_words = true +ij_markdown_force_one_space_after_header_symbol = true +ij_markdown_force_one_space_after_list_bullet = true +ij_markdown_force_one_space_after_blockquote_symbol = true + +[{*.yaml,*.yml}] indent_size = 2 -ij_yaml_spaces_within_brackets = false -ij_yaml_keep_indents_on_empty_lines = false +ij_yaml_keep_indents_on_empty_lines = unset ij_yaml_keep_line_breaks = true +ij_yaml_spaces_within_brackets = false -[{*.bash, *.sh, *.zsh}] +[{*.bash,*.sh,*.zsh}] indent_size = 2 tab_width = 2 From c8908b1b40950343a511078f8717f9fdee20ee66 Mon Sep 17 00:00:00 2001 From: Osip Fatkullin Date: Fri, 17 May 2024 18:13:33 +0200 Subject: [PATCH 7/7] ci: Update CI config --- .github/workflows/main.yml | 40 ++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3ac81a9..6ffbeb8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,52 +16,50 @@ jobs: steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Java - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: - java-version: 11 + distribution: 'temurin' + java-version: 17 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 - name: Run Check - uses: eskatos/gradle-command-action@v1 - with: - arguments: check -xlint - distributions-cache-enabled: true - dependencies-cache-enabled: true + run: ./gradlew check -xlint - name: Run Detekt - uses: eskatos/gradle-command-action@v1 - with: - arguments: detektAll detektReleaseAll + run: ./gradlew detektAll detektReleaseAll publish: - name: Publish + name: Publish KTX needs: check runs-on: ubuntu-latest if: ${{ startsWith(github.ref, 'refs/tags/') }} steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Java - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: - java-version: 11 + distribution: 'temurin' + java-version: 17 - name: Get module name from tag id: get-module-name run: | tag=${GITHUB_REF#refs/tags/} - echo "::set-output name=result::${tag/-v*}" + echo "result=${tag/-v*}" >> "$GITHUB_OUTPUT" + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 - name: Run Publish - uses: eskatos/gradle-command-action@v1 - with: - arguments: :${{ steps.get-module-name.outputs.result }}:publish - distributions-cache-enabled: true - dependencies-cache-enabled: true + run: ./gradlew :ktx:${{ steps.get-module-name.outputs.result }}:publish env: ORG_GRADLE_PROJECT_githubPackagesUsername: ${{ github.actor }} ORG_GRADLE_PROJECT_githubPackagesPassword: ${{ secrets.GITHUB_TOKEN }}