Skip to content

Commit be4b392

Browse files
bric3sarahchen6
andauthored
chore: PR suggestions
Co-authored-by: Sarah Chen <[email protected]>
1 parent b60ec8e commit be4b392

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

gradle/util.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
abstract class DisplayArtifactsTask extends DefaultTask {
22

3-
@Option(option = "configuration", description = "Comma separated list of of configuration name (defaults to 'archives,javadocElements,sourcesElements'). Use 'all' to display all configurations.)")
3+
@Option(option = "configuration", description = "Comma separated list of configuration name (defaults to 'archives,javadocElements,sourcesElements'). Use 'all' to display all configurations.")
44
@Input
55
@Optional
66
abstract Property<String> getConfigurationName()
@@ -16,7 +16,8 @@ abstract class DisplayArtifactsTask extends DefaultTask {
1616
// This eager access is ok as it is during the task execution phase
1717
def builder = new StringBuilder()
1818
def targetConfig = configurationName.map { it.split(",").toList().toSet() }.orNull
19-
project.configurations.matching { targetConfig.contains("all") ? true : targetConfig.contains(it.name) }.each { config ->
19+
def configs = targetConfig.contains("all") ? project.configurations : project.configurations.matching { targetConfig.contains(it.name) }
20+
configs.each { config ->
2021
def outgoingFiles = config.outgoing.artifacts.getFiles()
2122
if (!outgoingFiles.isEmpty()) {
2223
builder.setLength(0)

0 commit comments

Comments
 (0)