Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stop using configuration Configuration#fileCollection(Dependency...),…
Browse files Browse the repository at this point in the history
… soon to be deprecated (#716) (#720)

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.
YifeiZhuang authored Jul 13, 2023
1 parent 4502c7e commit 5c15781
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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.
@@ -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 5c15781

Please sign in to comment.