gemini: use existing build code where possible