Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The Task.leftShift(Closure) method has been deprecated

When executing the command: I see the information and after 30 seconds an error.

The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead. at build_cpi2ciq0xq9tufpedr81p3j2s.run(PATH\src-cordova\platforms\android\app\build.gradle:148);

How to fix it?

like image 743
Александр Миронов Avatar asked Sep 08 '26 14:09

Александр Миронов


1 Answers

Instead of:

task << {
   println "Action!"
}

use:

task {
   doLast {
      println "Action!"
   }
} 

<< under the hood calls leftShift which as you can see was deprecated and removed.

like image 172
Opal Avatar answered Sep 12 '26 18:09

Opal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!