mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-02 09:10:11 +02:00
parent
3bc246ccad
commit
d898ad0412
@ -232,6 +232,8 @@ def scan_source(build_dir, build=metadata.Build()):
|
||||
count += handleproblem('shared library', path_in_build_dir, filepath)
|
||||
elif ext == 'a':
|
||||
count += handleproblem('static library', path_in_build_dir, filepath)
|
||||
elif ext == 'aar':
|
||||
count += handleproblem(_('Android AAR library'), path_in_build_dir, filepath)
|
||||
elif ext == 'class':
|
||||
count += handleproblem('Java compiled class', path_in_build_dir, filepath)
|
||||
elif ext == 'apk':
|
||||
@ -243,10 +245,7 @@ def scan_source(build_dir, build=metadata.Build()):
|
||||
if curfile == 'gradle-wrapper.jar':
|
||||
removeproblem('gradle-wrapper.jar', path_in_build_dir, filepath)
|
||||
else:
|
||||
warnproblem('JAR file', path_in_build_dir)
|
||||
|
||||
elif ext == 'aar':
|
||||
warnproblem('AAR file', path_in_build_dir)
|
||||
count += handleproblem('JAR file', path_in_build_dir, filepath)
|
||||
|
||||
elif ext == 'java':
|
||||
if not os.path.isfile(filepath):
|
||||
|
@ -141,7 +141,8 @@ class BuildTest(unittest.TestCase):
|
||||
build = fdroidserver.metadata.Build()
|
||||
build.commit = '1.0'
|
||||
build.output = app.id + '.apk'
|
||||
build.scanignore = ['baz.so']
|
||||
build.scandelete = ['baz.so']
|
||||
build.scanignore = ['foo.aar']
|
||||
build.versionCode = '1'
|
||||
build.versionName = '1.0'
|
||||
vcs = mock.Mock()
|
||||
@ -186,11 +187,11 @@ class BuildTest(unittest.TestCase):
|
||||
force=False, onserver=False, refresh=False
|
||||
)
|
||||
|
||||
self.assertTrue(os.path.exists('baz.so'))
|
||||
self.assertTrue(os.path.exists('foo.aar'))
|
||||
self.assertTrue(os.path.isdir('build'))
|
||||
self.assertTrue(os.path.isdir('reports'))
|
||||
self.assertTrue(os.path.isdir('target'))
|
||||
self.assertFalse(os.path.exists('baz.so'))
|
||||
self.assertFalse(os.path.exists('bin'))
|
||||
self.assertFalse(os.path.exists('build/reports'))
|
||||
self.assertFalse(os.path.exists('gen'))
|
||||
|
@ -99,7 +99,7 @@ class ScannerTest(unittest.TestCase):
|
||||
build = fdroidserver.metadata.Build()
|
||||
build.commit = '1.0'
|
||||
build.output = app.id + '.apk'
|
||||
build.scanignore = ['baz.so']
|
||||
build.scanignore = ['baz.so', 'foo.aar']
|
||||
build.versionCode = '1'
|
||||
build.versionName = '1.0'
|
||||
vcs = mock.Mock()
|
||||
|
Loading…
Reference in New Issue
Block a user