}
public static void GoogleCode_upload(final Context context, final Scriptable thisObj,
final Object[] args, final Function funcObj) throws Exception {
final ScriptableObject config = (ScriptableObject) args[0];
final GoogleCodeUploader uploader = new GoogleCodeUploader();
uploader.setUserName(Context.toString(config.get("userName")));
uploader.setPassword(Context.toString(config.get("password")));
uploader.setProjectName(Context.toString(config.get("projectName")));
uploader.setFileName(Context.toString(config.get("fileName")));
uploader.setTargetFileName(Context.toString(config.get("targetFileName")));
uploader.setSummary(Context.toString(config.get("summary")));
if (ScriptableObject.hasProperty(config, "uploadUrl") && config.get("uploadUrl") != Context.getUndefinedValue()) {
// uploader.setUploadUrl(Context.toString(config.get("uploadUrl")));
}
uploader.setVerbose(Context.toBoolean(config.get("verbose")));
uploader.setLabels(Context.toString(config.get("labels")));
uploader.setIgnoreSslCertificateHostname(Context.toBoolean(config.get("ignoreSslCertificateHostname")));
uploader.execute();
}