[Android] Use only one gradle config file
Geoffrey Métais
git at videolan.org
Fri Feb 6 15:37:49 CET 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Feb 6 11:59:41 2015 +0100| [09b17c004333b3d15153a469919f87700909ffa9] | committer: Geoffrey Métais
Use only one gradle config file
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=09b17c004333b3d15153a469919f87700909ffa9
---
compile-simple.sh | 6 ++----
libvlc/build.gradle | 17 +++++------------
2 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/compile-simple.sh b/compile-simple.sh
index 301a47e..82b6f34 100755
--- a/compile-simple.sh
+++ b/compile-simple.sh
@@ -89,10 +89,8 @@ if [ ! -f gradle.properties ]; then
echo keyStoreFile=$KEYSTORE_FILE > gradle.properties
echo storealias=androiddebugkey >> gradle.properties
echo storepwd=android >> gradle.properties
-fi
-if [ ! -f local.properties ]; then
- echo sdk.dir=$ANDROID_SDK > local.properties
- echo ndk.dir=$ANDROID_NDK >> local.properties
+ echo sdk=$ANDROID_SDK >> gradle.properties
+ echo ndk=$ANDROID_NDK >> gradle.properties
fi
####################
diff --git a/libvlc/build.gradle b/libvlc/build.gradle
index 100bfa6..a06ff4f 100644
--- a/libvlc/build.gradle
+++ b/libvlc/build.gradle
@@ -11,29 +11,22 @@ task buildDebug(type:Exec) {
ndk.dir=/home/<username>/SDK/android-ndk-r10b
*/
if (System.getenv('ANDROID_SDK') == null || System.getenv('ANDROID_NDK') == null) {
- 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')
+ environment 'ANDROID_NDK', ndk
+ environment 'ANDROID_SDK', sdk
}
workingDir '..'
commandLine './compile-libvlc.sh'
-// args('jni')
}
task buildRelease(type:Exec) {
if (System.getenv('ANDROID_SDK') == null || System.getenv('ANDROID_NDK') == null) {
- 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')
+ environment 'ANDROID_NDK', ndk
+ environment 'ANDROID_SDK', sdk
}
workingDir '..'
commandLine './compile-libvlc.sh'
-// args('jni', 'release')
+ args('--release')
}
android {
More information about the Android
mailing list