Unsupported Gradle DSL method found: 'add()'! using IntelliJ

Hi, I’m using IntelliJ IDEA 13.1 Community Edition and I’m trying to add plugin to my build.gradle. Project is using gradle 2.0 wrapper.

buildscript {
      repositories {
        mavenCentral()
    }
      dependencies {
        classpath "org.apache.ivy:ivy:2.3.0"
        classpath "com.ullink.gradle:gradle-repositories-plugin:1.2"
    }
}
  apply plugin: 'repositories'
apply plugin: 'java'
  sourceCompatibility = 1.8
version = '1.0'
  repositories {
    mavenCentral()
    sourceforge('ikvm','[module]/[revision]/[artifact]-[revision].[ext]')
}
  dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.11'
}

Unfortunately, I get following error.

Error:(23, 0) Build script error, unsupported Gradle DSL method found: 'add()'!
  Possible causes could be:
    - you are using Gradle version where the method is absent (<a href="open_gradle_settings">Fix Gradle settings</a>)
  - you didn't apply Gradle plugin which provides the method (<a href="apply_gradle_plugin">Apply Gradle plugin</a>)
  - or there is a mistake in a build script (<a href="goto_source">Goto source</a>)

It seems like there is missing add() method, which is in ‘org.gradle.api.artifacts.dsl.RepositoryHandler’ package.

You might be using a plugin that’s not compatible with Gradle 2.0. Try switch to Gradle 1.12 to verify.

Yes, I switch gradle version to 1.1 and now it’s working. Is it possible somehow to force gradle 2.0 to work with older plugins?

No there isn’t. Gradle 2.0 removed several APIs that had been deprecated for a long time. Plugins that are still using these APIs will need to be updated.