| 1 | apply plugin: 'com.android.application' |
| 2 | |
| 3 | repositories { |
| 4 | mavenCentral() |
| 5 | google() |
| 6 | } |
| 7 | |
| 8 | configurations { |
| 9 | compile.exclude module: 'support-v4' |
| 10 | } |
| 11 | |
| 12 | configurations.all { |
| 13 | exclude group: 'com.google.firebase', module: 'firebase-core' |
| 14 | exclude group: 'androidx.recyclerview', module: 'recyclerview' |
| 15 | } |
| 16 | |
| 17 | dependencies { |
| 18 | implementation project(':TMessagesProj') |
| 19 | implementation 'androidx.multidex:multidex:2.0.1' |
| 20 | coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' |
| 21 | implementation files('../TMessagesProj/libs/libgsaverification-client.aar') |
| 22 | |
| 23 | implementation "com.microsoft.appcenter:appcenter-distribute:3.3.1" |
| 24 | implementation "com.microsoft.appcenter:appcenter-crashes:3.3.1" |
| 25 | } |
| 26 | |
| 27 | android { |
| 28 | compileSdkVersion 33 |
| 29 | buildToolsVersion '33.0.0' |
| 30 | |
| 31 | defaultConfig.applicationId = APP_PACKAGE |
| 32 | |
| 33 | sourceSets.main.jniLibs.srcDirs = ['../TMessagesProj/jni/'] |
| 34 | |
| 35 | lintOptions { |
| 36 | disable 'MissingTranslation' |
| 37 | disable 'ExtraTranslation' |
| 38 | disable 'BlockedPrivateApi' |
| 39 | } |
| 40 | |
| 41 | dexOptions { |
| 42 | jumboMode = true |
| 43 | } |
| 44 | |
| 45 | compileOptions { |
| 46 | sourceCompatibility JavaVersion.VERSION_1_8 |
| 47 | targetCompatibility JavaVersion.VERSION_1_8 |
| 48 | |
| 49 | coreLibraryDesugaringEnabled true |
| 50 | } |
| 51 | |
| 52 | signingConfigs { |
| 53 | debug { |
| 54 | storeFile file("../TMessagesProj/config/release.keystore") |
| 55 | storePassword RELEASE_STORE_PASSWORD |
| 56 | keyAlias RELEASE_KEY_ALIAS |
| 57 | keyPassword RELEASE_KEY_PASSWORD |
| 58 | } |
| 59 | |
| 60 | release { |
| 61 | storeFile file("../TMessagesProj/config/release.keystore") |
| 62 | storePassword RELEASE_STORE_PASSWORD |
| 63 | keyAlias RELEASE_KEY_ALIAS |
| 64 | keyPassword RELEASE_KEY_PASSWORD |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | buildTypes { |
| 69 | HA_private { |
| 70 | debuggable true |
| 71 | jniDebuggable true |
| 72 | signingConfig signingConfigs.debug |
| 73 | applicationIdSuffix ".beta" |
| 74 | minifyEnabled true |
| 75 | multiDexEnabled true |
| 76 | proguardFiles getDefaultProguardFile('proguard-android.txt'), '../TMessagesProj/proguard-rules.pro' |
| 77 | ndk.debugSymbolLevel = 'FULL' |
| 78 | } |
| 79 | HA_public { |
| 80 | debuggable false |
| 81 | jniDebuggable false |
| 82 | signingConfig signingConfigs.debug |
| 83 | applicationIdSuffix ".beta" |
| 84 | minifyEnabled true |
| 85 | multiDexEnabled true |
| 86 | proguardFiles getDefaultProguardFile('proguard-android.txt'), '../TMessagesProj/proguard-rules.pro' |
| 87 | ndk.debugSymbolLevel = 'FULL' |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | sourceSets.HA_private { |
| 92 | manifest.srcFile '../TMessagesProj/config/debug/AndroidManifest.xml' |
| 93 | } |
| 94 | sourceSets.HA_public { |
| 95 | manifest.srcFile '../TMessagesProj/config/debug/AndroidManifest.xml' |
| 96 | } |
| 97 | |
| 98 | flavorDimensions "minApi" |
| 99 | |
| 100 | productFlavors { |
| 101 | bundleAfat { |
| 102 | ndk { |
| 103 | abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" |
| 104 | } |
| 105 | ext { |
| 106 | abiVersionCode = 1 |
| 107 | } |
| 108 | } |
| 109 | bundleAfat_SDK23 { |
| 110 | ndk { |
| 111 | abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" |
| 112 | } |
| 113 | minSdkVersion 23 |
| 114 | ext { |
| 115 | abiVersionCode = 2 |
| 116 | } |
| 117 | } |
| 118 | afat { |
| 119 | ndk { |
| 120 | abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" |
| 121 | } |
| 122 | ext { |
| 123 | abiVersionCode = 9 |
| 124 | } |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | defaultConfig.versionCode = Integer.parseInt(APP_VERSION_CODE) |
| 129 | |
| 130 | applicationVariants.all { variant -> |
| 131 | variant.outputs.all { output -> |
| 132 | outputFileName = "app.apk" |
| 133 | output.versionCodeOverride = defaultConfig.versionCode * 10 + variant.productFlavors.get(0).abiVersionCode |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | variantFilter { variant -> |
| 138 | def names = variant.flavors*.name |
| 139 | if (variant.buildType.name != "release" && !names.contains("afat")) { |
| 140 | setIgnore(true) |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | defaultConfig { |
| 145 | minSdkVersion 19 |
| 146 | targetSdkVersion 31 |
| 147 | versionName APP_VERSION_NAME |
| 148 | ndkVersion "21.4.7075529" |
| 149 | |
| 150 | multiDexEnabled true |
| 151 | |
| 152 | vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi'] |
| 153 | |
| 154 | externalNativeBuild { |
| 155 | cmake { |
| 156 | version '3.10.2' |
| 157 | arguments '-DANDROID_STL=c++_static', '-DANDROID_PLATFORM=android-16', "-j=16" |
| 158 | } |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | buildFeatures { |
| 163 | buildConfig = true |
| 164 | } |
| 165 | |
| 166 | lintOptions { |
| 167 | checkReleaseBuilds false |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | apply plugin: 'com.google.gms.google-services' |
| 172 | |