Skip to content

Commit 77e4c0d

Browse files
authored
Merge pull request #689 from Vampire/fix-reject-version-if
Fix rejectVersionsIf vs. rejectVersionIf
2 parents 438fa08 + 8878121 commit 77e4c0d

File tree

9 files changed

+9
-8
lines changed

9 files changed

+9
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ Look for [issues with the `Dependency notations` and `up-for-grabs` tags](https:
718718
### New features
719719

720720
- 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.
721-
- 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.
721+
- 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.
722722
- Most of our dependency notations now provide more flexibility with 3 new extension functions: `withVersionPlaceholder()`, `withVersion(…)`, and `withoutVersion()`.
723723

724724
### Change (potentially breaking)

docs/update-dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ A perhaps better approach is to display development versions only if you are alr
114114
}
115115
```
116116

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

119119
=== "settings.gradle.kts"
120120
```kotlin

plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/RefreshVersionsTask.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ open class RefreshVersionsTask : DefaultTask() {
121121

122122
private fun warnAboutRefreshVersionsIfSettingIfAny() {
123123
if (RefreshVersionsConfigHolder.isUsingVersionRejection) {
124-
logger.warn("NOTE: Some versions are filtered by the rejectVersionsIf predicate. See the settings.gradle.kts file.")
124+
logger.warn("NOTE: Some versions are filtered by the rejectVersionIf predicate. See the settings.gradle.kts file.")
125125
}
126126
}
127127

plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/versions/VersionsPropertiesModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ internal actual data class VersionsPropertiesModel(
104104

105105
val isUsingVersionRejectionHeader = """
106106
|####
107-
|#### NOTE: Some versions are filtered by the rejectVersionsIf predicate. See the settings.gradle.kts file.
107+
|#### NOTE: Some versions are filtered by the rejectVersionIf predicate. See the settings.gradle.kts file.
108108
""".trimMargin()
109109

110110
private fun String.mustBeACommentLine() {

plugins/dependencies/src/main/resources/removed-dependencies-versions-keys.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,4 @@ androidx.health..health-connect-client=version.androidx.health-connect-client
107107
com.google.accompanist..accompanist-glide=version.google.accompanist
108108
com.google.accompanist..accompanist-imageloading-core=version.google.accompanist
109109
app.cash.molecule..molecule-testing=version.app.cash.molecule
110+
androidx.compose.runtime..runtime-tracing=version.androidx.compose.runtime

plugins/dependencies/src/test/resources/dependencies-versions-key-validated.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ androidx.compose.runtime..runtime-livedata=version.androidx.compose.runtime
5858
androidx.compose.runtime..runtime-rxjava2=version.androidx.compose.runtime
5959
androidx.compose.runtime..runtime-rxjava3=version.androidx.compose.runtime
6060
androidx.compose.runtime..runtime-saveable=version.androidx.compose.runtime
61-
androidx.compose.runtime..runtime-tracing=version.androidx.compose.runtime
61+
androidx.compose.runtime..runtime-tracing=version.androidx.compose.runtime-tracing
6262
androidx.compose.runtime..runtime=version.androidx.compose.runtime
6363
androidx.compose.ui..ui-geometry=version.androidx.compose.ui
6464
androidx.compose.ui..ui-graphics=version.androidx.compose.ui

sample-groovy/versions.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#### suppress inspection "SpellCheckingInspection" for whole file
99
#### suppress inspection "UnusedProperty" for whole file
1010
####
11-
#### NOTE: Some versions are filtered by the rejectVersionsIf predicate. See the settings.gradle.kts file.
11+
#### NOTE: Some versions are filtered by the rejectVersionIf predicate. See the settings.gradle.kts file.
1212

1313
plugin.org.gradle.hello-world=0.2
1414

sample-kotlin-js/versions.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#### suppress inspection "SpellCheckingInspection" for whole file
99
#### suppress inspection "UnusedProperty" for whole file
1010
####
11-
#### NOTE: Some versions are filtered by the rejectVersionsIf predicate. See the settings.gradle.kts file.
11+
#### NOTE: Some versions are filtered by the rejectVersionIf predicate. See the settings.gradle.kts file.
1212

1313
version.kotest=5.4.0
1414

sample-kotlin/versions.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#### suppress inspection "SpellCheckingInspection" for whole file
99
#### suppress inspection "UnusedProperty" for whole file
1010
####
11-
#### NOTE: Some versions are filtered by the rejectVersionsIf predicate. See the settings.gradle.kts file.
11+
#### NOTE: Some versions are filtered by the rejectVersionIf predicate. See the settings.gradle.kts file.
1212

1313
plugin.org.jetbrains.kotlinx.benchmark=0.4.2
1414

0 commit comments

Comments
 (0)