[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 2 commits - android/source configure.ac external/owncloud-android-lib

Jan Holesovsky (via logerrit) logerrit at kemper.freedesktop.org
Tue Jul 9 07:39:05 UTC 2019


 android/source/build.gradle                             |    5 +-
 android/source/gradle/wrapper/gradle-wrapper.properties |    2 -
 configure.ac                                            |   27 +++++++++++-----
 external/owncloud-android-lib/build.gradle              |   11 +++++-
 4 files changed, 32 insertions(+), 13 deletions(-)

New commits:
commit dcaeb9bc6d4e7eb9a84635f876b7ce87e2440f8b
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Thu Jul 4 09:06:49 2019 +0200
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Tue Jul 9 09:32:43 2019 +0200

    android: Allow specification of the API level.
    
    Change-Id: Icf33e2703f42a7866ce895437cf5f276066eeebe

diff --git a/configure.ac b/configure.ac
index 78a1a7f3f48d..060c463b0606 100644
--- a/configure.ac
+++ b/configure.ac
@@ -366,6 +366,11 @@ AC_ARG_WITH(android-sdk,
         [Specify location of the Android SDK. Mandatory when building for Android.]),
 ,)
 
+AC_ARG_WITH(android-api-level,
+    AS_HELP_STRING([--with-android-api-level],
+        [Specify the API level when building for Android. Defaults to 16 for ARM and x86 and to 21 for ARM64 and x86-64]),
+,)
+
 ANDROID_NDK_HOME=
 if test -z "$with_android_ndk" -a -e "$SRC_ROOT/external/android-ndk" -a "$build" != "$host"; then
     with_android_ndk="$SRC_ROOT/external/android-ndk"
@@ -402,6 +407,10 @@ if test -n "$with_android_ndk"; then
     esac
 
     ANDROID_API_LEVEL=16
+    if test -n "$with_android_api_level" ; then
+        ANDROID_API_LEVEL="$with_android_api_level"
+    fi
+
     android_cpu=$host_cpu
     ANDROID_ARCH=$android_cpu
     if test $host_cpu = arm; then
@@ -415,7 +424,9 @@ if test -n "$with_android_ndk"; then
         android_gnu_prefix=$android_platform_prefix
         LLVM_TRIPLE=aarch64-none-linux-android
         # minimum android version that supports aarch64
-        ANDROID_API_LEVEL=21
+        if test "$ANDROID_API_LEVEL" -lt "21" ; then
+            ANDROID_API_LEVEL=21
+        fi
         ANDROID_APP_ABI=arm64-v8a
         ANDROID_ARCH=arm64
     elif test $host_cpu = mips; then
@@ -451,6 +462,8 @@ if test -n "$with_android_ndk"; then
         AC_MSG_ERROR([No directory $ANDROID_COMPILER_DIR])
     fi
 
+    AC_MSG_NOTICE([using the Android API level... $ANDROID_API_LEVEL])
+
     # NDK 15 or later toolchain is 64bit-only, except for Windows that we don't support. Using a 64-bit
     # linker is required if you compile large parts of the code with -g. A 32-bit linker just won't
     # manage to link the (app-specific) single huge .so that is built for the app in
commit c22f3afb7b9c431904fec143a5f98eb362328402
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Thu Jul 4 08:55:17 2019 +0200
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Tue Jul 9 09:32:43 2019 +0200

    android: Allow using SDK and NDK directly from the Android Studio.
    
    Just specify:
    
    --with-android-ndk=$HOME/Android/Sdk/ndk-bundle
    --with-android-sdk=$HOME/Android/Sdk
    
    in your autogen.input, install the appropriate components via Android
    Studio and you are done.
    
    Includes support for NDK 19 and bumps the minSdkVersion to 16, because
    that's the lowest that the NDK 19 still supports.
    
    Change-Id: Ic99790b781b9017eb4e642380e230d6f7b49e9b7

diff --git a/android/source/build.gradle b/android/source/build.gradle
index 2fa5dda5b817..a3ac68bf977c 100644
--- a/android/source/build.gradle
+++ b/android/source/build.gradle
@@ -33,8 +33,7 @@ dependencies {
             "unoloader.jar"
     ])
     implementation files("${liboInstdir}/${liboShareJavaFolder}/unoil.jar")
