Gradle support for library and sample project