Fixes for new gradle plugin