This message was deleted.
# community-support
s
This message was deleted.
e
same as dealing with
null
type ambiguity outside of gradle,
Copy code
objects.property<String?>().convention(null as String?)
j
I tried to use it but when I access to it, I got a crash, I am going to use blank strings even I don't like it...
Copy code
Cannot query the value of task ':someTask' property 'prop' because it has no value available.
e
well wherever you are using it is requiring a value. perhaps you need
getOrNull()
instead of
get()
, or to add an
@Optional
annotation
(but also - the default for a regular property is unset, I don't see why you'd use
convention(null)
except to override something else')
j
I was calling get, that was the problem, thank you 🙂
For some reason, autocomplete doesn't show
getOrNull
, I have to put it manually and it exists
ahh, it is converted to
orNull
, which is not appropriated tbh