Optimized extraDependencies
add setSharedProperty and getSharedProperty
(cherry picked from commit cf3c970) + Added a try/catch to only add the dependency and not reflect it if it comes from an external lib