Skip to content

Commit 78b8c25

Browse files
authored
Update readme.md
1 parent 23636b4 commit 78b8c25

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

gradle/readme.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
Managing dependencies in a single module project is pretty simple, but when you start scaling and adding modules you have different ways to handle this:
22
[link](https://proandroiddev.com/gradle-version-catalogs-for-an-awesome-dependency-management-f2ba700ff894)
33

4-
- [*] Manual management: Involves having in many places the same string containing the libraries group, artifact and version. When a library needs to be updated, we need to change it manually in every Gradle file, this is very error-prone.
5-
- [*] ext blocks: This is the recommended solution by Google in their documentation and solves the problems of manual management. The only downside is that the IDE doesn’t offer code completion.
6-
- [*] buildSrc: In this approach, you use a special Gradle module and define your dependencies using Kotlin code. The major benefit of this option is auto-completion & navigation while the downside is that on any change to a version, the entire module needs to be recompiled.
4+
- **Manual management**: Involves having in many places the same string containing the libraries group, artifact and version. When a library needs to be updated, we need to change it manually in every Gradle file, this is very error-prone.
5+
- **ext blocks**: This is the recommended solution by Google in their documentation and solves the problems of manual management. The only downside is that the IDE doesn’t offer code completion.
6+
- **buildSrc**: In this approach, you use a special Gradle module and define your dependencies using Kotlin code. The major benefit of this option is auto-completion & navigation while the downside is that on any change to a version, the entire module needs to be recompiled.
77

88
In order to provide a standard for managing this, the Gradle team introduced version catalogs as an experimental feature in version 7.0 and promoted it to stable in version 7.4 🎉. This feature enables sharing dependencies in a centralized way, using an easy syntax and without **compromising the build speed.
99

1010

1111
for easy to do this ,I used [version-catalog-update-plugin](https://github.com/littlerobots/version-catalog-update-plugin). this is simple way to generate version catalog.
12-
./gradlew versionCatalogUpdate --interactive./gradlew versionCatalogUpdate --interactive
1312

13+
14+
15+
16+
```
17+
./gradlew versionCatalogUpdate --interactive./gradlew versionCatalogUpdate --interactive
18+
```

0 commit comments

Comments
 (0)