mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-17 10:40:12 +02:00
build: make sure .gradle/ is removed at clean
This commit is contained in:
parent
1b8e33f714
commit
80a8a39f6f
@ -543,6 +543,12 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
|||||||
(app['id'], thisbuild['version']), p.output)
|
(app['id'], thisbuild['version']), p.output)
|
||||||
|
|
||||||
for root, dirs, files in os.walk(build_dir):
|
for root, dirs, files in os.walk(build_dir):
|
||||||
|
# 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
|
||||||
|
# the build/ dirs.
|
||||||
|
if '.gradle' in dirs:
|
||||||
|
shutil.rmtree(os.path.join(root, '.gradle'))
|
||||||
# Don't remove possibly necessary 'gradle' dirs if 'gradlew' is not there
|
# Don't remove possibly necessary 'gradle' dirs if 'gradlew' is not there
|
||||||
if 'gradlew' in files:
|
if 'gradlew' in files:
|
||||||
logging.debug("Getting rid of Gradle wrapper stuff in %s" % root)
|
logging.debug("Getting rid of Gradle wrapper stuff in %s" % root)
|
||||||
|
Loading…
Reference in New Issue
Block a user