mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-16 12:10:29 +03:00
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.
This commit is contained in:
parent
df6cf52009
commit
08f724651e
5 changed files with 0 additions and 29 deletions
|
|
@ -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!'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue