v2.0 rc1 fails gradle build for kafka. used rc1 to overcome GRADLE-3023

got:

Caused by: org.gradle.api.internal.MissingMethodException: Could not find method add() for arguments [licenseMain, class nl.javadude.gradle.plugins.license.License] on task set.

gradle -v

------------------------------------------------------------ Gradle 2.0-rc-1 ------------------------------------------------------------

Build time:

2014-06-06 07:02:41 UTC Build number: none Revision:

b6ead6fa452dfdadec484059191eb641d817226c

Groovy:

2.3.2 Ant:

Apache Ant™ version 1.9.3 compiled on December 23 2013 JVM:

1.8.0_05 (Oracle Corporation 25.5-b02) OS:

Windows 7 6.1 amd64

most likely you’re using a deprecated method that was removed in gradle 2.0-rc1. Do you get deprecation warnings when running your build with gradle 1.12?

The issue is likely due to your use of a deprecated feature, which was removed in 2.0.

My guess is that you’re hitting the removal of ‘TaskContainer.add()’ which has been replaced by ‘create()’.

You can read about all of the removed, deprecated methods at http://www.gradle.org/docs/release-candidate/release-notes#removed-deprecated-methods.

Hey Shlomi,

Either kafka build files or one of the plugins it uses (license plugin?) calls out deprecated method that were removed in 2.0.

If the problem exists in the kafka build files, you can fix it easily. If it exists in one of the 3rd party plugins (license plugin?) then you need to use the newer version of that plugin, a version that fixes the deprecation problems. Alternatively, you can stay at current version until the 3rd party plugin catches up.

Method ‘add’ on the task container was deprecated long time ago. From time to time (major version releases) we need to remove the deprecated methods.

Hope that helps!