| 7 |
| } |
| 8 |
| 9 | configurations { |
| 10 | compile.exclude module: 'support-v4' |
| 11 | } |
| 12 |
| 13 | configurations.all { |
| 14 | exclude group: 'com.google.firebase', module: 'firebase-core' |
| 15 | exclude group: 'androidx.recyclerview', module: 'recyclerview' |
| 16 | } |
| 17 |
| 18 | dependencies { |
| 19 | implementation 'androidx.core:core:1.3.2' |
| 20 | implementation 'androidx.palette:palette:1.0.0' |
| 21 | implementation 'androidx.exifinterface:exifinterface:1.3.2' |
| 22 | implementation 'androidx.dynamicanimation:dynamicanimation:1.0.0' |
| 23 | implementation 'androidx.multidex:multidex:2.0.1' |
| 24 | implementation "androidx.sharetarget:sharetarget:1.1.0" |
| 25 |
| 26 | compileOnly 'org.checkerframework:checker-qual:2.5.2' |
| 27 | compileOnly 'org.checkerframework:checker-compat-qual:2.5.0' |
| 28 | implementation 'com.google.firebase:firebase-messaging:21.0.1' |
| 29 | implementation 'com.google.firebase:firebase-config:20.0.2' |
| 30 | implementation 'com.google.firebase:firebase-datatransport:17.0.10' |
| 31 | implementation 'com.google.firebase:firebase-appindexing:19.1.0' |
| 32 | implementation 'com.google.android.gms:play-services-maps:17.0.0' |
| 33 | implementation 'com.google.android.gms:play-services-auth:19.0.0' |
| 34 | implementation 'com.google.android.gms:play-services-vision:16.2.0' |
| 35 | implementation 'com.google.android.gms:play-services-wearable:17.0.0' |
| 36 | implementation 'com.google.android.gms:play-services-location:17.1.0' |
| 37 | implementation 'com.google.android.gms:play-services-wallet:18.1.2' |
| 38 | implementation "com.microsoft.appcenter:appcenter-distribute:3.3.1" |
| 39 | implementation "com.microsoft.appcenter:appcenter-crashes:3.3.1" |
| 40 | implementation 'com.googlecode.mp4parser:isoparser:1.0.6' |
| 41 | implementation 'com.stripe:stripe-android:2.0.2' |
| 42 | implementation files('libs/libgsaverification-client.aar') |
| 43 |
| 44 | coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.1' |
| 45 | } |
| 46 |
| 47 | android { |
| 48 | compileSdkVersion 30 |
| 49 | buildToolsVersion '30.0.3' |
| 50 | ndkVersion "21.1.6352462" |
| 51 |
| 52 | defaultConfig.applicationId = "org.telegram.messenger" |
| 53 |
| 54 | sourceSets.main.jniLibs.srcDirs = ['./jni/'] |
| 55 |
| 56 | externalNativeBuild { |
| 57 | cmake { |
| 58 | path 'jni/CMakeLists.txt' |
| 59 | } |
| 60 | } |
| 61 |
| 62 | lintOptions { |
| 63 | disable 'MissingTranslation' |
| 64 | disable 'ExtraTranslation' |
| 65 | disable 'BlockedPrivateApi' |
| 66 | } |
| 67 |
| 68 | dexOptions { |
| 69 | jumboMode = true |
| 70 | } |
| 71 |
| 72 | compileOptions { |
| 73 | sourceCompatibility JavaVersion.VERSION_1_8 |
| 74 | targetCompatibility JavaVersion.VERSION_1_8 |
| 75 |
| 76 | coreLibraryDesugaringEnabled true |
| 77 | } |
| 78 |
| 79 | signingConfigs { |
| 80 | debug { |
| 81 | storeFile file("config/release.keystore") |
| 82 | storePassword RELEASE_STORE_PASSWORD |
| 83 | keyAlias RELEASE_KEY_ALIAS |
| 84 | keyPassword RELEASE_KEY_PASSWORD |
| 85 | } |
| 86 |
| 87 | release { |
| 88 | storeFile file("config/release.keystore") |
| 89 | storePassword RELEASE_STORE_PASSWORD |
| 90 | keyAlias RELEASE_KEY_ALIAS |
| 91 | keyPassword RELEASE_KEY_PASSWORD |
| 92 | } |
| 93 | } |
| 94 |
| 95 | buildTypes { |
| 96 | debug { |
| 97 | debuggable true |
| 98 | jniDebuggable true |
| 99 | signingConfig signingConfigs.debug |
| 100 | applicationIdSuffix ".beta" |
| 101 | minifyEnabled false |
| 102 | shrinkResources false |
| 103 | multiDexEnabled true |
| 104 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 105 | ndk.debugSymbolLevel = 'FULL' |
| 106 | } |
| 107 |
| 108 | /*debugAsan { |
| 109 | debuggable true |
| 110 | jniDebuggable true |
| 111 | signingConfig signingConfigs.debug |
| 112 | applicationIdSuffix ".beta" |
| 113 | minifyEnabled true |
| 114 | multiDexEnabled true |
| 115 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 116 |
| 117 | packagingOptions { |
| 118 | doNotStrip "**.so" |
| 119 | } |
| 120 |
| 121 | sourceSets { |
| 122 | main { |
| 123 | jniLibs { |
| 124 | srcDir { |
| 125 | 'jniLibs' |
| 126 | } |
| 127 | } |
| 128 | resources { |
| 129 | srcDir { |
| 130 | 'jniRes' |
| 131 | } |
| 132 | } |
| 133 | } |
| 134 | } |
| 135 | }*/ |
| 136 |
| 137 | HA { |
| 138 | debuggable false |
| 139 | jniDebuggable false |
| 140 | signingConfig signingConfigs.debug |
| 141 | applicationIdSuffix ".beta" |
| 142 | minifyEnabled true |
| 143 | multiDexEnabled true |
| 144 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 145 | ndk.debugSymbolLevel = 'FULL' |
| 146 | } |
| 147 |
| 148 | release { |
| 149 | debuggable false |
| 150 | jniDebuggable false |
| 151 | signingConfig signingConfigs.release |
| 152 | minifyEnabled true |
| 153 | shrinkResources false |
| 154 | multiDexEnabled true |
| 155 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 156 | ndk.debugSymbolLevel = 'FULL' |
| 157 | } |
| 158 | } |
| 159 |
| 160 | sourceSets.debug { |
| 161 | manifest.srcFile 'config/debug/AndroidManifest.xml' |
| 162 | } |
| 163 |
| 164 | /*sourceSets.debugAsan { |
| 165 | manifest.srcFile 'config/debug/AndroidManifest.xml' |
| 166 | }*/ |
| 167 |
| 168 | sourceSets.HA { |
| 169 | manifest.srcFile 'config/debug/AndroidManifest.xml' |
| 170 | } |
| 171 |
| 172 | sourceSets.release { |
| 173 | manifest.srcFile 'config/release/AndroidManifest.xml' |
| 174 | } |
| 175 |
| 176 | flavorDimensions "minApi" |
| 177 |
| 178 | productFlavors { |
| 179 | armv7 { |
| 180 | ndk { |
| 181 | abiFilters "armeabi-v7a" |
| 182 | } |
| 183 | ext { |
| 184 | abiVersionCode = 1 |
| 185 | } |
| 186 | } |
| 187 | x86 { |
| 188 | ndk { |
| 189 | abiFilters "x86" |
| 190 | } |
| 191 | ext { |
| 192 | abiVersionCode = 2 |
| 193 | } |
| 194 | } |
| 195 | armv7_SDK23 { |
| 196 | ndk { |
| 197 | abiFilters "armeabi-v7a" |
| 198 | } |
| 199 | sourceSets.debug { |
| 200 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 201 | } |
| 202 | sourceSets.release { |
| 203 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 204 | } |
| 205 | minSdkVersion 23 |
| 206 | ext { |
| 207 | abiVersionCode = 3 |
| 208 | } |
| 209 | } |
| 210 | x86_SDK23 { |
| 211 | ndk { |
| 212 | abiFilters "x86" |
| 213 | } |
| 214 | sourceSets.debug { |
| 215 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 216 | } |
| 217 | sourceSets.release { |
| 218 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 219 | } |
| 220 | minSdkVersion 23 |
| 221 | ext { |
| 222 | abiVersionCode = 4 |
| 223 | } |
| 224 | } |
| 225 | arm64 { |
| 226 | ndk { |
| 227 | abiFilters "arm64-v8a" |
| 228 | } |
| 229 | ext { |
| 230 | abiVersionCode = 5 |
| 231 | } |
| 232 | } |
| 233 | x64 { |
| 234 | ndk { |
| 235 | abiFilters "x86_64" |
| 236 | } |
| 237 | ext { |
| 238 | abiVersionCode = 6 |
| 239 | } |
| 240 | } |
| 241 | arm64_SDK23 { |
| 242 | ndk { |
| 243 | abiFilters "arm64-v8a" |
| 244 | } |
| 245 | sourceSets.debug { |
| 246 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 247 | } |
| 248 | /*sourceSets.debugAsan { |
| 249 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 250 | }*/ |
| 251 | sourceSets.release { |
| 252 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 253 | } |
| 254 | minSdkVersion 23 |
| 255 | ext { |
| 256 | abiVersionCode = 7 |
| 257 | } |
| 258 | } |
| 259 | x64_SDK23 { |
| 260 | ndk { |
| 261 | abiFilters "x86_64" |
| 262 | } |
| 263 | sourceSets.debug { |
| 264 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 265 | } |
| 266 | sourceSets.release { |
| 267 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 268 | } |
| 269 | minSdkVersion 23 |
| 270 | ext { |
| 271 | abiVersionCode = 8 |
| 272 | } |
| 273 | } |
| 274 | afat { |
| 275 | ndk { |
| 276 | abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" |
| 277 | } |
| 278 | sourceSets.debug { |
| 279 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 280 | } |
| 281 | /*sourceSets.debugAsan { |
| 282 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 283 | }*/ |
| 284 | sourceSets.release { |
| 285 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 286 | } |
| 287 | ext { |
| 288 | abiVersionCode = 9 |
| 289 | } |
| 290 | } |
| 291 | } |
| 292 |
| 293 | defaultConfig.versionCode = 2226 |
| 294 |
| 295 | applicationVariants.all { variant -> |
| 296 | variant.outputs.all { output -> |
| 297 | outputFileName = "app.apk" |
| 298 | output.versionCodeOverride = defaultConfig.versionCode * 10 + variant.productFlavors.get(0).abiVersionCode |
| 299 | } |
| 300 | } |
| 301 |
| 302 | variantFilter { variant -> |
| 303 | def names = variant.flavors*.name |
| 304 | if (variant.buildType.name != "release" && !names.contains("afat")) { |
| 305 | setIgnore(true) |
| 306 | } |
| 307 | } |
| 308 |
| 309 | defaultConfig { |
| 310 | minSdkVersion 16 |
| 311 | targetSdkVersion 29 |
| 312 | versionName "7.4.2" |
| 313 |
| 314 | vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi'] |
| 315 |
| 316 | externalNativeBuild { |
| 317 | cmake { |
| 318 | version '3.10.2' |
| 319 | arguments '-DANDROID_STL=c++_static', '-DANDROID_PLATFORM=android-16', "-j=16" |
| 320 | } |
| 321 | } |
| 322 | } |
| 323 | } |
| 324 |
| 325 | apply plugin: 'com.google.gms.google-services' |
| 326 |