LeOS-Genesis/app/build.gradle

167 lines
5.6 KiB
Groovy
Executable File

import com.android.build.OutputFile
apply from: 'variables.gradle'
apply plugin: 'com.android.application'
apply plugin: 'maven-publish'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android'
android {
compileSdkVersion project.ext.compile_sdk_version
ndkVersion project.ext.ndk_version
defaultConfig {
applicationId project.ext.application_id
minSdkVersion project.ext.min_sdk_version
targetSdkVersion project.ext.target_sdk_version
versionCode project.ext.vcode
versionName project.ext.vname
ndk {
debugSymbolLevel project.ext.debugSymbolLevel
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
preDexLibraries project.ext.preDexLibraries
}
buildTypes {
release {
minifyEnabled project.ext.minifyEnabled
shrinkResources project.ext.shrinkResources
proguardFiles getDefaultProguardFile(project.ext.proguard_file), project.ext.proguard_rule
}
}
lintOptions {
checkReleaseBuilds project.ext.checkReleaseBuilds
abortOnError project.ext.abortOnError
}
flavorDimensions project.ext.dimen
productFlavors {
genesis {
dimension project.ext.dimen
}
}
splits {
abi {
enable project.ext.splitEnabled
reset()
include project.ext.abi_x86, project.ext.abi_x86_x64, project.ext.abi_arm64, project.ext.abi_armeabi
}
}
sourceSets {
main {
res.srcDirs = project.ext.resource_directories
}
genesisRelease.root = project.ext.releaseRoot
}
}
dependencies {
/* Android Support Repository dependencies */
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
implementation 'com.google.firebase:firebase-messaging:21.1.0'
implementation 'com.android.support:support-core-utils:28.0.0'
/* Default Libraries */
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.android.material:material:1.4.0-alpha02'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
/* Firefox ABI Splits */
implementation "org.mozilla.components:browser-engine-gecko:73.0.8"
implementation "org.mozilla.components:browser-icons:73.0.9"
implementation "org.mozilla.geckoview:geckoview:87.0.20210318103112"
implementation "org.mozilla.components:concept-fetch:73.0.9"
implementation "org.mozilla.components:concept-base:73.0.9"
implementation 'com.coolerfall:android-http-download-manager:1.6.3'
implementation "org.mozilla.components:support-utils:73.0.9"
/*Crashlytics*/
implementation 'com.flurry.android:analytics:12.4.0@aar'
/* Ads Manager */
implementation 'com.google.android.gms:play-services-ads:20.0.0'
/* Orbot Service */
implementation project(path: ':orbotmanager')
/* Helper Libraries */
implementation files('libs/httpclientandroidlib-1.2.1.jar')
implementation 'com.github.intelligo-systems:slight:1.1.3'
implementation 'com.github.apl-devs:appintro:v4.2.2'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.volley:volley:1.2.0'
implementation 'com.github.instacart.truetime-android:library-extension-rx:3.3'
implementation 'net.zetetic:android-database-sqlcipher:4.4.3@aar'
implementation 'com.github.apl-devs:appintro:v4.2.2'
implementation 'androidx.palette:palette:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
implementation 'com.google.android.material:material:1.2.1'
}
/* Automated APK Generation */
android.applicationVariants.all { variant ->
def buildType = variant.buildType.name
if (buildType == project.ext.buildType) {
def baseVersionCode = project.ext.vcode
variant.outputs.each { output ->
def abi = output.getFilter(OutputFile.ABI)
def versionCodeOverride = baseVersionCode
if (abi == project.ext.abi_x86) {
versionCodeOverride = versionCodeOverride + 3
} else if (abi == project.ext.abi_x86_x64) {
versionCodeOverride = versionCodeOverride + 2
} else if (abi == project.ext.abi_arm64) {
versionCodeOverride = versionCodeOverride + 1
} else if (abi == project.ext.abi_armeabi) {
versionCodeOverride = versionCodeOverride + 0
} else {
throw new RuntimeException(project.ext.abi_unknown + abi)
}
output.versionCodeOverride = versionCodeOverride
}
}
}