2022-09-01 18:32:50 +02:00
|
|
|
import com.android.build.OutputFile
|
2022-04-29 21:17:21 +02:00
|
|
|
|
2022-03-29 21:55:20 +02:00
|
|
|
plugins {
|
|
|
|
id "com.jetbrains.python.envs" version "0.0.26"
|
|
|
|
}
|
2021-05-14 14:43:40 +02:00
|
|
|
|
2021-04-18 10:37:16 +02:00
|
|
|
apply plugin: 'com.android.application'
|
2022-03-29 21:55:20 +02:00
|
|
|
apply from: 'variables.gradle'
|
2021-01-18 11:07:12 +01:00
|
|
|
apply plugin: 'kotlin-android'
|
2020-01-24 16:23:31 +01:00
|
|
|
|
2022-03-29 21:55:20 +02:00
|
|
|
|
2020-01-24 16:23:31 +01:00
|
|
|
android {
|
2021-05-10 17:37:53 +02:00
|
|
|
|
2021-04-18 10:37:16 +02:00
|
|
|
compileSdkVersion project.ext.compile_sdk_version
|
|
|
|
ndkVersion project.ext.ndk_version
|
2020-02-28 19:10:00 +01:00
|
|
|
|
2022-09-01 18:32:50 +02:00
|
|
|
|
2020-01-24 16:23:31 +01:00
|
|
|
defaultConfig {
|
2021-04-18 10:37:16 +02:00
|
|
|
applicationId project.ext.application_id
|
|
|
|
minSdkVersion project.ext.min_sdk_version
|
|
|
|
targetSdkVersion project.ext.target_sdk_version
|
2021-05-10 17:37:53 +02:00
|
|
|
versionCode project.ext.vcode
|
|
|
|
versionName project.ext.vname
|
|
|
|
ndk {
|
|
|
|
debugSymbolLevel project.ext.debugSymbolLevel
|
|
|
|
}
|
2020-01-24 16:23:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
2021-05-10 17:37:53 +02:00
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled project.ext.minifyEnabled
|
|
|
|
shrinkResources project.ext.shrinkResources
|
|
|
|
proguardFiles getDefaultProguardFile(project.ext.proguard_file), project.ext.proguard_rule
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-24 16:23:31 +01:00
|
|
|
|
|
|
|
flavorDimensions project.ext.dimen
|
|
|
|
|
|
|
|
productFlavors {
|
2022-04-29 21:17:21 +02:00
|
|
|
orion {
|
2021-04-18 10:37:16 +02:00
|
|
|
dimension project.ext.dimen
|
2020-01-24 16:23:31 +01:00
|
|
|
}
|
2021-05-10 17:37:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
splits {
|
|
|
|
abi {
|
2022-02-18 21:45:24 +01:00
|
|
|
enable project.ext.splitEnabled
|
2022-04-29 21:17:21 +02:00
|
|
|
|
|
|
|
reset()
|
|
|
|
|
2021-05-10 17:37:53 +02:00
|
|
|
include project.ext.abi_x86, project.ext.abi_x86_x64, project.ext.abi_arm64, project.ext.abi_armeabi
|
2020-01-24 16:23:31 +01:00
|
|
|
}
|
2020-10-20 16:55:08 +02:00
|
|
|
}
|
2022-02-18 21:45:24 +01:00
|
|
|
bundle {
|
|
|
|
abi {
|
|
|
|
enableSplit = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-10-20 16:55:08 +02:00
|
|
|
sourceSets {
|
|
|
|
main {
|
2021-04-18 10:37:16 +02:00
|
|
|
res.srcDirs = project.ext.resource_directories
|
2020-01-24 16:23:31 +01:00
|
|
|
}
|
2020-02-28 19:10:00 +01:00
|
|
|
|
2022-04-29 21:17:21 +02:00
|
|
|
orionRelease.root = project.ext.releaseRoot
|
2020-01-24 16:23:31 +01:00
|
|
|
}
|
2022-12-08 13:29:02 +01:00
|
|
|
namespace 'com.example.myapplication'
|
2020-01-24 16:23:31 +01:00
|
|
|
}
|
|
|
|
dependencies {
|
2022-03-29 21:55:20 +02:00
|
|
|
|
2022-04-02 01:13:29 +02:00
|
|
|
/* File Support Dependencies */
|
|
|
|
|
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
|
|
implementation files('libs/httpclientandroidlib-1.2.1.jar')
|
2022-03-29 21:55:20 +02:00
|
|
|
|
2022-04-02 01:13:29 +02:00
|
|
|
/* Android Support Repository Dependencies */
|
2022-03-29 21:55:20 +02:00
|
|
|
|
2022-04-02 01:13:29 +02:00
|
|
|
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
|
|
|
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
|
2022-12-08 13:29:02 +01:00
|
|
|
implementation 'com.google.android.material:material:1.7.0'
|
|
|
|
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.7.20'
|
|
|
|
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10'
|
2022-04-02 01:13:29 +02:00
|
|
|
implementation 'org.apache.commons:commons-text:1.3'
|
2022-12-08 13:29:02 +01:00
|
|
|
implementation 'androidx.work:work-runtime-ktx:2.8.0-beta02'
|
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
2022-04-02 01:13:29 +02:00
|
|
|
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
|
|
|
|
implementation 'androidx.preference:preference-ktx:1.2.0'
|
|
|
|
implementation 'com.android.support:support-annotations:29.0.0'
|
2022-12-08 13:29:02 +01:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.5.1'
|
2022-03-29 21:55:20 +02:00
|
|
|
|
|
|
|
/* Firefox ABI Splits */
|
|
|
|
|
2022-12-08 13:29:02 +01:00
|
|
|
implementation "androidx.compose.foundation:foundation:1.3.1"
|
2022-03-29 21:55:20 +02:00
|
|
|
implementation "org.mozilla.components:browser-engine-gecko:100.0.20220327143103"
|
|
|
|
implementation "org.mozilla.components:support-rusthttp:100.0.20220327143103"
|
|
|
|
implementation "org.mozilla.components:support-rustlog:100.0.20220327143103"
|
|
|
|
implementation "org.mozilla.components:browser-icons:100.0.20220327143103"
|
|
|
|
implementation "org.mozilla.components:concept-fetch:100.0.20220327143103"
|
|
|
|
implementation "org.mozilla.components:concept-base:100.0.20220327143103"
|
|
|
|
implementation "org.mozilla.components:support-utils:100.0.20220327143103"
|
|
|
|
|
2022-04-02 01:13:29 +02:00
|
|
|
/* Analytics */
|
2021-04-18 10:37:16 +02:00
|
|
|
|
2022-03-14 21:55:07 +01:00
|
|
|
implementation 'com.flurry.android:analytics:13.1.0@aar'
|
2020-01-24 16:23:31 +01:00
|
|
|
|
2021-04-18 10:37:16 +02:00
|
|
|
/* Ads Manager */
|
|
|
|
|
2022-12-08 13:29:02 +01:00
|
|
|
implementation 'com.applovin:applovin-sdk:11.5.5'
|
2022-08-25 14:37:33 +02:00
|
|
|
implementation 'com.applovin.mediation:adcolony-adapter:4.8.0.2'
|
2022-08-22 15:51:56 +02:00
|
|
|
implementation 'com.adcolony:sdk:4.8.0'
|
2022-08-25 14:37:33 +02:00
|
|
|
implementation 'com.facebook.android:audience-network-sdk:6.8.0'
|
|
|
|
implementation 'com.applovin.mediation:facebook-adapter:6.8.0.12'
|
2021-04-18 10:37:16 +02:00
|
|
|
|
|
|
|
/* Orbot Service */
|
2021-05-05 15:37:08 +02:00
|
|
|
implementation project(path: ':orbotmanager')
|
2020-01-24 16:23:31 +01:00
|
|
|
|
2021-04-18 10:37:16 +02:00
|
|
|
/* Helper Libraries */
|
2022-04-02 01:13:29 +02:00
|
|
|
|
2022-12-08 13:29:02 +01:00
|
|
|
implementation "android.arch.lifecycle:extensions:1.1.1"
|
|
|
|
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
|
2021-06-03 16:44:08 +02:00
|
|
|
implementation 'com.coolerfall:android-http-download-manager:1.6.3'
|
2021-10-03 13:22:57 +02:00
|
|
|
implementation 'com.android.volley:volley:1.2.1'
|
2021-07-07 20:42:42 +02:00
|
|
|
implementation "net.zetetic:android-database-sqlcipher:4.4.3"
|
2022-02-09 15:20:58 +01:00
|
|
|
implementation "androidx.sqlite:sqlite-ktx:2.2.0"
|
2021-07-07 20:42:42 +02:00
|
|
|
implementation 'androidx.palette:palette-ktx:1.0.0'
|
2022-04-02 01:13:29 +02:00
|
|
|
implementation 'org.jsoup:jsoup:1.13.1'
|
2022-03-29 21:55:20 +02:00
|
|
|
|
2020-01-24 16:23:31 +01:00
|
|
|
}
|
2021-05-10 17:37:53 +02:00
|
|
|
|
2022-04-29 21:17:21 +02:00
|
|
|
/* Automated APK Generation */
|
|
|
|
|
2022-09-01 18:32:50 +02:00
|
|
|
android.applicationVariants.all { variant ->
|
2022-04-29 21:17:21 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
2022-09-01 18:32:50 +02:00
|
|
|
}
|
2021-05-10 17:37:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-03-29 21:55:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|