I’m building a Gradle plugin that needs a version of httpclient and httpcore that’s different than the ones pulled in by gradleApi. How can this be done? Currently, I’m running into https://stackoverflow.com/questions/21864521/java-lang-nosuchfielderror-org-apache-http-message-basiclineformatter-instance.
You can filter out gradleApi like this:
dependencies {
compile files(dependencies.gradleApi().resolve().findAll { !it.name.contains("http-") })
}