From 9f9bfd2f92341db0afe106562f926ec68d93d32a Mon Sep 17 00:00:00 2001 From: Paul Blundell Date: Mon, 11 Sep 2023 13:00:00 +0100 Subject: [PATCH 1/2] Add migration guide to README.md --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 3f356451..6a8b7242 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,15 @@ > **Note** > This repository is a fork of the [Twitter Jetpack Compose Rules](https://github.com/twitter/compose-rules) by its original maintainer. As none of the admins/maintainers continue working at the company, its development will continue here from now on. +> +> Migration Guide: +> 1) change coordinates (`com.twitter.compose.rules:detekt:$version` becomes `io.nlopez.compose.rules:detekt:$version`) +> 2) update $version to the latest, see: https://github.com/mrmans0n/compose-rules/releases +> 3) Update the config file (`detekt.yml`) so that the rule set name (`TwitterCompose` becomes `Compose`) +> 4) Done! + + +## Overview It can be challenging for big teams to start adopting Compose, particularly because not everyone will start at same time or with the same patterns. We tried to ease the pain by creating a set of Compose static checks. From 6c21dca568afc2f6ec84b2e37d4e031c12783b2a Mon Sep 17 00:00:00 2001 From: Nacho Lopez Date: Wed, 20 Sep 2023 22:56:24 +0200 Subject: [PATCH 2/2] Review changes --- README.md | 9 +-------- docs/index.md | 11 +++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6a8b7242..dca041f9 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,7 @@ ![build](https://github.com/mrmans0n/compose-rules/actions/workflows/build.yaml/badge.svg) ![Latest version](https://img.shields.io/maven-central/v/io.nlopez.compose.rules/common) > **Note** -> This repository is a fork of the [Twitter Jetpack Compose Rules](https://github.com/twitter/compose-rules) by its original maintainer. As none of the admins/maintainers continue working at the company, its development will continue here from now on. -> -> Migration Guide: -> 1) change coordinates (`com.twitter.compose.rules:detekt:$version` becomes `io.nlopez.compose.rules:detekt:$version`) -> 2) update $version to the latest, see: https://github.com/mrmans0n/compose-rules/releases -> 3) Update the config file (`detekt.yml`) so that the rule set name (`TwitterCompose` becomes `Compose`) -> 4) Done! - +> This repository is a fork of the [Twitter Jetpack Compose Rules](https://github.com/twitter/compose-rules) by its original maintainer. As none of the admins/maintainers continue working at the company, its development will continue here from now on. If you come from that project, check out the [migration guide](https://mrmans0n.github.io/compose-rules/). ## Overview diff --git a/docs/index.md b/docs/index.md index 97e445db..72ece6b2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -14,3 +14,14 @@ You can refer to the [Using with ktlint](https://mrmans0n.github.io/compose-rule ## Using with Detekt You can refer to the [Using with Detekt](https://mrmans0n.github.io/compose-rules/detekt) documentation. + +## Migrating from Twitter Compose Rules + +The process to migrate to these rules coming from the Twitter ones is simple. + +1) Change the project coordinates in your gradle build scripts + 1) For Detekt, `com.twitter.compose.rules:detekt:$version` becomes `io.nlopez.compose.rules:detekt:$version` + 2) For Ktlint, `com.twitter.compose.rules:ktlint:$version` becomes `io.nlopez.compose.rules:ktlint:$version`. +2) Update `$version` to the latest: ![Latest version](https://img.shields.io/maven-central/v/io.nlopez.compose.rules/common) - see the project [releases page](https://github.com/mrmans0n/compose-rules/releases). +3) **If you are using Detekt**: update the config file (e.g. `detekt.yml`) so that the rule set name `TwitterCompose` becomes `Compose`. Keep in mind that there are a lot of new rules in this repo that weren't in Twitter's, so you'd be better copying over from the [example configuration](https://mrmans0n.github.io/compose-rules/detekt). +4) Done!