mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
89 lines
2.5 KiB
Groovy
89 lines
2.5 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
compileSdkVersion 32
|
|
|
|
defaultConfig {
|
|
applicationId "org.freedesktop.gstreamer.vulkan.vulkan_1"
|
|
minSdkVersion 24
|
|
targetSdkVersion 32
|
|
versionCode 1
|
|
versionName "1.0"
|
|
archivesBaseName = "$applicationId-v$versionCode"
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
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_ROOT_ANDROID=$gstRoot"
|
|
|
|
targets "vulkan-1"
|
|
|
|
// All archs except MIPS and MIPS64 are supported
|
|
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
sourceSets {
|
|
main {
|
|
manifest.srcFile 'AndroidManifest.xml'
|
|
java.srcDirs = ['src']
|
|
resources.srcDirs = ['src']
|
|
aidl.srcDirs = ['src']
|
|
renderscript.srcDirs = ['src']
|
|
res.srcDirs = ['res']
|
|
assets.srcDirs = ['assets']
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
path 'jni/CMakeLists.txt'
|
|
}
|
|
}
|
|
ndkVersion '25.2.9519653'
|
|
}
|
|
|
|
afterEvaluate {
|
|
if (project.hasProperty('compileDebugJavaWithJavac'))
|
|
project.compileDebugJavaWithJavac.dependsOn 'externalNativeBuildDebug'
|
|
if (project.hasProperty('compileReleaseJavaWithJavac'))
|
|
project.compileReleaseJavaWithJavac.dependsOn 'externalNativeBuildRelease'
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
testImplementation 'junit:junit:4.12'
|
|
implementation 'com.android.support:appcompat-v7:23.1.1'
|
|
}
|
|
|
|
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
google()
|
|
}
|
|
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:7.1.0'
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
jcenter()
|
|
google()
|
|
}
|