Compile plugin for Gradle 1.12 and 2.0

Hi,

I want to force Gradle 2.0 to compile a Gradle plugin with groovy 1.8.6 which is used by Gradle 1.12.

The problem is, that we have on our environments Gradle 1.12 and 2.0. On the release build server we have only Gradle 2.0, and it seems that the plugin is every time build with groovy 2.3.3 and the plugin is not running on the Gradle 1.12 environments anymore.

If I build with Gradle 1.12 for testing reasons the plugin with the same code base, it works on 2.0 as well.

I tried already with this settings:

dependencies {
  compile gradleApi()
  //compile localGroovy()
  compile 'org.codehaus.groovy:groovy-all:1.8.6'
 .
 .
 .
}

I would be glad if someone can give me idea how to make the correct settings.

Thanks in advance, Christian

Why don’t you use gradle wrapper for 1.12 to build your plugin? This way you don’t need gradle to be installed on your CI boxes and the version used to build it will be the same wherever you build it.