2018-06-12 16:40:21 +00:00
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "org.freedesktop.gstreamer.tutorials.tutorial_4"
minSdkVersion 15
targetSdkVersion 15
versionCode 1
versionName "1.0"
externalNativeBuild {
ndkBuild {
def gstRoot
if ( project . hasProperty ( 'gstAndroidRoot' ) )
gstRoot = project . gstAndroidRoot
else
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=jni/Application.mk" , "GSTREAMER_JAVA_SRC_DIR=src" , "GSTREAMER_ROOT_ANDROID=$gstRoot" , "GSTREAMER_ASSETS_DIR=src/assets"
targets "tutorial-4"
// All archs except MIPS and MIPS64 are supported
abiFilters 'armeabi-v7a' , 'arm64-v8a' , 'x86'
// x86_64 abis disabled because of https://bugzilla.gnome.org/show_bug.cgi?id=795454
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile ( 'proguard-android.txt' ) , 'proguard-rules.pro'
2018-09-04 05:26:08 +00:00
sourceSets {
2018-06-12 16:40:21 +00:00
main {
manifest . srcFile 'AndroidManifest.xml'
2018-09-04 05:26:08 +00:00
java . srcDirs = [ 'src' ]
2018-06-12 16:40:21 +00:00
resources . srcDirs = [ 'src' ]
aidl . srcDirs = [ 'src' ]
renderscript . srcDirs = [ 'src' ]
res . srcDirs = [ 'res' ]
assets . srcDirs = [ 'assets' ]
}
}
}
}
externalNativeBuild {
ndkBuild {
path 'jni/Android.mk'
}
}
}
afterEvaluate {
2018-09-04 05:26:08 +00:00
if ( project . hasProperty ( 'compileDebugJavaWithJavac' ) )
project . compileDebugJavaWithJavac . dependsOn 'externalNativeBuildDebug'
if ( project . hasProperty ( 'compileReleaseJavaWithJavac' ) )
project . compileReleaseJavaWithJavac . dependsOn 'externalNativeBuildRelease'
2018-06-12 16:40:21 +00:00
}
dependencies {
2018-09-07 02:40:44 +00:00
implementation fileTree ( dir: 'libs' , include: [ '*.jar' ] )
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:23.1.1'
2018-06-12 16:40:21 +00:00
}