configure.ac                               |   66 ++++++++++++++++-------------
 distro-configs/Jenkins/android_common.conf |    2 
 2 files changed, 39 insertions(+), 29 deletions(-)

New commits:
commit a6b369c59a97dbbde40233d3ce5467a09131d079
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Jan 25 11:14:52 2023 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Feb 16 20:33:07 2023 +0000

    android: Support NDK 24.x and 25.x, use NDK 25 for Jenkins
    
    NDK 24 dropped support for API versions < 19,
    quoting [1]:
    
    > * Jelly Bean (APIs 16, 17, and 18) is no longer supported. The minimum OS
    >   supported by the NDK is KitKat (API level 19).
    
    Therefore, use API level 19 for these (and unknown) NDKs unless
    anything greater has explicitly been specified using the
    `--with-android-api-level=<VERSION>` autogen switch
    (or is default for the architecture, s. above).
    
    Update the Jenkins config to use NDK 25 for the Android
    builds as discussed in the ESC meeting on 2023-01-26 [2].
    
    [1] https://developer.android.com/ndk/downloads/revision_history
    [2] 
https://lists.freedesktop.org/archives/libreoffice/2023-January/089878.html
    
    Change-Id: Ib8e65f433ee89ff1bc12432722570bf8f9f7ed85
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146135
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/configure.ac b/configure.ac
index a68d8efb52ba..a346bde17e87 100644
--- a/configure.ac
+++ b/configure.ac
@@ -741,8 +741,18 @@ if test -n "$with_android_ndk"; then
     23.*)
         ;;
     *)
-        AC_MSG_WARN([Untested Android NDK version $ANDROID_NDK_VERSION, only 
versions 23.* have been used successfully. Proceed at your own risk.])
-        add_warning "Untested Android NDK version $ANDROID_NDK_VERSION, only 
versions 23.* have been used successfully. Proceed at your own risk."
+        # NDK 24 dropped support for API levels < 19
+        if test "$ANDROID_API_LEVEL" -lt "19"; then
+            ANDROID_API_LEVEL=19
+        fi
+        case $ANDROID_NDK_VERSION in
+        24.*|25.*)
+            ;;
+        *)
+            AC_MSG_WARN([Untested Android NDK version $ANDROID_NDK_VERSION, 
only versions 23.* to 25.* have been used successfully. Proceed at your own 
risk.])
+            add_warning "Untested Android NDK version $ANDROID_NDK_VERSION, 
only versions 23.* to 25.* have been used successfully. Proceed at your own 
risk."
+            ;;
+        esac
         ;;
     esac
 
diff --git a/distro-configs/Jenkins/android_common.conf 
b/distro-configs/Jenkins/android_common.conf
index c5489f36c3e4..54af74b3450a 100644
--- a/distro-configs/Jenkins/android_common.conf
+++ b/distro-configs/Jenkins/android_common.conf
@@ -1,5 +1,5 @@
 --with-android-sdk=$HOME/Android/Sdk
---with-android-ndk=$HOME/Android/Sdk/ndk/23.2.8568313
+--with-android-ndk=$HOME/Android/Sdk/ndk/25.1.8937393
 --with-jdk-home=/etc/alternatives/java_sdk_11
 --enable-android-editing
 CC_FOR_BUILD=/opt/rh/devtoolset-7/root/usr/bin/gcc
commit 7fe6f298131386d80349f2fe46b1f69d31fd4af9
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Jan 25 11:13:15 2023 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Feb 16 20:32:59 2023 +0000

    android: Move android API level check up in configure.ac
    
    No logical change intended. This is in preparation of
    using `ANDROID_API_LEVEL` in the NDK check in a follow-up commit.
    
    Change-Id: I746cae640a57a49efbdefd8ba00dcc1c4edc4ef9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146134
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/configure.ac b/configure.ac
index 6707b808ef18..a68d8efb52ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -686,34 +686,6 @@ fi
 if test -n "$with_android_ndk"; then
     eval ANDROID_NDK_DIR=$with_android_ndk
 
