refactored dependency related tasks into more OO manner and
use better integration of java and ruby.

this also avoids opening many streams (to files) instead it
needs only one stream at a time.
move ruby code around the gemspec into its own class