diff --git a/README b/README index 33e27942..140b6a0d 100644 --- a/README +++ b/README @@ -186,6 +186,8 @@ configuration to the build. These are: last character on a line to join that line with the next. It has no special meaning in other contexts; in particular, literal backslashes should not be escaped. + init=xxxx As for 'prebuild', but runs on the source code BEFORE any + other processing takes place. novcheck=yes Don't check that the version name and code in the resulting apk are correct by looking at the build output - assume the metadata is correct. This takes away a useful level of diff --git a/common.py b/common.py index 57f41ec6..e88bf551 100644 --- a/common.py +++ b/common.py @@ -651,6 +651,12 @@ def prepare_source(vcs, app, build, build_dir, extlib_dir, sdk_path, ndk_path, j if build.get('submodules', 'no') == 'yes': vcs.initsubmodules() + # Run an init command if one is required... + if build.has_key('init'): + init = build['init'] + if subprocess.call(init, cwd=root_dir, shell=True) != 0: + raise BuildException("Error running init command") + # Generate (or update) the ant build file, build.xml... if (build.get('update', 'yes') == 'yes' and not build.has_key('maven')):