2016-04-06 21:03:10 +08:00
|
|
|
/*
|
|
|
|
* *************************************************************************
|
|
|
|
* 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'
|
2021-03-23 17:05:09 +08:00
|
|
|
apply plugin: "com.vanniktech.maven.publish"
|
2018-11-21 23:33:22 +08:00
|
|
|
|
|
|
|
def abi = System.getenv('GRADLE_ABI')?.toLowerCase()
|
|
|
|
ext {
|
2020-04-16 17:57:58 +08:00
|
|
|
library_version = "$rootProject.ext.medialibraryVersion"
|
2018-11-21 23:33:22 +08:00
|
|
|
}
|
2016-04-06 21:03:10 +08:00
|
|
|
android {
|
2023-06-08 20:50:45 +08:00
|
|
|
namespace 'org.videolan.medialibrary'
|
2020-12-01 16:27:11 +08:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
2022-12-09 14:34:57 +08:00
|
|
|
|
2018-11-02 21:12:58 +08:00
|
|
|
defaultConfig {
|
|
|
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
|
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
2023-12-13 15:46:04 +08:00
|
|
|
compileSdk rootProject.ext.compileSdkVersion
|
2018-11-02 21:12:58 +08:00
|
|
|
}
|
2016-04-06 21:03:10 +08:00
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
jniLibs.srcDir 'jni/libs' // Where generated .so files are placed.
|
|
|
|
manifest.srcFile 'AndroidManifest.xml'
|
2022-07-21 17:25:26 +08:00
|
|
|
java.srcDirs = rootProject.ext.vlcMajorVersion == 4 ? ['src', 'vlc4/src'] : ['src', 'vlc3/src']
|
2016-04-06 21:03:10 +08:00
|
|
|
resources.srcDirs = ['src']
|
|
|
|
aidl.srcDirs = ['src']
|
|
|
|
renderscript.srcDirs = ['src']
|
|
|
|
res.srcDirs = ['res']
|
|
|
|
assets.srcDirs = ['assets', 'libcompat/libs/armeabi']
|
|
|
|
}
|
2018-09-24 21:12:31 +08:00
|
|
|
test {
|
|
|
|
java.srcDirs = ['test']
|
|
|
|
}
|
|
|
|
androidTest {
|
|
|
|
java.srcDirs = ['androidTest']
|
|
|
|
assets.srcDirs += files("$projectDir/assets/schemas".toString())
|
|
|
|
}
|
2016-04-06 21:03:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
|
|
|
proguardFile 'proguard.cfg'
|
|
|
|
}
|
2018-11-27 21:32:13 +08:00
|
|
|
dev {
|
|
|
|
initWith debug
|
|
|
|
matchingFallbacks = ['debug']
|
|
|
|
}
|
2016-04-06 21:03:10 +08:00
|
|
|
}
|
2016-11-30 01:48:51 +08:00
|
|
|
|
|
|
|
dataBinding {
|
|
|
|
enabled = true
|
2023-06-08 20:50:45 +08:00
|
|
|
}
|
|
|
|
buildFeatures {
|
|
|
|
renderScript true
|
|
|
|
aidl true
|
2016-11-30 01:48:51 +08:00
|
|
|
}
|
2018-11-27 00:34:29 +08:00
|
|
|
|
|
|
|
// 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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-04-06 21:03:10 +08:00
|
|
|
}
|
|
|
|
|
2017-03-09 18:12:56 +08:00
|
|
|
clean {
|
|
|
|
delete 'build', 'jni/libs', 'jni/obj'
|
|
|
|
}
|
|
|
|
|
2016-04-06 21:03:10 +08:00
|
|
|
dependencies {
|
2022-05-25 15:45:17 +08:00
|
|
|
releaseImplementation project(':libvlcjni:libvlc')
|
2018-11-27 21:32:13 +08:00
|
|
|
debugImplementation "org.videolan.android:libvlc-all:$rootProject.ext.libvlcVersion"
|
2022-05-25 15:45:17 +08:00
|
|
|
devImplementation project(':libvlcjni:libvlc')
|
2019-07-25 23:09:22 +08:00
|
|
|
api "androidx.legacy:legacy-support-v4:$rootProject.ext.androidxLegacyVersion"
|
2018-12-08 00:44:54 +08:00
|
|
|
api "androidx.core:core:$rootProject.ext.androidxCoreVersion"
|
2020-04-20 21:59:34 +08:00
|
|
|
api "androidx.fragment:fragment:$rootProject.ext.androidxFragmentVersion"
|
2018-09-03 12:48:35 +08:00
|
|
|
testImplementation "junit:junit:$rootProject.ext.junitVersion"
|
2020-04-20 21:59:34 +08:00
|
|
|
testImplementation "org.robolectric:robolectric:4.3.1"
|
2018-11-21 23:33:22 +08:00
|
|
|
}
|
|
|
|
|
2019-12-20 16:19:22 +08:00
|
|
|
apply from: '../buildsystem/publish.gradle'
|