Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No such property: useAnt for class: org.gradle.api.tasks.scala.ScalaCompileOptions

Tags:

gradle

scala

I 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?

like image 272
Cindy Avatar asked Aug 19 '16 04:08

Cindy


1 Answers

Putting those lines the build.gralde seems to fix the problem in my project:

  ScalaCompileOptions.metaClass.daemonServer = true
  ScalaCompileOptions.metaClass.fork = true
  ScalaCompileOptions.metaClass.useAnt = false
  ScalaCompileOptions.metaClass.useCompileDaemon = false
like image 58
Pham Avatar answered Jan 04 '23 11:01

Pham