Skip to content

Commit

Permalink
Fix rejectVersionsIf vs. rejectVersionIf
Browse files Browse the repository at this point in the history
  • Loading branch information
Vampire committed Jul 5, 2023
1 parent 7958f92 commit 8878121
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ Look for [issues with the `Dependency notations` and `up-for-grabs` tags](https:
### New features

- refreshVersions will now add `## unused` comments on top of unused entries in the `versions.properties` file after you run the `refreshVersions` task, so you know which ones are obsolete and can be removed.
- The new `rejectVersionsIf { … }` predicate available in the `refreshVersions { … }` extension in your `settings.gradle[.kts]` file will allow you to filter any kind of versions you don't want to know about. It can be handy to filter snapshots out for example.
- The new `rejectVersionIf { … }` predicate available in the `refreshVersions { … }` extension in your `settings.gradle[.kts]` file will allow you to filter any kind of versions you don't want to know about. It can be handy to filter snapshots out for example.
- Most of our dependency notations now provide more flexibility with 3 new extension functions: `withVersionPlaceholder()`, `withVersion(…)`, and `withoutVersion()`.

### Change (potentially breaking)
Expand Down
2 changes: 1 addition & 1 deletion docs/update-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ A perhaps better approach is to display development versions only if you are alr
}
```

`rejectVersionsIf { ...}` is pretty flexible, you can also use it to ban versions from specific version keys:
`rejectVersionIf { ...}` is pretty flexible, you can also use it to ban versions from specific version keys:

=== "settings.gradle.kts"
```kotlin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ open class RefreshVersionsTask : DefaultTask() {

private fun warnAboutRefreshVersionsIfSettingIfAny() {
if (RefreshVersionsConfigHolder.isUsingVersionRejection) {
logger.warn("NOTE: Some versions are filtered by the rejectVersionsIf predicate. See the settings.gradle.kts file.")
logger.warn("NOTE: Some versions are filtered by the rejectVersionIf predicate. See the settings.gradle.kts file.")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ internal actual data class VersionsPropertiesModel(

val isUsingVersionRejectionHeader = """
|####
|#### NOTE: Some versions are filtered by the rejectVersionsIf predicate. See the settings.gradle.kts file.
|#### NOTE: Some versions are filtered by the rejectVersionIf predicate. See the settings.gradle.kts file.
""".trimMargin()

private fun String.mustBeACommentLine() {
Expand Down
2 changes: 1 addition & 1 deletion sample-groovy/versions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#### suppress inspection "SpellCheckingInspection" for whole file
#### suppress inspection "UnusedProperty" for whole file
####
#### NOTE: Some versions are filtered by the rejectVersionsIf predicate. See the settings.gradle.kts file.
#### NOTE: Some versions are filtered by the rejectVersionIf predicate. See the settings.gradle.kts file.

plugin.org.gradle.hello-world=0.2

Expand Down
2 changes: 1 addition & 1 deletion sample-kotlin-js/versions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#### suppress inspection "SpellCheckingInspection" for whole file
#### suppress inspection "UnusedProperty" for whole file
####
#### NOTE: Some versions are filtered by the rejectVersionsIf predicate. See the settings.gradle.kts file.
#### NOTE: Some versions are filtered by the rejectVersionIf predicate. See the settings.gradle.kts file.

version.kotest=5.4.0

Expand Down
2 changes: 1 addition & 1 deletion sample-kotlin/versions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#### suppress inspection "SpellCheckingInspection" for whole file
#### suppress inspection "UnusedProperty" for whole file
####
#### NOTE: Some versions are filtered by the rejectVersionsIf predicate. See the settings.gradle.kts file.
#### NOTE: Some versions are filtered by the rejectVersionIf predicate. See the settings.gradle.kts file.

plugin.org.jetbrains.kotlinx.benchmark=0.4.2

Expand Down

0 comments on commit 8878121

Please sign in to comment.