Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task.leftShift(Closure) method has been deprecated #214

Closed
shenliuyang opened this issue Mar 14, 2017 · 13 comments
Closed

Task.leftShift(Closure) method has been deprecated #214

shenliuyang opened this issue Mar 14, 2017 · 13 comments

Comments

@shenliuyang
Copy link

The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.

@Hillkorn
Copy link
Collaborator

Which version do you use?

@shenliuyang
Copy link
Author

gradle version is 3.4
release plugin version is 2.4.0

@Hillkorn
Copy link
Collaborator

Please upgrade to a higher version because it is fixed since 2.4.1

@shenliuyang
Copy link
Author

thanks ...

@rhonyabdullah
Copy link

Sorry, can anybody help me, i know this warning can replaced with doLas{} but how can i achieve that condition if im using task like this ?

tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:unchecked" << "-Werror" }

@shenliuyang
Copy link
Author

compilerArgs looks like a Collection. Try options.compilerArgs.add("xxx")

@rhonyabdullah
Copy link

Thanks for your fast respon @shenliuyang
So i task become like this:

tasks.withType(JavaCompile) { doLast { options.compilerArgs.add("-Xlint:unchecked") options.compilerArgs.add("-Werror") } }

Warning still goes on, i think the root cause not in that task.

The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.

@Hillkorn
Copy link
Collaborator

Hillkorn commented May 22, 2017 via email

@kopax
Copy link

kopax commented Jun 12, 2017

@Hillkorn
Copy link
Collaborator

@kopax It's available via jcenter

@capitalgerald
Copy link

Greeting to you members.
That is just a warning message already mentions a solution: use the doLast method to add actions.

For me it displayed as below:
The Task.leftshift<Closure> method has been deprecated and is scheduled to be removed in Grable 5.0 . PLease use Task.doLast <Action> instead.

But it launched the Emulator.

However complained of Old SDK as below:

pkg: /data/local/tmp/android-debug.apk
Failare [INSTALLED_FAILED_OLDER_SDK]

Kibirango Gerald
[email protected]

@Hillkorn
Copy link
Collaborator

Do you use version 2.6?

@capitalgerald
Copy link

capitalgerald commented Oct 20, 2017

Yeah, @Hillkorn

The problem was: i had set my minSdkVersion to an higher version of 24 instead of a low one like 14 as stated in the library.

<preference name="android-minSdkVersion" value="14" />

I got help from this link This Link
My thanks to them.

Thanks for your ##concern, ##Quick Response and the ##Mind of Sharing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants