mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
Merge branch 'remove-force_build_tools' into 'master'
Remove force_build_tools config option Closes #738 See merge request fdroid/fdroidserver!797
This commit is contained in:
commit
69e4d48924
1
.gitignore
vendored
1
.gitignore
vendored
@ -24,7 +24,6 @@ README.rst
|
|||||||
# files generated by tests
|
# files generated by tests
|
||||||
tmp/
|
tmp/
|
||||||
/tests/repo/icons*
|
/tests/repo/icons*
|
||||||
/tests/repo/latestapps.dat
|
|
||||||
/tests/repo/status
|
/tests/repo/status
|
||||||
|
|
||||||
# files used in manual testing
|
# files used in manual testing
|
||||||
|
@ -36,10 +36,6 @@
|
|||||||
# Build tools version to be used
|
# Build tools version to be used
|
||||||
# build_tools = "28.0.3"
|
# 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
|
# Command or path to binary for running Ant
|
||||||
# ant = "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']
|
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']]
|
cmd = [config['gradle']]
|
||||||
if build.gradleprops:
|
if build.gradleprops:
|
||||||
cmd += ['-P' + kv for kv in 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'),
|
'cachedir': os.path.join(os.getenv('HOME'), '.cache', 'fdroidserver'),
|
||||||
'build_tools': MINIMUM_AAPT_BUILD_TOOLS_VERSION,
|
'build_tools': MINIMUM_AAPT_BUILD_TOOLS_VERSION,
|
||||||
'force_build_tools': False,
|
|
||||||
'java_paths': None,
|
'java_paths': None,
|
||||||
'scan_binary': False,
|
'scan_binary': False,
|
||||||
'ant': "ant",
|
'ant': "ant",
|
||||||
|
@ -6,7 +6,6 @@ import inspect
|
|||||||
import logging
|
import logging
|
||||||
import optparse
|
import optparse
|
||||||
import os
|
import os
|
||||||
import re
|
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
@ -59,22 +58,6 @@ class BuildTest(unittest.TestCase):
|
|||||||
os.makedirs(self.tmpdir)
|
os.makedirs(self.tmpdir)
|
||||||
os.chdir(self.basedir)
|
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):
|
def test_get_apk_metadata(self):
|
||||||
config = dict()
|
config = dict()
|
||||||
fdroidserver.common.fill_config_defaults(config)
|
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
|
# stick with known working commit, in case future commits break things for this code
|
||||||
git reset --hard fea54e1161d5eb9eb1a54e26253ef84d3ab63705
|
git reset --hard fea54e1161d5eb9eb1a54e26253ef84d3ab63705
|
||||||
if [ -d $ANDROID_HOME/platforms/android-23 && -d $ANDROID_HOME/build-tools/23.0.3 ]; then
|
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
|
$fdroid build --verbose org.fdroid.ci.test.app:300
|
||||||
else
|
else
|
||||||
echo 'WARNING: Skipping "fdroid build" test since android-23 is missing!'
|
echo 'WARNING: Skipping "fdroid build" test since android-23 is missing!'
|
||||||
|
Loading…
Reference in New Issue
Block a user