mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-05 06:50:10 +01:00
build: fix build/ and .gradle/ removal after cleaning
An app may not have a top-level build.gradle file, while Gradle still creates top-level .gradle/ directory. When build.gradle is absent, fdroidserver will not remove .gradle/, scanner will find binaries in it and fail the whole build. Fix this by also checking for settings.gradle file (should always exist in the top-level directory) in addition to build.gradle.
This commit is contained in:
parent
d44d48285b
commit
aad4bd89d8
@ -498,7 +498,7 @@ def build_local(app, build, vcs, build_dir, output_dir, log_dir, srclib_dir, ext
|
||||
if f in files:
|
||||
os.remove(os.path.join(root, f))
|
||||
|
||||
if 'build.gradle' in files:
|
||||
if any(f in files for f in ['build.gradle', 'settings.gradle']):
|
||||
# Even when running clean, gradle stores task/artifact caches in
|
||||
# .gradle/ as binary files. To avoid overcomplicating the scanner,
|
||||
# manually delete them, just like `gradle clean` should have removed
|
||||
|
Loading…
Reference in New Issue
Block a user