Oh, that's interesting. It looks like the Gradle Wrapper's jar file was intentionally removed from the kafka source tree (https://issues.apache.org/jira/browse/KAFKA-2098), which would cause this error. The README file in the repo says to run "gradle" first, which will install the wrapper binary, which you can then use... but this doesn't work when using gradle 3.0 due to the incompatibility introduced.
The best approach is probably to install an older version of gradle with homebrew. This ought to work: brew unlink gradle brew tap homebrew/versions brew install gradle28 Then you should be able to follow the README instructions, which start with running gradle, then using the gradle wrapper for any builds you want to run. Mathieu On Tue, Aug 23, 2016 at 6:21 AM, Sankar Narayanan <meetshankarh...@gmail.com> wrote: > Hi, > > I got your response as below. > > "Hi Sankar, > > It looks like Kafka's build scripts are not compatible with Gradle > 3.0. I'd suggest using the gradle wrapper (./gradlew) included in the > Kafka repo, which will automatically install Gradle 2.13 which is > compatible with the build scripts. > > Mathieu", > > > When i tried running gradle wrapper (./gradlew) directly, am getting > the following error. > > and is the reason i tried installing gradle using homebrew, which > finally ended up installing gradle 3.0 . Can you please help on to > overcome the below error? > > > $ ./gradlew > > Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain > > Thanks, > > > > On Mon, Aug 22, 2016 at 2:30 PM, Sankar Narayanan <meetshankarh...@gmail.com >> wrote: > >> Hi, >> >> I am facing the below issue while trying to build kafka using gradle. can >> you please help? >> >> installed grade 3.0 and then git clone kafka from apache site. Then I ran >> gradle under kafka folder. But I got the error "No such property: useAnt >> for class: org.gradle.api.tasks.scala.ScalaCompileOptions". I looked at >> build.gradle for useAnt and removed that line. The error still persisted. >> Even I removed all scalsCompile related part from build.gradle I still get >> the same error. >> >> I searched online and found that useAnt is deprecated in gradle 3.0, but >> why this error still happen if I removed useAnt from build.gradle? >> >> Thanks, >>