gstreamer/subprojects/gst-examples/webrtc/android/app/build.gradle

68 lines
2.1 KiB
Groovy
Raw Normal View History

2018-11-07 13:32:31 +00:00
apply plugin: 'com.android.application'
android {
compileSdkVersion 32
2018-11-07 13:32:31 +00:00
defaultConfig {
applicationId "org.freedesktop.gstreamer.webrtc"
minSdkVersion 21
targetSdkVersion 32
2018-11-07 13:32:31 +00:00
versionCode 1
versionName "1.0"
archivesBaseName = "$applicationId-v$versionCode"
2018-11-07 13:32:31 +00:00
externalNativeBuild {
cmake {
2018-11-07 13:32:31 +00:00
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 "-DCMAKE_BUILD_TYPE=Release", "-DANDROID_STL=c++_shared", "-DGStreamer_JAVA_SRC_DIR=java", "-DGSTREAMER_ROOT_ANDROID=$gstRoot", "-DGStreamer_ASSETS_DIR=assets"
2018-11-07 13:32:31 +00:00
targets "gstwebrtc"
// All archs except MIPS and MIPS64 are supported
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
2018-11-07 13:32:31 +00:00
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path 'src/main/jni/CMakeLists.txt'
2018-11-07 13:32:31 +00:00
}
}
lintOptions {
abortOnError false
}
ndkVersion '25.2.9519653'
2018-11-07 13:32:31 +00:00
}
afterEvaluate {
if (project.hasProperty('compileDebugJavaWithJavac'))
compileDebugJavaWithJavac.dependsOn 'externalNativeBuildDebug'
if (project.hasProperty('compileReleaseJavaWithJavac'))
compileReleaseJavaWithJavac.dependsOn 'externalNativeBuildRelease'
2018-11-07 13:32:31 +00:00
}
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:23.1.1'
2018-11-07 13:32:31 +00:00
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
}