summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2019-07-04 08:55:17 +0200
committerJan Holesovsky <kendy@collabora.com>2019-07-09 09:32:43 +0200
commitc22f3afb7b9c431904fec143a5f98eb362328402 (patch)
treeecaf2a80ee7d128bd70d1773acd9d057d849708c
parent45bb41b169844ed913b42833a1c130c2d92678ec (diff)
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
-rw-r--r--android/source/build.gradle5
-rw-r--r--android/source/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--configure.ac12
-rw-r--r--external/owncloud-android-lib/build.gradle11
4 files changed, 18 insertions, 12 deletions
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()
+ }
+}