-    # Set up a lot of pre-canned defaults
-
-    if test ! -f $ANDROID_NDK_DIR/RELEASE.TXT; then
-        if test ! -f $ANDROID_NDK_DIR/source.properties; then
-            AC_MSG_ERROR([Unrecognized Android NDK. Missing RELEASE.TXT or 
source.properties file in $ANDROID_NDK_DIR.])
-        fi
-        ANDROID_NDK_VERSION=`sed -n -e 's/Pkg.Revision = //p' 
$ANDROID_NDK_DIR/source.properties`
-    else
-        ANDROID_NDK_VERSION=`cut -f1 -d' ' <$ANDROID_NDK_DIR/RELEASE.TXT`
-    fi
-    if test -z "$ANDROID_NDK_VERSION";  then
-        AC_MSG_ERROR([Failed to determine Android NDK version. Please check 
your installation.])
-    fi
-    case $ANDROID_NDK_VERSION in
-    r9*|r10*)
-        AC_MSG_ERROR([Building for Android requires NDK version >= 23.*])
-        ;;
-    11.1.*|12.1.*|13.1.*|14.1.*|16.*|17.*|18.*|19.*|20.*|21.*|22.*)
-        AC_MSG_ERROR([Building for Android requires NDK version >= 23.*])
-        ;;
-    23.*)
-        ;;
-    *)
-        AC_MSG_WARN([Untested Android NDK version $ANDROID_NDK_VERSION, only 
versions 23.* have been used successfully. Proceed at your own risk.])
-        add_warning "Untested Android NDK version $ANDROID_NDK_VERSION, only 
versions 23.* have been used successfully. Proceed at your own risk."
-        ;;
-    esac
-
     ANDROID_API_LEVEL=16
     if test -n "$with_android_api_level" ; then
         ANDROID_API_LEVEL="$with_android_api_level"
@@ -746,6 +718,34 @@ if test -n "$with_android_ndk"; then
         ANDROID_APP_ABI=x86
     fi
 
+    # Set up a lot of pre-canned defaults
+
+    if test ! -f $ANDROID_NDK_DIR/RELEASE.TXT; then
+        if test ! -f $ANDROID_NDK_DIR/source.properties; then
+            AC_MSG_ERROR([Unrecognized Android NDK. Missing RELEASE.TXT or 
source.properties file in $ANDROID_NDK_DIR.])
+        fi
+        ANDROID_NDK_VERSION=`sed -n -e 's/Pkg.Revision = //p' 
$ANDROID_NDK_DIR/source.properties`
+    else
+        ANDROID_NDK_VERSION=`cut -f1 -d' ' <$ANDROID_NDK_DIR/RELEASE.TXT`
+    fi
+    if test -z "$ANDROID_NDK_VERSION";  then
+        AC_MSG_ERROR([Failed to determine Android NDK version. Please check 
your installation.])
+    fi
+    case $ANDROID_NDK_VERSION in
+    r9*|r10*)
+        AC_MSG_ERROR([Building for Android requires NDK version >= 23.*])
+        ;;
+    11.1.*|12.1.*|13.1.*|14.1.*|16.*|17.*|18.*|19.*|20.*|21.*|22.*)
+        AC_MSG_ERROR([Building for Android requires NDK version >= 23.*])
+        ;;
+    23.*)
+        ;;
+    *)
+        AC_MSG_WARN([Untested Android NDK version $ANDROID_NDK_VERSION, only 
versions 23.* have been used successfully. Proceed at your own risk.])
+        add_warning "Untested Android NDK version $ANDROID_NDK_VERSION, only 
versions 23.* have been used successfully. Proceed at your own risk."
+        ;;
+    esac
+
     case "$with_android_ndk_toolchain_version" in
     clang5.0)
         ANDROID_GCC_TOOLCHAIN_VERSION=4.9

Reply via email to