update source code in order to be used with latest android studio IDE and make use of gradle.