android: Remove generated resources in "clean" make targets

Since these are produced by the build, they should also
be removed in the "clean" target.

Without this, Jenkins CI builds for the upcoming

    Change-Id: Iddbe432519ab3040c83c0e977a584b51d3ef1e5b
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Dec 8 14:57:14 2023 +0100

        android: Make the build fail on new lint warnings

were seen failing, despite the example file no longer being
part of the generated resources since

    commit 1d7b1e2d40
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Nov 15 13:16:26 2023 +0100

        android: Drop "More Info" item in "About" dialog

, but apparently the file was still lingering around
from previous builds.

Build failure/Lint error from CI build [1]:

    > Task :lintReportStrippedUIEditingDebug
    Wrote HTML report to file:///home/tdf/lode/jenkins/workspace/android_arm/android/source/build/reports/lint-results-strippedUIEditingDebug.html

    > Task :lintStrippedUIEditingDebug FAILED
    /home/tdf/lode/jenkins/workspace/android_arm/android/source/lint-baseline.xml: Information: 237 errors and 11 warnings were filtered out because they are listed in the baseline file, lint-baseline.xml
     [LintBaseline]
    /home/tdf/lode/jenkins/workspace/android_arm/android/source/res_generated/raw/example.odt: Error: The resource R.raw.example appears to be unused [UnusedResources]

       Explanation for issues of type "UnusedResources":
       Unused resources make applications larger and slow down builds.

       The unused resource check can ignore tests. If you want to include
       resources that are only referenced from tests, consider packaging them in a
       test source set instead.

       You can include test sources in the unused resource check by setting the
       system property lint.unused-resources.include-tests =true, and to exclude
       them (usually for performance reasons), use
       lint.unused-resources.exclude-tests =true.
       ,

    1 errors, 0 warnings (237 errors, 11 warnings filtered by baseline lint-baseline.xml)

    FAILURE: Build failed with an exception.

This could also be reproduced locally:

After a

    $ touch android/source/res_generated/example.odt

, the above error would on build, and neither `make clean`
nor `make android.clean` would remove the file and thus
fix the problem for subsequent builds.

Add removing the directory to the top-level and Android-specific
clean targets, so either of these commands now takes care of this.

[1] https://ci.libreoffice.org/job/gerrit_android_arm/33845/console

Change-Id: I91c83ce4ddb236d87d7c51f4dcce85e99aae0107
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160612
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn 2023-12-12 12:02:04 +01:00
parent d981ee6256
commit 8d268ed276
2 changed files with 2 additions and 1 deletions

View file

@ -192,6 +192,7 @@ ifeq ($(OS),ANDROID)
rm -fr $(SRCDIR)/android/source/assets
rm -fr $(SRCDIR)/android/source/assets_fullUI
rm -fr $(SRCDIR)/android/source/assets_strippedUI
rm -fr $(SRCDIR)/android/source/res_generated
endif
endif

View file

@ -23,7 +23,7 @@ uninstall:
$(ANDROID_SDK_DIR)/platform-tools/adb uninstall $(ANDROID_PACKAGE_NAME)
clean:
rm -rf assets assets_fullUI assets_strippedUI build jniLibs jniLibs_debug $(OBJLOCAL)
rm -rf assets assets_fullUI assets_strippedUI build jniLibs jniLibs_debug res_generated $(OBJLOCAL)
rm -f native-code.cxx
rm -f liboSettings.gradle