You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This did not compile, as this is only of type Task in doLast.
Of course I can either use this@withType or make the method parameter Task in this case as I only use Task properties,
but that's not the point. doLast closure should know the type of the task it is called for.
The text was updated successfully, but these errors were encountered:
eskatos
changed the title
doLast in Kotlin DSL gets only Task, not actual type
doFirst and doLast in statically compiled languages gets only Task, not actual task type
Jan 12, 2023
Right now also not really besides adding a type parameter to Task and requiring all task classes to set it to itself or something like that which is probably what you meant with radical change and is probably quite an ugly change and might also make problems when extending tasks.
With Gradle 6.5.1, I tried this:
This did not compile, as
this
is only of typeTask
indoLast
.Of course I can either use
this@withType
or make the method parameterTask
in this case as I only useTask
properties,but that's not the point.
doLast
closure should know the type of the task it is called for.The text was updated successfully, but these errors were encountered: