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