|
|
|
|
/*
|
|
|
|
|
* *************************************************************************
|
|
|
|
|
* build.gradle.java
|
|
|
|
|
* **************************************************************************
|
|
|
|
|
* Copyright © 2015 VLC authors and VideoLAN
|
|
|
|
|
* Author: Geoffrey Métais
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
|
|
|
|
* ***************************************************************************
|
|
|
|
|
*/
|
|
|
|
|
apply plugin: 'com.android.library'
|
|
|
|
|
apply plugin: 'com.github.dcendents.android-maven'
|
|
|
|
|
|
|
|
|
|
def abi = System.getenv('GRADLE_ABI')?.toLowerCase()
|
|
|
|
|
ext {
|
|
|
|
|
library_version = '0.4'
|
|
|
|
|
repoName = 'LibVLC'
|
|
|
|
|
libraryName = 'Medialibrary-Android'
|
|
|
|
|
lib_artifact = "medialibrary-$abi"
|
|
|
|
|
|
|
|
|
|
libraryDescription = 'Android bindings and API for Medialibrary'
|
|
|
|
|
}
|
|
|
|
|
android {
|
|
|
|
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
|
|
|
|
defaultConfig {
|
|
|
|
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
|
|
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
|
main {
|
|
|
|
|
jni.srcDirs = []
|
|
|
|
|
// Prevent gradle from building native code with ndk; we have our own Makefile for it.
|
|
|
|
|
jniLibs.srcDir 'jni/libs' // Where generated .so files are placed.
|
|
|
|
|
manifest.srcFile 'AndroidManifest.xml'
|
|
|
|
|
java.srcDirs = ['src']
|
|
|
|
|
resources.srcDirs = ['src']
|
|
|
|
|
aidl.srcDirs = ['src']
|
|
|
|
|
renderscript.srcDirs = ['src']
|
|
|
|
|
res.srcDirs = ['res']
|
|
|
|
|
assets.srcDirs = ['assets', 'libcompat/libs/armeabi']
|
|
|
|
|
}
|
|
|
|
|
test {
|
|
|
|
|
java.srcDirs = ['test']
|
|
|
|
|
}
|
|
|
|
|
androidTest {
|
|
|
|
|
java.srcDirs = ['androidTest']
|
|
|
|
|
assets.srcDirs += files("$projectDir/assets/schemas".toString())
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
|
release {
|
|
|
|
|
minifyEnabled false
|
|
|
|
|
proguardFile 'proguard.cfg'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dataBinding {
|
|
|
|
|
enabled = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Make per-variant version code
|
|
|
|
|
libraryVariants.all { variant ->
|
|
|
|
|
//Custom APK name
|
|
|
|
|
variant.outputs.each { output ->
|
|
|
|
|
if (output.outputFileName != null && output.outputFileName.endsWith('.aar')) {
|
|
|
|
|
output.outputFileName = "medialibrary-${abi}-${library_version}.aar"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
clean {
|
|
|
|
|
delete 'build', 'jni/libs', 'jni/obj'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
implementation project(':libvlc')
|
|
|
|
|
api "androidx.legacy:legacy-support-v4:$rootProject.ext.androidxVersion"
|
|
|
|
|
api "androidx.core:core:$rootProject.ext.androidxVersion"
|
|
|
|
|
api "androidx.fragment:fragment:$rootProject.ext.androidxVersion"
|
|
|
|
|
testImplementation "junit:junit:$rootProject.ext.junitVersion"
|
|
|
|
|
implementation project(':tools')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
apply from: '../publish.gradle'
|