rebuilt as a proper gradle plugin