You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
135 lines
4.3 KiB
135 lines
4.3 KiB
|
7 years ago
|
apply plugin: 'com.android.application'
|
||
|
|
apply plugin: 'kotlin-android'
|
||
|
|
apply plugin: 'kotlin-android-extensions'
|
||
|
|
android {
|
||
|
|
packagingOptions {
|
||
|
|
exclude 'META-INF/main.kotlin_module'
|
||
|
|
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
|
||
|
|
pickFirst 'lib/armeabi/libc++_shared.so'
|
||
|
|
pickFirst 'lib/arm64-v8a/libc++_shared.so'
|
||
|
|
pickFirst 'lib/x86/libc++_shared.so'
|
||
|
|
pickFirst 'lib/x86_64/libc++_shared.so'
|
||
|
|
}
|
||
|
|
|
||
|
|
dexOptions {
|
||
|
|
maxProcessCount 8
|
||
|
|
javaMaxHeapSize "4g"
|
||
|
|
preDexLibraries true
|
||
|
|
}
|
||
|
|
|
||
|
|
dataBinding {
|
||
|
|
enabled = true
|
||
|
|
}
|
||
|
|
|
||
|
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
||
|
|
|
||
|
|
flavorDimensions "abi"
|
||
|
|
|
||
|
|
lintOptions {
|
||
|
|
abortOnError false
|
||
|
|
disable 'MissingTranslation', 'ExtraTranslation'
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
defaultConfig {
|
||
|
|
applicationId rootProject.ext.appId
|
||
|
|
minSdkVersion rootProject.ext.minSdkVersion
|
||
|
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||
|
|
versionCode rootProject.ext.versionCode
|
||
|
|
versionName rootProject.ext.versionName
|
||
|
|
vectorDrawables.useSupportLibrary = true
|
||
|
|
|
||
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||
|
|
}
|
||
|
|
|
||
|
|
signingConfigs {
|
||
|
|
release {
|
||
|
|
/*
|
||
|
|
To set this properties, create file gradle.properties with these 3 props.
|
||
|
|
e.g.
|
||
|
|
keyStoreFile=/home/<username>/.android/debug.keystore
|
||
|
|
storealias=androiddebugkey
|
||
|
|
storepwd=android
|
||
|
|
*/
|
||
|
|
if (project.hasProperty('keyStoreFile')) {
|
||
|
|
storeFile file(project.findProperty('keyStoreFile'))
|
||
|
|
keyAlias project.findProperty('storealias')
|
||
|
|
if (System.getenv('PASSWORD_KEYSTORE') != null && !System.getenv('PASSWORD_KEYSTORE').isEmpty()) {
|
||
|
|
storePassword = System.getenv('PASSWORD_KEYSTORE')
|
||
|
|
keyPassword = System.getenv('PASSWORD_KEYSTORE')
|
||
|
|
} else {
|
||
|
|
storePassword project.findProperty('storepwd')
|
||
|
|
keyPassword project.findProperty('storepwd')
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
buildTypes {
|
||
|
|
release {
|
||
|
|
minifyEnabled false
|
||
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||
|
|
kotlinOptions.freeCompilerArgs = ['-Xno-param-assertions']
|
||
|
|
}
|
||
|
|
signedRelease {
|
||
|
|
initWith release
|
||
|
|
signingConfig = signingConfigs.release
|
||
|
|
matchingFallbacks = ['release']
|
||
|
|
}
|
||
|
|
debug {
|
||
|
|
applicationIdSuffix ".debug"
|
||
|
|
jniDebuggable true
|
||
|
|
multiDexEnabled true
|
||
|
|
}
|
||
|
|
dev {
|
||
|
|
initWith debug
|
||
|
|
matchingFallbacks = ['debug']
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
sourceSets.release {
|
||
|
|
manifest.srcFile 'flavors/release/AndroidManifest.xml'
|
||
|
|
}
|
||
|
|
sourceSets.signedRelease {
|
||
|
|
manifest.srcFile 'flavors/release/AndroidManifest.xml'
|
||
|
|
}
|
||
|
|
|
||
|
|
splits {
|
||
|
|
abi {
|
||
|
|
def isReleaseBuild = false
|
||
|
|
gradle.startParameter.taskNames.find {
|
||
|
|
// Enable split for release builds in different build flavors
|
||
|
|
// (assemblePaidRelease, assembleFreeRelease, etc.).
|
||
|
|
if (it.toLowerCase() ==~ /assemble.*Release/.toLowerCase()) {
|
||
|
|
isReleaseBuild = true
|
||
|
|
return true // break
|
||
|
|
}
|
||
|
|
return false // continue
|
||
|
|
}
|
||
|
|
enable isReleaseBuild
|
||
|
|
reset()
|
||
|
|
include "x86", "x86_64", "armeabi-v7a", "arm64-v8a"
|
||
|
|
// universalApk !isReleaseBuild
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
def abiCodes = ['x86': 5, 'x86_64': 8, 'armeabi-v7a': 4, 'arm64-v8a': 7]
|
||
|
|
// make per-variant version code
|
||
|
|
applicationVariants.all { variant ->
|
||
|
|
//Custom APK name and versionCode
|
||
|
|
variant.outputs.each { output ->
|
||
|
|
def abiName = output.getFilter(com.android.build.OutputFile.ABI) ?: System.getenv('GRADLE_ABI')?.toLowerCase() ?: "all"
|
||
|
|
output.versionCodeOverride = 10000000 + defaultConfig.versionCode + abiCodes.get(abiName, 0)
|
||
|
|
def outputName = "VLC-Android-"
|
||
|
|
outputName += variant.versionName + "-" + abiName + ".apk"
|
||
|
|
output.outputFileName = outputName
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
dependencies {
|
||
|
7 years ago
|
implementation project(':application:vlc-android')
|
||
|
|
implementation project(':application:television')
|
||
|
7 years ago
|
}
|