I want to upgrade gradle to 2.0.0-beta or 1.5.0, I have the dex plugin in my gradle at the moment, but even when I removed it I was still getting the same error. How do I properly get rid of the multidex dependency

```
Error:Access to the dex task is now impossible, starting with 1.4.0
1.4.0 introduces a new Transform API allowing manipulation of the .class files.
See more information: http://tools.android.com/tech-docs/new-build-system/transform-api

```

build.gradle [More info on multidex](http://developer.android.com/tools/building/multidex.html)

```
android {
    compileSdkVersion 21
    buildToolsVersion "21.1.0"

    defaultConfig {
        ...
        minSdkVersion 14
        targetSdkVersion 21
        ...

        // Enabling multidex support.
        multiDexEnabled true
    }
    ...
}

dependencies {
  compile 'com.android.support:multidex:1.0.0'
}

```

The Transform API doesn't give too much info. 
Is there any to get this work or any examples how to use the transform api, anything at all?

I know it works with 1.3.0, I need at least 1.5.0