[Android] Migration to gradle build system

Geoffrey Métais dekans at videolabs.io
Fri Nov 14 14:52:31 CET 2014


Hello everyone,

I just pushed a commit setting up gradle to build VLC for android.

I maintained compile.sh and Makefile, so the old build commands still work *for
now*.
I still recommend you to switch to gradle, and the Android Studio.

But first, to be able to build, you have to fill the gradle.properties file
in project root folder.
For example I set my debug key as release key to test release builds easily:

Here is my gradle.properties:

keyStoreFile=/home/dekans/.android/debug.keystore
storealias=androiddebugkey
storepwd=android


Just change your home directory, you must have the same setup for debug key.

Then, build VLC,
you can do it in CLI:
'*.gradlew installDebug*'

or '*./gradlew assembleDebug*' to only build, and don't install.

You can build all targets at once:
'*./gradlew assemble*'

check '*./gradlew tasks*' to see all available tasks.


You can also build from Android Studio, by clicking 'run'
On the bottom left of the IDE window there is a *build variants* button, I
don't explain you what it's for...
Unfortunately, gradle in AS is not able to read environment variables, so
be sure to set sdk.dir and ndk.dir in local.properties file if you want to
build from Android Studio.

Targets are juste *release* and *debug* for now, I'll merge the Android TV
code and make it a flavor, so we will also have an AndroidTV target
available.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/android/attachments/20141114/72f576e2/attachment-0001.html>


More information about the Android mailing list