-    debugImplementation(name:'owncloud_android_lib-debug', ext:'aar')
-    releaseImplementation(name:'owncloud_android_lib-release', ext:'aar')
+    implementation(name:'owncloud_android_lib', ext:'aar')
     implementation 'com.android.support:design:27.1.1' // also pulls-in corresponding support libraries
     implementation 'com.android.support.constraint:constraint-layout:1.1.2'
 }
@@ -60,7 +59,7 @@ android {
         strippedUI.assets.srcDirs 'assets_strippedUI'
     }
     defaultConfig {
-        minSdkVersion 14
+        minSdkVersion 16
         targetSdkVersion 26
         vectorDrawables.useSupportLibrary = true
     }
diff --git a/android/source/gradle/wrapper/gradle-wrapper.properties b/android/source/gradle/wrapper/gradle-wrapper.properties
index 1490158923d0..617dcf1065c3 100644
--- a/android/source/gradle/wrapper/gradle-wrapper.properties
+++ b/android/source/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
diff --git a/configure.ac b/configure.ac
index 7dee68eab9a8..78a1a7f3f48d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -371,7 +371,7 @@ if test -z "$with_android_ndk" -a -e "$SRC_ROOT/external/android-ndk" -a "$build
     with_android_ndk="$SRC_ROOT/external/android-ndk"
 fi
 if test -n "$with_android_ndk"; then
-    ANDROID_NDK_HOME=$with_android_ndk
+    eval ANDROID_NDK_HOME=$with_android_ndk
 
     # Set up a lot of pre-canned defaults
 
@@ -393,15 +393,15 @@ if test -n "$with_android_ndk"; then
     11.1.*|12.1.*|13.1.*|14.1.*)
         AC_MSG_ERROR([Building for Android is only supported with NDK versions above 16.x.*])
         ;;
-    16.*)
+    16.*|19.*)
         ;;
     *)
-        AC_MSG_WARN([Untested Android NDK version $ANDROID_NDK_VERSION, only version 16.* have been used successfully. Proceed at your own risk.])
-        add_warning "Untested Android NDK version $ANDROID_NDK_VERSION, only version 16.* have been used successfully. Proceed at your own risk."
+        AC_MSG_WARN([Untested Android NDK version $ANDROID_NDK_VERSION, only version 16.* and 19.* have been used successfully. Proceed at your own risk.])
+        add_warning "Untested Android NDK version $ANDROID_NDK_VERSION, only version 16.* and 19.* have been used successfully. Proceed at your own risk."
         ;;
     esac
 
-    ANDROID_API_LEVEL=14
+    ANDROID_API_LEVEL=16
     android_cpu=$host_cpu
     ANDROID_ARCH=$android_cpu
     if test $host_cpu = arm; then
@@ -517,7 +517,7 @@ if test -z "$with_android_sdk" -a -e "$SRC_ROOT/external/android-sdk-linux" -a "
     with_android_sdk="$SRC_ROOT/external/android-sdk-linux"
 fi
 if test -n "$with_android_sdk"; then
-    ANDROID_SDK_HOME=$with_android_sdk
+    eval ANDROID_SDK_HOME=$with_android_sdk
     PATH="$ANDROID_SDK_HOME/platform-tools:$ANDROID_SDK_HOME/tools:$PATH"
 fi
 AC_SUBST(ANDROID_SDK_HOME)
diff --git a/external/owncloud-android-lib/build.gradle b/external/owncloud-android-lib/build.gradle
index beb627fcc437..7ce565814b82 100644
--- a/external/owncloud-android-lib/build.gradle
+++ b/external/owncloud-android-lib/build.gradle
@@ -2,9 +2,10 @@ apply plugin: 'com.android.library'
 buildscript {
     repositories {
         jcenter()
+        google()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.3.3'
+        classpath 'com.android.tools.build:gradle:3.3.0'
     }
 }
 
@@ -18,7 +19,6 @@ android {
     }
 
     compileSdkVersion 26
-    buildToolsVersion "26.0.1"
 
     defaultConfig {
         minSdkVersion 14
@@ -47,3 +47,10 @@ android {
         }
     }
 }
+
+allprojects {
+    repositories {
+        jcenter()
+        google()
+    }
+}


More information about the Libreoffice-commits mailing list