Difference `getting`/`existing`

Both methods have the same example given in their documentation:

tasks { val jar by getting }
tasks { val jar by existing }

What’s the difference between those two? Why are both functions necessary?

The difference is their eagerness in the configuration avoidance APIs. getting is eager, existing is lazy. Similarly, when creating objects creating is eager, registering is lazy.