# Get an SFTP connection...
ftp = sshs.open_sftp()
- ftp.get_channel().settimeout(15)
+ ftp.get_channel().settimeout(60)
# Put all the necessary files in place...
ftp.chdir(homedir)
if options.verbose:
cmdline += ' --verbose'
cmdline += " %s:%s" % (app.id, build.vercode)
- chan.exec_command('bash -c ". ~/.bsenv && ' + cmdline + '"')
+ chan.exec_command('bash --login -c "' + cmdline + '"')
output = bytes()
while not chan.exit_status_ready():
while chan.recv_ready():
release_vm()
-def adapt_gradle(build_dir):
- filename = 'build.gradle'
+def force_gradle_build_tools(build_dir, build_tools):
for root, dirs, files in os.walk(build_dir):
for filename in files:
if not filename.endswith('.gradle'):
path = os.path.join(root, filename)
if not os.path.isfile(path):
continue
- logging.debug("Adapting %s at %s" % (filename, path))
+ logging.debug("Forcing build-tools %s in %s" % (build_tools, path))
common.regsub_file(r"""(\s*)buildToolsVersion([\s=]+).*""",
- r"""\1buildToolsVersion\2'%s'""" % config['build_tools'],
+ r"""\1buildToolsVersion\2'%s'""" % build_tools,
path)
gradletasks += ['assemble' + flavours_cmd + 'Release']
- adapt_gradle(build_dir)
- for name, number, libpath in srclibpaths:
- adapt_gradle(libpath)
+ if config['force_build_tools']:
+ force_gradle_build_tools(build_dir, config['build_tools'])
+ for name, number, libpath in srclibpaths:
+ force_gradle_build_tools(libpath, config['build_tools'])
cmd = [config['gradle']]
if build.gradleprops:
# different than for the standard metadata/ layout because expectations
# are different. In this case, the most common user will be the app
# developer working on the latest update of the app on their own machine.
- local_metadata_files = common.get_local_local_metadata_files()
+ local_metadata_files = common.get_local_metadata_files()
if len(local_metadata_files) == 1: # there is local metadata in an app's source
config = dict(common.default_config)
# `fdroid build` should build only the latest version by default since