[Android] Revert "Use only one gradle config file"
Jean-Baptiste Kempf
git at videolan.org
Fri Feb 6 16:53:52 CET 2015
vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Feb 6 16:45:00 2015 +0100| [7198aa42def57106342c07538a4fd246d529beb5] | committer: Jean-Baptiste Kempf
Revert "Use only one gradle config file"
This reverts commit 09b17c004333b3d15153a469919f87700909ffa9.
Conflicts:
libvlc/build.gradle
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=7198aa42def57106342c07538a4fd246d529beb5
---
compile-simple.sh | 6 ++++--
libvlc/build.gradle | 14 ++++++++++----
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/compile-simple.sh b/compile-simple.sh
index 82b6f34..301a47e 100755
--- a/compile-simple.sh
+++ b/compile-simple.sh
@@ -89,8 +89,10 @@ if [ ! -f gradle.properties ]; then
echo keyStoreFile=$KEYSTORE_FILE > gradle.properties
echo storealias=androiddebugkey >> gradle.properties
echo storepwd=android >> gradle.properties
- echo sdk=$ANDROID_SDK >> gradle.properties
- echo ndk=$ANDROID_NDK >> gradle.properties
+fi
+if [ ! -f local.properties ]; then
+ echo sdk.dir=$ANDROID_SDK > local.properties
+ echo ndk.dir=$ANDROID_NDK >> local.properties
fi
####################
diff --git a/libvlc/build.gradle b/libvlc/build.gradle
index f45f1f3..b78e634 100644
--- a/libvlc/build.gradle
+++ b/libvlc/build.gradle
@@ -12,8 +12,11 @@ task buildDebugARM(type:Exec) {
ndk.dir=/home/<username>/SDK/android-ndk-r10b
*/
if (System.getenv('ANDROID_SDK') == null || System.getenv('ANDROID_NDK') == null) {
- environment 'ANDROID_NDK', ndk
- environment 'ANDROID_SDK', sdk
+ Properties properties = new Properties()
+ properties.load(project.rootProject.file('local.properties').newDataInputStream())
+ environment 'ANDROID_NDK', properties.getProperty('ndk.dir')
+ environment 'ANDROID_SDK', properties.getProperty('sdk.dir')
+ environment 'ANDROID_ABI', properties.getProperty('abi')
}
workingDir '..'
commandLine './compile-libvlc.sh'
@@ -22,8 +25,11 @@ task buildDebugARM(type:Exec) {
task buildDebugx86(type:Exec) {
if (System.getenv('ANDROID_SDK') == null || System.getenv('ANDROID_NDK') == null) {
- environment 'ANDROID_NDK', ndk
- environment 'ANDROID_SDK', sdk
+ Properties properties = new Properties()
+ properties.load(project.rootProject.file('local.properties').newDataInputStream())
+ environment 'ANDROID_NDK', properties.getProperty('ndk.dir')
+ environment 'ANDROID_SDK', properties.getProperty('sdk.dir')
+ environment 'ANDROID_ABI', properties.getProperty('abi')
}
workingDir '..'
commandLine './compile-libvlc.sh'
More information about the Android
mailing list