Fix 'preBuild' task binding and gradle sample