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
./gradlew myTask
...
> Task :myTask
Caching disabled for task ':myTask' because:
Build cache is disabled
Task ':myTask' is not up-to-date because:
Task has not declared any outputs despite executing actions.
Using method ObjectFactory.property() method to create a property of type Map<K, V> has been deprecated. This will fail with an error in Gradle 6.0. Please use the ObjectFactory.mapProperty() method instead.
at MyTask$_run_closure1.doCall(/Users/steffenyount/dev/2/tstProj/build.gradle:33)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
#Wed Aug 21 15:17:48 PDT 2019
key3=value3
key2=value2
key1=value1
:myTask (Thread[Execution worker for ':',5,main]) completed. Took 1.49 secs.
BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed
Expected Behavior
should not see a deprecation warning about not using ObjectFactory.mapProperty()
Current Behavior
I am seeing a deprecation warning about not using ObjectFactory.mapProperty()
Context
I want to pass a java.util.Properties object to my worker
Steps to Reproduce
See example above.
Your Environment
OSX
The text was updated successfully, but these errors were encountered:
steffenyount
changed the title
New Worker API reports deprecation warning about not using ObjectFactory.mapProperty()
New Worker API reports deprecation warning about not using ObjectFactory.mapProperty() in Gradle 5.6
Aug 22, 2019
Thanks for the report @steffenyount. We're working on a fix for #10323 to go into 5.6.1, but it's good that you've adopted the new worker api semantics. You can get rid of the deprecation by using MapProperty instead of Property<Properties> although that requires you to treat it like a Map in your work action - not sure if that would be an issue for you or not. The issue here (and with #10323) is that there is special handling for Map objects and since Properties is-a Map, it gets caught up in that. We're looking at better ways to handle this.
I'm seeing a deprecation warning about not using ObjectFactory.mapProperty() which I don't think I have any control over.
E.g. a simple project defined with ~/tstProj/build.gradle:
result:
Expected Behavior
should not see a deprecation warning about not using ObjectFactory.mapProperty()
Current Behavior
I am seeing a deprecation warning about not using ObjectFactory.mapProperty()
Context
I want to pass a java.util.Properties object to my worker
Steps to Reproduce
See example above.
Your Environment
OSX
The text was updated successfully, but these errors were encountered: