diff --git a/README.md b/README.md
index 972f6120..a04079e8 100644
--- a/README.md
+++ b/README.md
@@ -70,8 +70,6 @@ allprojects {
}
```
-The current version is known to work with Gradle versions up to 5.6.
-
## Tasks
### `dependencyUpdates`
@@ -326,7 +324,7 @@ Gradle updates:
- Gradle: [4.6 -> 4.7 -> 4.8-rc-2]
```
-Json report
+#### Json report
```json
{
"current": {
@@ -440,7 +438,7 @@ Json report
}
```
-XML report
+#### XML report
```xml
8
@@ -550,12 +548,8 @@ XML report
```
-HTML report
-
-```
-The HTML report provides sections for current, outdated, exceeded and unresolved dependencies.
-```
-
+#### HTML report
+[](examples/html-report.png)
#### Custom report format
If you need to create a report in a custom format, you can set the `dependencyUpdates` tasks's `outputFormatter` property to a Closure. The closure will be called with a single argument that is an instance of [com.github.benmanes.gradle.versions.reporter.result.Result](src/main/groovy/com/github/benmanes/gradle/versions/reporter/result/Result.groovy).
diff --git a/build.gradle b/build.gradle
index eede4515..908c4957 100644
--- a/build.gradle
+++ b/build.gradle
@@ -23,7 +23,7 @@ apply plugin: 'nexus'
apply plugin: 'codenarc'
group = 'com.github.ben-manes'
-version = '0.34.0'
+version = '0.35.0'
sourceCompatibility = '1.8'
diff --git a/examples/html-report.png b/examples/html-report.png
new file mode 100644
index 00000000..cf82c1e3
Binary files /dev/null and b/examples/html-report.png differ
diff --git a/src/main/groovy/com/github/benmanes/gradle/versions/updates/Resolver.groovy b/src/main/groovy/com/github/benmanes/gradle/versions/updates/Resolver.groovy
index 3f3b5f75..562b9493 100644
--- a/src/main/groovy/com/github/benmanes/gradle/versions/updates/Resolver.groovy
+++ b/src/main/groovy/com/github/benmanes/gradle/versions/updates/Resolver.groovy
@@ -139,8 +139,13 @@ class Resolver {
}.minus(configuration.dependencies)
// Adds the Kotlin 1.2.x legacy metadata to assist in variant selection
- Configuration metadata = project.configurations.findByName("commonMainMetadataElements")
- if (metadata != null) {
+ Configuration metadata = project.configurations.findByName('commonMainMetadataElements')
+ if (metadata == null) {
+ Configuration compile = project.configurations.findByName("compile")
+ if (compile != null) {
+ addAttributes(copy, compile, { String key -> key.contains('kotlin') })
+ }
+ } else {
addAttributes(copy, metadata)
}
@@ -200,11 +205,14 @@ class Resolver {
}
/** Adds the attributes from the source to the target. */
- private void addAttributes(HasConfigurableAttributes target, HasConfigurableAttributes source) {
+ private void addAttributes(HasConfigurableAttributes target,
+ HasConfigurableAttributes source, Closure filter = { String key -> true }) {
target.attributes { container ->
for (def key : source.attributes.keySet()) {
- def value = source.attributes.getAttribute(key)
- container.attribute(key, value)
+ if (filter.call(key.name)) {
+ def value = source.attributes.getAttribute(key)
+ container.attribute(key, value)
+ }
}
}
}