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.