Removed internal proprietary sun API.
Migrated to gradle. @blan4
Support previous android versions.