summaryrefslogtreecommitdiff
path: root/android/source/Makefile
AgeCommit message (Collapse)Author
2023-12-13android: Make the build fail on new lint warningsMichael Weghorn
In order to avoid introducing new lint errors, also run the `lint<buildVariant>` gradle target when building Android Viewer and set the `warningsAsErrors true` lint option. This makes the build fail on (new) lint errors. See [1] for more details. Downgrade missing translations and issues that can "suddenly" appear without any code changes to the app itself to informational, to prevent (CI) builds from suddenly starting to fail just because a new Android Gradle Plugin version or external library becomes available etc. To be able to avoid introducing new issues without having to address all existing ones right now, use a baseline file ("lint-baseline.xml") as described at [2] which lists all existing issues, so they don't result in a failing build. Those should still be looked into at some point. Updating the baseline file can be done by just removing the existing one and running the build again. (Build will create the new baseline file and fail on first run after deleting the file, then find the new file and succeed in subsequent builds.) [1] https://developer.android.com/studio/write/lint [2] https://developer.android.com/studio/write/lint#customize-the-baseline Change-Id: Iddbe432519ab3040c83c0e977a584b51d3ef1e5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160199 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-12-13android: Remove generated resources in "clean" make targetsMichael Weghorn
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 1d7b1e2d4099aac15e695696e6a0640d6e01e23f 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>
2023-11-30android: Remove 'build' dir in 'clean' make targetMichael Weghorn
Add the build dir (`android/source/build`) to the directories to be removed when cleaning. Previously, this was't cleaned, which could be seen e.g. by the fact that a fresh build would result in this warning being shown > Task :compileStrippedUIEditingDebugJavaWithJavac Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. while a make android.clean make android after a full build wouldn't. Change-Id: I00a4f8b1fda9fbefb3b8f806b1997eceded117fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160145 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-04-20android: Stop using ANDROID_SDK_HOME env variableMichael Weghorn
Otherwise, upgrading to Android Gradle Plugin 7.1.3 and gradle 7.2 (which will be done in a follow-up commit) would make the build fail like this: > FAILURE: Build failed with an exception. > > * Where: > Build file '/home/michi/development/git/libreoffice-WORKTREE-for-android-x86/android/source/build.gradle' line: 1 > > * What went wrong: > A problem occurred evaluating root project 'source'. > > Failed to apply plugin 'com.android.internal.application'. > > ANDROID_SDK_HOME is set to the root of your SDK: /home/michi/Android/Sdk > ANDROID_SDK_HOME was meant to be the parent path of the preference folder expected by the Android tools. > It is now deprecated. > > To set a custom preference folder location, use ANDROID_USER_HOME. > > It should NOT be set to the same directory as the root of your SDK. > To set a custom SDK location, use ANDROID_HOME. We don't actually rely on `ANDROID_SDK_HOME` being evaluated by the Android toolchain, but it used to be set in configure.ac, and the value was then assigned to the `sdk.dir` property written to `android/source/local.properties`. Just use a new variable name `ANDROID_SDK_DIR` and keep the mechanism otherwise unchanged for now. Change-Id: I44826621a1342119d40036fb704d8ff1eeed7c77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133178 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2020-09-30android: "make run" works also for debug configurationVasily Melenchuk
In debug mode Android package name is "org.example.libreoffice" and "make run" said that there is no such intent to launch. Change-Id: I6d8eac85dedf3e387a9dd4a228605f79ca0d5aee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103287 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-06-11Make it possible to just build the native code for Android, no Java bitsTor Lillqvist
Change-Id: Ic25b8d72c9e60c0bee04765d51565c2864ec25ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95850 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-01-02android: Avoid building the apk when configured with --enable-android-lok.Jan Holesovsky
Change-Id: I6e82d1c1c00d67f5ff370a7625e33efbb172ca38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86110 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit f4c83939edb9adb9d81a8a442f5449e619df03dd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86131 Tested-by: Jenkins
2018-12-13Introduce --enable-android-editingStephan Bergmann
...to select the experimental ...Editing... Android build variant. (Ignored for non-Android builds, but using libo_FUZZ_ARG_ENABLE anyway, just in case.) Change-Id: I670925ff358039e38edc29db69f48a78d484f133 Reviewed-on: https://gerrit.libreoffice.org/65077 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-07android: drop workarounds for ndk-gdb support (can still run manually)Christian Lohmaier
packing gdbserver into apk conflicts with extractNativeLibs="false", as the gradle pugin compresses it (which could be disabled using aaptOptions), but furthermore it doesn't page-align it, breaking installation. So instead let the user manually push the gdbserver tool to device and remove the hardcoded values that were only there to please the ndk-gdb scripts. Using lldb from within Android Studio is more comfortable anyway :-) Change-Id: I31c3af4847a479c56b3fcd6b5bed114e004bf0d2 Reviewed-on: https://gerrit.libreoffice.org/41950 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-06-23android: show when native-code.py is invoked even for non-verbose buildsMiklos Vajna
Change-Id: I176d140bf5efc090c89cbd3a3699a764abf7107a Reviewed-on: https://gerrit.libreoffice.org/39121 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-10-11migrate android build to gradleChristian Lohmaier
move preparation tasks (creating assets/processing files) from the makefile into the gradle script This allows much easier integration into android-studio (just open android/source with android studio after running make to compile the native library) Change-Id: I9a9d6832797c24a7e195a1c7954cd6d20f5a8496
2015-10-01android: fix make install and don't use ant -quiet by defaultMiklos Vajna
Unlike 'make -s', 'ant -quiet' will stay silent even if there was an error. Change-Id: Iba921d3cde48875f7a6da4c5ba811cab46dfb89f
2015-08-11gbuild/config stop using VERBOSE, use only verbose=tNorbert Thiebaud
configure.ac was setting VERBOSE=YES/NO when really we use verbose=t or verbose= Change-Id: I47aee8d177cb2d788a62ecdbbb9cc3695c2bb299 Reviewed-on: https://gerrit.libreoffice.org/17634 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-06-10Android: add ownCloud library to the build.Jacobo Aragunde Pérez
Library code from https://github.com/jaragunde/owncloud-android-library This patch downloads, builds and installs the library from a tarball uploaded to http://dev-www.libreoffice.org/src/. Change-Id: I28afaea4dabe2dab869b53b1881f4d5a6522943f Reviewed-on: https://gerrit.libreoffice.org/16190 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jacobo Aragunde Pérez <jaragunde@igalia.com>
2015-05-21Let's simplify the paths and be less 'experimental'Tor Lillqvist