From 0436ec5b1c75222f51f5e96f1ba1ce9168bbe548 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Sat, 20 May 2017 17:25:30 +0200 Subject: [PATCH] Support GSTREAMER_ROOT_ANDROID env var If GSTREAMER_ROOT_ANDROID is set, try using that for the location of the GStreamer Android tree, but still allow it to be overridden in local gradle properties --- playback/player/android/app/build.gradle | 5 ++++- playback/player/android/gradle.properties | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/playback/player/android/app/build.gradle b/playback/player/android/app/build.gradle index 961c5fb8e5..48b718d6b2 100644 --- a/playback/player/android/app/build.gradle +++ b/playback/player/android/app/build.gradle @@ -19,7 +19,10 @@ android { if (project.hasProperty('gstAndroidRoot')) gstRoot = project.gstAndroidRoot else - throw new GradleException('"gstAndroidRoot" must be defined in your gradle.properties to the top level directory of the unpacked universal GStreamer Android binaries') + gstRoot = System.env.GSTREAMER_ROOT_ANDROID + + if (gstRoot == null) + throw new GradleException('GSTREAMER_ROOT_ANDROID must be set, or "gstAndroidRoot" must be defined in your gradle.properties in the top level directory of the unpacked universal GStreamer Android binaries') arguments "NDK_APPLICATION_MK=src/main/jni/Application.mk", "GSTREAMER_JAVA_SRC_DIR=src/main/java", "GSTREAMER_ROOT_ANDROID=$gstRoot", "GSTREAMER_ASSETS_DIR=src/main/assets" diff --git a/playback/player/android/gradle.properties b/playback/player/android/gradle.properties index a2a6ee4bd2..8334aac80c 100644 --- a/playback/player/android/gradle.properties +++ b/playback/player/android/gradle.properties @@ -16,4 +16,8 @@ # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -gstAndroidRoot=/home/slomo/Projects/gstreamer/head/gst-examples/playback/player/gst-android + +# gstAndroidRoot can be set to point to the unpacked GStreamer android top-level directory +# containing each architecture in subdirectories, or else set the GSTREAMER_ROOT_ANDROID +# environment variable to that location +# gstAndroidRoot=/path/to/gstreamer/android