| 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 'androidx.core:core:1.6.0' |
| 19 | implementation 'androidx.palette:palette:1.0.0' |
| 20 | implementation 'androidx.exifinterface:exifinterface:1.3.3' |
| 21 | implementation 'androidx.dynamicanimation:dynamicanimation:1.0.0' |
| 22 | implementation 'androidx.multidex:multidex:2.0.1' |
| 23 | implementation "androidx.sharetarget:sharetarget:1.1.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:22.0.0' |
| 28 | implementation 'com.google.firebase:firebase-config:21.0.1' |
| 29 | implementation 'com.google.firebase:firebase-datatransport:18.1.0' |
| 30 | implementation 'com.google.firebase:firebase-appindexing:20.0.0' |
| 31 | implementation 'com.google.android.gms:play-services-maps:17.0.1' |
| 32 | implementation 'com.google.android.gms:play-services-auth:19.2.0' |
| 33 | implementation 'com.google.android.gms:play-services-vision:20.1.3' |
| 34 | implementation 'com.google.android.gms:play-services-wearable:17.1.0' |
| 35 | implementation 'com.google.android.gms:play-services-location:18.0.0' |
| 36 | implementation 'com.google.android.gms:play-services-wallet:18.1.3' |
| 37 | implementation 'com.googlecode.mp4parser:isoparser:1.0.6' |
| 38 | implementation 'com.stripe:stripe-android:2.0.2' |
| 39 | implementation 'com.google.mlkit:language-id:16.1.1' |
| 40 | implementation 'com.android.billingclient:billing:5.0.0' |
| 41 | implementation files('libs/libgsaverification-client.aar') |
| 42 |
| 43 | implementation "com.android.billingclient:billing:5.0.0" |
| 44 |
| 45 | coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' |
| 46 | } |
| 47 |
| 48 | android { |
| 49 | compileSdkVersion 31 |
| 50 | buildToolsVersion '31.0.0' |
| 51 | ndkVersion "21.4.7075529" |
| 52 |
| 53 | defaultConfig.applicationId = "org.telegram.messenger" |
| 54 |
| 55 | sourceSets.main.jniLibs.srcDirs = ['./jni/'] |
| 56 |
| 57 | externalNativeBuild { |
| 58 | cmake { |
| 59 | path 'jni/CMakeLists.txt' |
| 60 | } |
| 61 | } |
| 62 |
| 63 | lintOptions { |
| 64 | disable 'MissingTranslation' |
| 65 | disable 'ExtraTranslation' |
| 66 | disable 'BlockedPrivateApi' |
| 67 | } |
| 68 |
| 69 | dexOptions { |
| 70 | jumboMode = true |
| 71 | } |
| 72 |
| 73 | compileOptions { |
| 74 | sourceCompatibility JavaVersion.VERSION_1_8 |
| 75 | targetCompatibility JavaVersion.VERSION_1_8 |
| 76 |
| 77 | coreLibraryDesugaringEnabled true |
| 78 | } |
| 79 |
| 80 | signingConfigs { |
| 81 | debug { |
| 82 | storeFile file("config/release.keystore") |
| 83 | storePassword RELEASE_STORE_PASSWORD |
| 84 | keyAlias RELEASE_KEY_ALIAS |
| 85 | keyPassword RELEASE_KEY_PASSWORD |
| 86 | } |
| 87 |
| 88 | release { |
| 89 | storeFile file("config/release.keystore") |
| 90 | storePassword RELEASE_STORE_PASSWORD |
| 91 | keyAlias RELEASE_KEY_ALIAS |
| 92 | keyPassword RELEASE_KEY_PASSWORD |
| 93 | } |
| 94 | } |
| 95 |
| 96 | buildTypes { |
| 97 | debug { |
| 98 | debuggable true |
| 99 | jniDebuggable true |
| 100 | signingConfig signingConfigs.debug |
| 101 | applicationIdSuffix ".beta" |
| 102 | minifyEnabled false |
| 103 | shrinkResources false |
| 104 | multiDexEnabled true |
| 105 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 106 | ndk.debugSymbolLevel = 'FULL' |
| 107 | } |
| 108 |
| 109 | /*debugAsan { |
| 110 | debuggable true |
| 111 | jniDebuggable true |
| 112 | signingConfig signingConfigs.debug |
| 113 | applicationIdSuffix ".beta" |
| 114 | minifyEnabled true |
| 115 | multiDexEnabled true |
| 116 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 117 |
| 118 | packagingOptions { |
| 119 | doNotStrip "**.so" |
| 120 | } |
| 121 |
| 122 | sourceSets { |
| 123 | main { |
| 124 | jniLibs { |
| 125 | srcDir { |
| 126 | 'jniLibs' |
| 127 | } |
| 128 | } |
| 129 | resources { |
| 130 | srcDir { |
| 131 | 'jniRes' |
| 132 | } |
| 133 | } |
| 134 | } |
| 135 | } |
| 136 | }*/ |
| 137 |
| 138 | HA { |
| 139 | debuggable false |
| 140 | jniDebuggable false |
| 141 | signingConfig signingConfigs.debug |
| 142 | applicationIdSuffix ".beta" |
| 143 | minifyEnabled true |
| 144 | multiDexEnabled true |
| 145 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 146 | ndk.debugSymbolLevel = 'FULL' |
| 147 | } |
| 148 |
| 149 | standalone { |
| 150 | debuggable false |
| 151 | jniDebuggable false |
| 152 | signingConfig signingConfigs.release |
| 153 | applicationIdSuffix ".web" |
| 154 | minifyEnabled true |
| 155 | multiDexEnabled true |
| 156 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 157 | ndk.debugSymbolLevel = 'FULL' |
| 158 | } |
| 159 |
| 160 | release { |
| 161 | debuggable false |
| 162 | jniDebuggable false |
| 163 | signingConfig signingConfigs.release |
| 164 | minifyEnabled true |
| 165 | shrinkResources false |
| 166 | multiDexEnabled true |
| 167 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 168 | ndk.debugSymbolLevel = 'FULL' |
| 169 | } |
| 170 | } |
| 171 |
| 172 | sourceSets.debug { |
| 173 | manifest.srcFile 'config/debug/AndroidManifest.xml' |
| 174 | } |
| 175 |
| 176 | /*sourceSets.debugAsan { |
| 177 | manifest.srcFile 'config/debug/AndroidManifest.xml' |
| 178 | }*/ |
| 179 |
| 180 | sourceSets.HA { |
| 181 | manifest.srcFile 'config/debug/AndroidManifest.xml' |
| 182 | } |
| 183 |
| 184 | sourceSets.standalone { |
| 185 | manifest.srcFile 'config/release/AndroidManifest.xml' |
| 186 | } |
| 187 |
| 188 | sourceSets.release { |
| 189 | manifest.srcFile 'config/release/AndroidManifest.xml' |
| 190 | } |
| 191 |
| 192 | flavorDimensions "minApi" |
| 193 |
| 194 | productFlavors { |
| 195 | bundleAfat { |
| 196 | ndk { |
| 197 | abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" |
| 198 | } |
| 199 | ext { |
| 200 | abiVersionCode = 1 |
| 201 | } |
| 202 | } |
| 203 | bundleAfat_SDK23 { |
| 204 | ndk { |
| 205 | abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" |
| 206 | } |
| 207 | sourceSets.debug { |
| 208 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 209 | } |
| 210 | sourceSets.release { |
| 211 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 212 | } |
| 213 | sourceSets.standalone { |
| 214 | manifest.srcFile 'config/release/AndroidManifest_standalone.xml' |
| 215 | } |
| 216 | minSdkVersion 23 |
| 217 | ext { |
| 218 | abiVersionCode = 2 |
| 219 | } |
| 220 | } |
| 221 | afat { |
| 222 | ndk { |
| 223 | abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" |
| 224 | } |
| 225 | sourceSets.debug { |
| 226 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 227 | } |
| 228 | sourceSets.release { |
| 229 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 230 | } |
| 231 | sourceSets.standalone { |
| 232 | manifest.srcFile 'config/release/AndroidManifest_standalone.xml' |
| 233 | } |
| 234 | ext { |
| 235 | abiVersionCode = 9 |
| 236 | } |
| 237 | } |
| 238 | } |
| 239 |
| 240 | defaultConfig.versionCode = 2702 |
| 241 |
| 242 | applicationVariants.all { variant -> |
| 243 | variant.outputs.all { output -> |
| 244 | outputFileName = "app.apk" |
| 245 | output.versionCodeOverride = defaultConfig.versionCode * 10 + variant.productFlavors.get(0).abiVersionCode |
| 246 | } |
| 247 | } |
| 248 |
| 249 | variantFilter { variant -> |
| 250 | def names = variant.flavors*.name |
| 251 | if (variant.buildType.name != "release" && !names.contains("afat")) { |
| 252 | setIgnore(true) |
| 253 | } |
| 254 | } |
| 255 |
| 256 | defaultConfig { |
| 257 | minSdkVersion 16 |
| 258 | targetSdkVersion 30 |
| 259 | versionName "8.8.2" |
| 260 |
| 261 | vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi'] |
| 262 |
| 263 | externalNativeBuild { |
| 264 | cmake { |
| 265 | version '3.10.2' |
| 266 | arguments '-DANDROID_STL=c++_static', '-DANDROID_PLATFORM=android-16', "-j=16" |
| 267 | } |
| 268 | } |
| 269 | } |
| 270 | } |
| 271 |
| 272 | apply plugin: 'com.google.gms.google-services' |
| 273 |