Skip to content

Commit

Permalink
stop using configuration Configuration#fileCollection(Dependency...),…
Browse files Browse the repository at this point in the history
… soon to be deprecated (#716)

The files(Dependency...) method filters the contents of the configuration to only include files from the provided dependencies and it's transitive dependencies. Since there is only one dependency in the configuration, using this method is unnecessary.
  • Loading branch information
YifeiZhuang committed Jul 13, 2023
1 parent 6673571 commit d054db5
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import groovy.transform.CompileStatic
import org.gradle.api.NamedDomainObjectContainer
import org.gradle.api.Project
import org.gradle.api.artifacts.Configuration
import org.gradle.api.artifacts.Dependency

/**
* Holds locations of all external executables, i.e., protoc and plugins.
Expand Down Expand Up @@ -108,7 +107,7 @@ class ToolsLocator {
classifier:classifier ?: osdetector.classifier,
ext:extension ?: 'exe',
]
Dependency dep = project.dependencies.add(config.name, notation)
locator.resolve(config.fileCollection(dep), "$groupId:$artifact:$version".toString())
project.dependencies.add(config.name, notation)
locator.resolve(config, "$groupId:$artifact:$version".toString())
}
}

0 comments on commit d054db5

Please sign in to comment.