Skip to content

Instantly share code, notes, and snippets.

@franciscotfmc
Last active August 29, 2015 14:07
Show Gist options
  • Save franciscotfmc/6c63317684eff17505dc to your computer and use it in GitHub Desktop.
Save franciscotfmc/6c63317684eff17505dc to your computer and use it in GitHub Desktop.
Compile appengine project and run gradle to update local maven repo
#!/usr/bin/env python
import sys
import os
import glob
import zipfile
import shutil
os.system("endpointscfg.py get_client_lib java -bs gradle projectname.ProjectApi")
to_dir = "extracted-files"
for file in glob.glob("*.zip"):
zip = zipfile.ZipFile(file)
zip.extractall(to_dir)
os.remove(file)
folder = os.listdir(os.getcwd() + "/" + to_dir)[0]
os.chdir(to_dir + "/" + folder)
os.system("gradle install")
os.chdir("../../")
shutil.rmtree(to_dir)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment