remove "force_build_tools" config option, closes #738

The `force_build_tools` config option was added a long time ago to
brute force the _build-tools_ version by trying to replace the value
in `build.gradle` files. This is never something that should be used
in production, since the app's build metadata should specify this kind
of thing. And now that we're moving towards _androguard_ for
everything except fdroid build and fdroid publish, _build-tools_ will
no longer even be used in the other commands.
parent df6cf520
......@@ -36,10 +36,6 @@
# Build tools version to be used
# build_tools = "28.0.3"
# Force all build to use the above version of build -tools, good for testing
# builds without having all of the possible build-tools installed.
# force_build_tools = True
# Command or path to binary for running Ant
# ant = "ant"
......
......@@ -442,11 +442,6 @@ def build_local(app, build, vcs, build_dir, output_dir, log_dir, srclib_dir, ext
gradletasks += ['assemble' + flavours_cmd + 'Release']
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:
cmd += ['-P' + kv for kv in build.gradleprops]
......
......@@ -115,7 +115,6 @@ default_config = {
},
'cachedir': os.path.join(os.getenv('HOME'), '.cache', 'fdroidserver'),
'build_tools': MINIMUM_AAPT_BUILD_TOOLS_VERSION,
'force_build_tools': False,
'java_paths': None,
'scan_binary': False,
'ant': "ant",
......
......@@ -6,7 +6,6 @@ import inspect
import logging
import optparse
import os
import re
import shutil
import sys
import tempfile
......@@ -59,22 +58,6 @@ class BuildTest(unittest.TestCase):
os.makedirs(self.tmpdir)
os.chdir(self.basedir)
def test_force_gradle_build_tools(self):
testdir = tempfile.mkdtemp(prefix=inspect.currentframe().f_code.co_name, dir=self.tmpdir)
shutil.copytree(os.path.join('source-files'),
os.path.join(testdir, 'source-files'))
teststring = 'FAKE_VERSION_FOR_TESTING'
fdroidserver.build.force_gradle_build_tools(testdir, teststring)
pattern = re.compile(r"buildToolsVersion[\s=]+'%s'\s+" % teststring)
for p in ('source-files/fdroid/fdroidclient/build.gradle',
'source-files/Zillode/syncthing-silk/build.gradle',
'source-files/open-keychain/open-keychain/build.gradle',
'source-files/osmandapp/osmand/build.gradle',
'source-files/open-keychain/open-keychain/OpenKeychain/build.gradle'):
with open(os.path.join(testdir, p), 'r') as f:
filedata = f.read()
self.assertIsNotNone(pattern.search(filedata))
def test_get_apk_metadata(self):
config = dict()
fdroidserver.common.fill_config_defaults(config)
......
......@@ -212,8 +212,6 @@ git clean -fdx
# stick with known working commit, in case future commits break things for this code
git reset --hard fea54e1161d5eb9eb1a54e26253ef84d3ab63705
if [ -d $ANDROID_HOME/platforms/android-23 && -d $ANDROID_HOME/build-tools/23.0.3 ]; then
echo "build_tools = '`ls -1 $ANDROID_HOME/build-tools/ | sort -n | tail -1`'" > config.py
echo "force_build_tools = True" >> config.py
$fdroid build --verbose org.fdroid.ci.test.app:300
else
echo 'WARNING: Skipping "fdroid build" test since android-23 is missing!'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment