android/Bootstrap/Makefile.shared | 4 +- android/source/build.gradle | 18 ++++++------ android/source/src/java/org/libreoffice/FontController.java | 4 -- 3 files changed, 11 insertions(+), 15 deletions(-)
New commits: commit 83b7e5325c2d3b6e37a0bf82affb239772a5ec5b Author: Michael Weghorn <[email protected]> AuthorDate: Mon Nov 17 13:35:48 2025 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Mon Nov 17 20:52:24 2025 +0100 android: Stop calling RecyclerView.setHasFixedSize Stop calling the method RecyclerView.setHasFixedSize meant to allow optimiziations (see doc at [1]), because that is not compatible with the size used in the layout file. This prepares for upcoming commit Change-Id: Id22a2130379fb11372d210049b4f02df29ec52d8 Author: Michael Weghorn <[email protected]> Date: Mon Nov 17 12:56:47 2025 +0100 android: Update com.google.android.material:material to 1.13.0 which would otherwise trigger errors like this one: > Task :lintReportStrippedUIEditingDebug Wrote HTML report to file:///home/michi/development/git/libreoffice-WORKTREE-android/android/source/build/reports/lint-results-strippedUIEditingDebug.html Lint found 4 errors, 1 hint (and 199 errors and 2 hints filtered by baseline lint-baseline.xml) 2 errors/warnings were listed in the baseline file (/home/michi/development/git/libreoffice-WORKTREE-android/android/source/lint-baseline.xml) but not found in the project; perhaps they have been fixed? Lint found 4 errors and 1 hint. First failure: /home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/FontController.java:257: Error: When using `setHasFixedSize() in an RecyclerView, wrap_content cannot be used as a value for size in the scrolling direction. [InvalidSetHasFixedSize from androidx.recyclerview.lint.recyclerview] recyclerView.setHasFixedSize(true); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Task :lintStrippedUIEditingDebug FAILED [1] https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView#setHasFixedSize(boolean) Change-Id: I34b7b88506d549aa38d06e292ce8a6e96057e619 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194105 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/android/source/src/java/org/libreoffice/FontController.java b/android/source/src/java/org/libreoffice/FontController.java index 211b9d6c8b56..1fb600af5d85 100644 --- a/android/source/src/java/org/libreoffice/FontController.java +++ b/android/source/src/java/org/libreoffice/FontController.java @@ -254,14 +254,12 @@ public class FontController implements AdapterView.OnItemSelectedListener { RecyclerView recyclerView = colorPickerLayout.findViewById(R.id.fontColorView); GridLayoutManager gridLayoutManager = new GridLayoutManager(mActivity, 11, GridLayoutManager.VERTICAL, true); - recyclerView.setHasFixedSize(true); recyclerView.setLayoutManager(gridLayoutManager); RecyclerView recyclerView2 = colorPickerLayout.findViewById(R.id.fontColorViewSub); GridLayoutManager gridLayoutManager2 = new GridLayoutManager(mActivity,4); - recyclerView2.setHasFixedSize(true); recyclerView2.addItemDecoration(new RecyclerView.ItemDecoration() { @Override @@ -317,14 +315,12 @@ public class FontController implements AdapterView.OnItemSelectedListener { RecyclerView recyclerView = backColorPickerLayout.findViewById(R.id.fontColorView); GridLayoutManager gridLayoutManager = new GridLayoutManager(mActivity, 11, GridLayoutManager.VERTICAL, true); - recyclerView.setHasFixedSize(true); recyclerView.setLayoutManager(gridLayoutManager); RecyclerView recyclerView2 = backColorPickerLayout.findViewById(R.id.fontColorViewSub); GridLayoutManager gridLayoutManager2 = new GridLayoutManager(mActivity,4); - recyclerView2.setHasFixedSize(true); recyclerView2.addItemDecoration(new RecyclerView.ItemDecoration() { @Override commit 262f52c9d8b2b734bbb53b6649d46a2f0d7d5fe1 Author: Michael Weghorn <[email protected]> AuthorDate: Mon Nov 17 12:42:27 2025 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Mon Nov 17 20:52:16 2025 +0100 android: Update Android Gradle Plugin to 8.13.1 Change-Id: I895eadc9d273efbee5bcf94db03c47dfea6cb871 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194102 Reviewed-by: Michael Weghorn <[email protected]> Tested-by: Jenkins diff --git a/android/source/build.gradle b/android/source/build.gradle index a59b7a176a7e..b39ba0b84df5 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -21,7 +21,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:8.13.0' + classpath 'com.android.tools.build:gradle:8.13.1' } } commit 6a094de27b05aed05a05b323222cdd88309befea Author: Michael Weghorn <[email protected]> AuthorDate: Mon Nov 17 12:53:03 2025 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Mon Nov 17 20:52:10 2025 +0100 android: Stop using deprecated Gradle "space assignment" syntax See [1]: > Currently, there are multiple ways to set a property with Groovy DSL syntax: > > --- > propertyName = value > setPropertyName(value) > setPropertyName value > propertyName(value) > propertyName value > --- > > The latter one, "space-assignment", is a Gradle-specific feature that is > not part of the Groovy language. In regular Groovy, this is just a > method call: propertyName(value), and Gradle generates propertyName > method in the runtime if this method hasn’t been present already. This > feature may be a source of confusion (especially for new users) and adds > an extra layer of complexity for users and the Gradle codebase without > providing any significant value. Sometimes, classes declare methods with > the same name, and these may even have semantics that are different from > a plain assignment. > > These generated methods are now deprecated and will be removed in Gradle > 10.0, and both propertyName value and propertyName(value) will stop > working unless the explicit method propertyName is defined. Use explicit > assignment propertyName = value instead. This addresses warnings seen during the Android Viewer build like: > Configure project : Build file '/home/michi/development/git/libreoffice-WORKTREE-android/android/source/build.gradle': line 19 Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated. This is scheduled to be removed in Gradle 10.0. Use assignment ('url = <value>') instead. Consult the upgrading guide for further information: https://docs.gradle.org/8.13/userguide/upgrading_version_8.html#groovy_space_assignment_syntax at build_7nyveb4ly8p00ms61u72dhwli$_run_closure1$_closure2$_closure4.doCall$original(/home/michi/development/git/libreoffice-WORKTREE-android/android/source/build.gradle:19) (Run with --stacktrace to get the full stack trace of this deprecation warning.) at build_7nyveb4ly8p00ms61u72dhwli$_run_closure1$_closure2.doCall$original(/home/michi/development/git/libreoffice-WORKTREE-android/android/source/build.gradle:18) (Run with --stacktrace to get the full stack trace of this deprecation warning.) [1] https://docs.gradle.org/8.13/userguide/upgrading_version_8.html#groovy_space_assignment_syntax Change-Id: I963b3a1b38912d134619293cd9197f8545ed5515 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194103 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/android/Bootstrap/Makefile.shared b/android/Bootstrap/Makefile.shared index 9d0bd80740e6..b83705978a03 100644 --- a/android/Bootstrap/Makefile.shared +++ b/android/Bootstrap/Makefile.shared @@ -107,8 +107,8 @@ liboSettings.gradle: $(BUILDDIR)/config_build.mk $(BUILDDIR)/config_host.mk \ && echo " liboGitFullCommit = '$(shell cd $(SRCDIR) && git log -1 --format=%H)'" \ && echo "}" \ && echo "android {" \ - && echo " ndkPath '$(ANDROID_NDK_DIR)'" \ - && echo " ndkVersion '$(ANDROID_NDK_VERSION)'" \ + && echo " ndkPath = '$(ANDROID_NDK_DIR)'" \ + && echo " ndkVersion = '$(ANDROID_NDK_VERSION)'" \ && echo "}" \ && echo "android.defaultConfig {" \ && echo " applicationId '$(ANDROID_PACKAGE_NAME)'" \ diff --git a/android/source/build.gradle b/android/source/build.gradle index 9dbf36f6b8e4..a59b7a176a7e 100644 --- a/android/source/build.gradle +++ b/android/source/build.gradle @@ -6,7 +6,7 @@ allprojects { repositories { mavenCentral() maven { - url "https://ipv6.repo1.maven.org/maven2" + url = "https://ipv6.repo1.maven.org/maven2" } google() } @@ -16,7 +16,7 @@ buildscript { repositories { mavenCentral() maven { - url "https://ipv6.repo1.maven.org/maven2" + url = "https://ipv6.repo1.maven.org/maven2" } google() } @@ -42,7 +42,7 @@ base { } android { - namespace 'org.libreoffice' + namespace = 'org.libreoffice' compileSdk 35 buildFeatures { buildConfig = true @@ -87,7 +87,7 @@ android { } } lint { - warningsAsErrors true + warningsAsErrors = true // ignore missing or extra translations, since these are tracked/managed via Weblate disable 'ExtraTranslation', 'MissingTranslation' // don't error-out on external updates (new gradle plugin, library versions @@ -98,7 +98,7 @@ android { // don't fail on pre-existing issues // These should be dealt with at some point, though. // To update lint-baseline.xml, just remove the file and run the build again. - baseline file("lint-baseline.xml") + baseline = file("lint-baseline.xml") // s.a. lint.xml that contains further config } } @@ -124,7 +124,7 @@ extent) // are files read by non-LO code, fontconfig and freetype for now, that doesn't // understand "/assets" paths. task copyUnpackAssets(type: Copy) { - description "copies assets that need to be extracted on the device" + description = "copies assets that need to be extracted on the device" into 'assets/unpack' into('program') { from("${liboInstdir}/${liboEtcFolder}/types") { @@ -163,7 +163,7 @@ task copyUnpackAssets(type: Copy) { } task copyAssets(type: Copy) { - description "copies assets that can be accessed within the installed apk" + description = "copies assets that can be accessed within the installed apk" into 'assets' // include icons, Impress styles and required .ui files @@ -208,7 +208,7 @@ task copyAssets(type: Copy) { } task copyAppResources(type: Copy) { - description "copies documents to make them available as app resources" + description = "copies documents to make them available as app resources" into 'res_generated/raw' from("${liboInstdir}") { includes = ["LICENSE", "NOTICE"]
