# Build Script ClassPath changes while using Plugins DSL

**URL:** <https://discuss.gradle.org/t/build-script-classpath-changes-while-using-plugins-dsl/34269>\
**Category:** Help/Discuss\
**Created:** [December 19, 2019, 8:20pm UTC](https://discuss.gradle.org/t/build-script-classpath-changes-while-using-plugins-dsl/34269 "2019-12-19T20:20:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![suriyasundar92](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@suriyasundar92](https://discuss.gradle.org/u/suriyasundar92)\
**Post date:** [December 19, 2019, 8:20pm UTC](https://discuss.gradle.org/t/build-script-classpath-changes-while-using-plugins-dsl/34269/1 "2019-12-19T20:20:59Z")

</div>

Hi,  
I am trying to test a gradle plugin that we developed with a test android project.  
The plugin specifies org.apache.httpcomponents:httpclient:4.5.1 as a dependency.

The plugin works fine while using the conventional apply plugin syntax.

```gradle
buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "gradle.plugin.com.flurry:symbol-upload:1.2.0"
  }
}

apply plugin: "com.flurry.android.symbols"

```

Im able to find the required version of the httpclient in the classpath

```gradle
C02T21KRG8WL-lm:ProguardUploadTest suriyasundar$ ./gradlew show | grep -i httpclient

**<-------------> 0% CONFIGURING [0s]**

**> root project > Resolve files of :classpath**

/Users/suriyasundar/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.1/7e3cecc566df91338c6c67883b89ddd05a17db43/httpclient-4.5.1.jar

```

However while using the plugins DSL,

```gradle
plugins {
  id "com.flurry.android.symbols" version "1.2.0"
}

```

I am finding an older version of the httpclient (4.2.6) in the buildscript classpath

```gradle
<======-------> 50% CONFIGURING [0s]
> :app
/Users/suriyasundar/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.2.6/e4ca30a6a3a075053a61c6fc850d2432dc012ba7/httpclient-4.2.6.jar

```

I am running into an issue when the org.apache.http.conn.ssl.SSLConnectionSocketFactory from version 4.5.1 is trying to work with the class org.apache.http.conn.ssl.AllowAllHostnameVerifier from version 4.2.6 of the httpclient dependency.

Please find the sample code in the following repo

> **[suriyasundar92/proguard-upload-test](https://github.com/suriyasundar92/proguard-upload-test)**
>
> Contribute to suriyasundar92/proguard-upload-test development by creating an account on GitHub.

You can find the issue in the master branch. The setting which works fine is in the branch `branch-without-issue`.

I want to fix this in my plugin so that the plugin can find the correct version of httpclient when used in any project.

I would really appreciate any pointers to the way plugin dependencies are handled in the new plugins DSL.  
Any gradle expert advice is highly valued.
