From 7f9c97c07a97571cbc7feb7d7efca3fa23528665 Mon Sep 17 00:00:00 2001 From: Goooler Date: Tue, 18 May 2021 16:49:39 +0800 Subject: [PATCH 1/3] Update dependencies (#518) --- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 45a7d04b..cc93a3d9 100644 --- a/build.gradle +++ b/build.gradle @@ -51,7 +51,7 @@ task createClasspathManifest { // Add the classpath file to the test runtime classpath dependencies { - implementation 'com.thoughtworks.xstream:xstream:1.4.16' + implementation 'com.thoughtworks.xstream:xstream:1.4.17' testRuntimeOnly files(createClasspathManifest) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8cf6eb5a..7665b0fa 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From da9328da9751e3e1521310487f69add485b43bd2 Mon Sep 17 00:00:00 2001 From: Jean-Michel Fayard Date: Fri, 21 May 2021 13:52:10 +0200 Subject: [PATCH 2/3] docs: start from the assumption that people are copy/pasting things Resolves #519 --- README.md | 50 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index cc726fb4..b72c08bf 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,8 @@ def isNonStable = { String version -> ``` -
+ +
Kotlin ```kotlin @@ -148,19 +149,33 @@ You can either use the simplified syntax `rejectVersionIf { ... }` or configure +Example 1: reject all non stable versions + ```groovy +// https://github.com/ben-manes/gradle-versions-plugin tasks.named("dependencyUpdates").configure { - // Example 1: reject all non stable versions rejectVersionIf { isNonStable(it.candidate.version) } +} +``` + +Example 2: disallow release candidates as upgradable versions from stable versions - // Example 2: disallow release candidates as upgradable versions from stable versions +```groovy +// https://github.com/ben-manes/gradle-versions-plugin +tasks.named("dependencyUpdates").configure { rejectVersionIf { isNonStable(it.candidate.version) && !isNonStable(it.currentVersion) } +} +``` - // Example 3: using the full syntax +Example 3: using the full syntax + +```groovy +// https://github.com/ben-manes/gradle-versions-plugin +tasks.named("dependencyUpdates").configure { resolutionStrategy { componentSelection { all { @@ -174,26 +189,44 @@ tasks.named("dependencyUpdates").configure { ```
-
+
Kotlin +Example 1: reject all non stable versions + ```kotlin import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask +// https://github.com/ben-manes/gradle-versions-plugin tasks.withType { - // Example 1: reject all non stable versions rejectVersionIf { isNonStable(candidate.version) } +} +``` + +Example 2: disallow release candidates as upgradable versions from stable versions + +```kotlin +import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask - // Example 2: disallow release candidates as upgradable versions from stable versions +// https://github.com/ben-manes/gradle-versions-plugin +tasks.withType { rejectVersionIf { isNonStable(candidate.version) && !isNonStable(currentVersion) } +} +``` + +Example 3: using the full syntax - // Example 3: using the full syntax +```kotlin +import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask + +// https://github.com/ben-manes/gradle-versions-plugin +tasks.withType { resolutionStrategy { componentSelection { all { @@ -205,7 +238,6 @@ tasks.withType { } } ``` -
#### Gradle Release Channel From 9bef5cb55bee63f2e51b3456c1172102cf4fb593 Mon Sep 17 00:00:00 2001 From: Jean-Michel Fayard Date: Fri, 21 May 2021 13:56:25 +0200 Subject: [PATCH 3/3] README: add a table of content Generated automatically by Visual Studio Code <3 --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index b72c08bf..ce938079 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,28 @@ You may also wish to explore additional functionality provided by, - [deblibs-gradle-plugin](https://github.com/hellofresh/deblibs-gradle-plugin) - [refreshVersions](https://github.com/jmfayard/refreshVersions) +**Table of contents** + +- [Usage](#usage) + - [`plugins` block:](#plugins-block) + - [`buildscript` block:](#buildscript-block) + - [using a Gradle init script](#using-a-gradle-init-script) +- [Tasks](#tasks) + - [`dependencyUpdates`](#dependencyupdates) + - [Multi-project build](#multi-project-build) + - [Revisions](#revisions) + - [RejectVersionsIf and componentSelection](#rejectversionsif-and-componentselection) + - [Gradle Release Channel](#gradle-release-channel) + - [Constraints](#constraints) + - [Kotlin DSL](#kotlin-dsl) + - [Try out the samples](#try-out-the-samples) + - [Report format](#report-format) + - [Json report](#json-report) + - [XML report](#xml-report) + - [HTML report](#html-report) + - [Custom report format](#a-namecustom_report_formatacustom-report-format) + + ## Usage [![Build](https://github.com/ben-manes/gradle-versions-plugin/workflows/build/badge.svg)](https://github.com/ben-manes/gradle-versions-plugin/actions) @@ -108,6 +130,7 @@ The strategy can be specified either on the task or as a system property for ad gradle dependencyUpdates -Drevision=release ``` +#### RejectVersionsIf and componentSelection To further define which version to accept, you need to define what means an unstable version. Sadly, there are no agreed standard on this, but this is a good starting point: