refactored into two libraries, added Gradle support and AAR artifacts