Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisCAD committed Nov 15, 2023
2 parents 9ec529c + f468795 commit edd0aec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
22 changes: 3 additions & 19 deletions docs/add-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,29 +192,13 @@ Can you use it with refreshVersions?

Sure, just use the version placeholder (`_`).

### Using Gradle 7+ Versions Catalogs
### Using Gradle Versions Catalogs

Gradle 7 comes with its own feature for centralizing dependencies: [Versions Catalogs](https://docs.gradle.org/7.0-rc-1/userguide/platforms.html#sub:central-declaration-of-dependencies).
Gradle 7+ comes with its own feature for centralizing dependencies: [Versions Catalogs](https://docs.gradle.org/7.0-rc-1/userguide/platforms.html#sub:central-declaration-of-dependencies).

With Versions Catalog, you have a file like `gradle/libs.versions.toml` where you can centralize all your dependencies and benefit from typesafe accessors in your `build.gradle[.kts]` file.

Since the feature is incubating, you need to enable it explicitly in the project's `settings.gradle[.kts]` file:
> `enableFeaturePreview("VERSION_CATALOGS")`
Does that work well with refreshVersions? Yes, as long as you use the version placeholder (`_`).

=== "gradle/libs.versions.toml"
```
[libraries]
accompanist-coil = "com.google.accompanist:accompanist-coil:_"
accompanist-flowlayout = "com.google.accompanist:accompanist-flowlayout:_"
accompanist-insets = "com.google.accompanist:accompanist-insets:_"
...
```

In this configuration, the versions catalog centralizes the dependency notations, while refreshVersions takes care of setting and updating the versions.

We have ideas to integrate Versions Catalogs deeper into refreshVersions, see [this issue](https://github.com/jmfayard/refreshVersions/issues/333).
We support updating this version catalog. If you want to keep versions in the `versions.properties` file, you can use the version placeholder (`_`).

### Using the libraries.gradle pattern

Expand Down
1 change: 1 addition & 0 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ You should also try to update the Gradle plugins present in your build to the la

The Gradle documentation has detailed migration guides if you are stuck:

- From Gradle 8+: https://docs.gradle.org/current/userguide/upgrading_version_8.html
- From Gradle 7+: https://docs.gradle.org/current/userguide/upgrading_version_7.html
- From Gradle 6+: https://docs.gradle.org/current/userguide/upgrading_version_6.html
- From Gradle 5.x: https://docs.gradle.org/current/userguide/upgrading_version_5.html
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extra:
gradlePluginPortal: https://plugins.gradle.org/plugin/de.fayard.refreshVersions
slack: https://app.slack.com/client/T09229ZC6/CP5659EL9
version:
gradle: 8.3
gradle: 8.4
refreshVersions: '0.60.3'
snapshot: '0.60.4-SNAPSHOT'
keyboard_shortcuts:
Expand Down

0 comments on commit edd0aec

Please sign in to comment.