/* * Copyright (C) 2022 E FOUNDATION * * 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 3 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, see . */ plugins { id 'com.android.application' id 'kotlin-android' id 'kotlin-kapt' } android { compileSdkVersion buildConfig.compileSdk defaultConfig { applicationId "foundation.e.advancedprivacy" minSdkVersion buildConfig.minSdk targetSdkVersion buildConfig.targetSdk versionCode buildConfig.version.code versionName buildConfig.version.name testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" manifestPlaceholders = [ persistent: "false", mainActivityIntentFilterCategory: "android.intent.category.LAUNCHER" ] resValue("string", "mapbox_key", MAPBOX_KEY) } signingConfigs { debug { storeFile rootProject.file(".sign/debug.keystore") storePassword "android" keyAlias "androiddebugkey" keyPassword "android" } // We use test platform keys to sign /e/OS specific debug flavour. eDebug { storeFile rootProject.file(".sign/platform.jks") storePassword "android" keyAlias "platform" keyPassword "android" } } // We define here the OS flavor e, specific for the /e/ OS version, and google, for any // android device. The e or google prefix is then used in resources, dependencies, ... as // expected by the android gradle plugin. flavorDimensions 'os' productFlavors { e { dimension 'os' minSdkVersion 29 targetSdkVersion 32 signingConfig signingConfigs.eDebug } standalone { dimension 'os' applicationIdSuffix '.standalone' minSdkVersion 26 targetSdkVersion 31 manifestPlaceholders = [ persistent: "false", mainActivityIntentFilterCategory: "android.intent.category.LAUNCHER" ] signingConfig signingConfigs.debug } } buildTypes { debug { signingConfig null // Set signing config to null as we use signingConfig per variant. } release { manifestPlaceholders = [ persistent: "true", mainActivityIntentFilterCategory: "android.intent.category.INFO" ] minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } /** * Sets the output name of the variant outputs and also it setup signingConfig based on the product flavor. */ applicationVariants.all { variant -> variant.outputs.all { output -> outputFileName = "Advanced_Privacy-${variant.versionName}-${variant.getFlavorName()}-${variant.buildType.name}.apk" } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } buildFeatures { dataBinding true viewBinding true } lintOptions { disable 'MissingTranslation' } } dependencies { implementation project(':privacymodule-api') standaloneImplementation project(':permissionsstandalone') eImplementation project(':permissionse') implementation project(':fakelocation') eImplementation files('libs/lineage-sdk.jar') implementation project(':trackers') implementation 'foundation.e:privacymodule.tor:1.3.0-orbot-16.6.2' implementation 'foundation.e:elib:0.0.1-alpha11' implementation ( Libs.Kotlin.stdlib, Libs.AndroidX.coreKtx, Libs.AndroidX.appCompat, Libs.AndroidX.Fragment.fragmentKtx, Libs.AndroidX.Lifecycle.runtime, Libs.AndroidX.Lifecycle.viewmodel, Libs.AndroidX.work, Libs.material, Libs.Retrofit.retrofit, Libs.Retrofit.scalars, Libs.MapBox.sdk, Libs.mpAndroidCharts ) debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1' testImplementation 'junit:junit:4.+' } static def log(Object val) { println("[GradleRepository]: " + val) }