| 7 |
| } |
| 8 |
| 9 | configurations { |
| 10 | compile.exclude module: 'support-v4' |
| 11 | } |
| 12 |
| 13 | dependencies { |
| 14 | compileOnly 'org.checkerframework:checker-qual:2.5.2' |
| 15 | compileOnly 'org.checkerframework:checker-compat-qual:2.5.0' |
| 16 | implementation 'com.google.firebase:firebase-core:16.0.7' |
| 17 | implementation 'com.google.firebase:firebase-messaging:17.3.4' |
| 18 | implementation 'com.google.firebase:firebase-config:16.1.3' |
| 19 | implementation 'com.google.android.gms:play-services-maps:16.0.0' |
| 20 | implementation 'com.google.android.gms:play-services-auth:16.0.1' |
| 21 | implementation 'com.google.android.gms:play-services-vision:16.2.0' |
| 22 | implementation 'com.google.android.gms:play-services-wallet:16.0.1' |
| 23 | implementation 'com.google.android.gms:play-services-wearable:16.0.1' |
| 24 | implementation 'com.android.support:support-core-ui:28.0.0' |
| 25 | implementation 'com.android.support:support-compat:28.0.0' |
| 26 | implementation 'com.android.support:support-core-utils:28.0.0' |
| 27 | implementation 'com.android.support:support-v13:28.0.0' |
| 28 | implementation 'com.android.support:palette-v7:28.0.0' |
| 29 | implementation 'com.android.support:exifinterface:28.0.0' |
| 30 | implementation 'net.hockeyapp.android:HockeySDK:5.1.1' |
| 31 | implementation 'com.googlecode.mp4parser:isoparser:1.0.6' |
| 32 | implementation 'com.stripe:stripe-android:2.0.2' |
| 33 | } |
| 34 |
| 35 | android { |
| 36 | compileSdkVersion 28 |
| 37 | buildToolsVersion '28.0.3' |
| 38 |
| 39 | defaultConfig.applicationId = "org.telegram.messenger" |
| 40 |
| 41 | sourceSets.main.jniLibs.srcDirs = ['./jni/'] |
| 42 |
| 43 | externalNativeBuild { |
| 44 | ndkBuild { |
| 45 | path "jni/Android.mk" |
| 46 | } |
| 47 | } |
| 48 |
| 49 | lintOptions { |
| 50 | disable 'MissingTranslation' |
| 51 | disable 'ExtraTranslation' |
| 52 | } |
| 53 |
| 54 | dexOptions { |
| 55 | jumboMode = true |
| 56 | } |
| 57 |
| 58 | compileOptions { |
| 59 | sourceCompatibility JavaVersion.VERSION_1_8 |
| 60 | targetCompatibility JavaVersion.VERSION_1_8 |
| 61 | } |
| 62 |
| 63 | signingConfigs { |
| 64 | debug { |
| 65 | storeFile file("config/release.keystore") |
| 66 | storePassword RELEASE_STORE_PASSWORD |
| 67 | keyAlias RELEASE_KEY_ALIAS |
| 68 | keyPassword RELEASE_KEY_PASSWORD |
| 69 | } |
| 70 |
| 71 | release { |
| 72 | storeFile file("config/release.keystore") |
| 73 | storePassword RELEASE_STORE_PASSWORD |
| 74 | keyAlias RELEASE_KEY_ALIAS |
| 75 | keyPassword RELEASE_KEY_PASSWORD |
| 76 | } |
| 77 | } |
| 78 |
| 79 | buildTypes { |
| 80 | debug { |
| 81 | debuggable true |
| 82 | jniDebuggable true |
| 83 | signingConfig signingConfigs.debug |
| 84 | applicationIdSuffix ".beta" |
| 85 | minifyEnabled true |
| 86 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 87 | } |
| 88 |
| 89 | debugMultidex { |
| 90 | initWith debug |
| 91 | minifyEnabled false |
| 92 | multiDexEnabled true |
| 93 | dependencies{ |
| 94 | implementation 'com.android.support:multidex:1.0.3' |
| 95 | } |
| 96 | manifestPlaceholders = [applicationClassName:"MultiDexApplicationLoader"] |
| 97 | } |
| 98 |
| 99 | HA { |
| 100 | debuggable false |
| 101 | jniDebuggable false |
| 102 | signingConfig signingConfigs.debug |
| 103 | applicationIdSuffix ".beta" |
| 104 | minifyEnabled true |
| 105 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 106 | } |
| 107 |
| 108 | release { |
| 109 | debuggable false |
| 110 | jniDebuggable false |
| 111 | signingConfig signingConfigs.release |
| 112 | minifyEnabled true |
| 113 | shrinkResources false |
| 114 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 115 | } |
| 116 | } |
| 117 |
| 118 | defaultConfig.versionCode = 1517 |
| 119 |
| 120 | sourceSets.debug { |
| 121 | manifest.srcFile 'config/debug/AndroidManifest.xml' |
| 122 | } |
| 123 |
| 124 | sourceSets.debugMultidex { |
| 125 | manifest.srcFile 'config/debug/AndroidManifest.xml' |
| 126 | java.srcDirs = ['src/multidex/java'] |
| 127 | } |
| 128 |
| 129 | sourceSets.HA { |
| 130 | manifest.srcFile 'config/debug/AndroidManifest.xml' |
| 131 | } |
| 132 |
| 133 | sourceSets.release { |
| 134 | manifest.srcFile 'config/release/AndroidManifest.xml' |
| 135 | } |
| 136 |
| 137 | flavorDimensions "minApi" |
| 138 |
| 139 | productFlavors { |
| 140 | armv7 { |
| 141 | ndk { |
| 142 | abiFilters "armeabi-v7a" |
| 143 | } |
| 144 | ext { |
| 145 | abiVersionCode = 1 |
| 146 | } |
| 147 | } |
| 148 | x86 { |
| 149 | ndk { |
| 150 | abiFilters "x86" |
| 151 | } |
| 152 | ext { |
| 153 | abiVersionCode = 2 |
| 154 | } |
| 155 | } |
| 156 | armv7_SDK23 { |
| 157 | ndk { |
| 158 | abiFilters "armeabi-v7a" |
| 159 | } |
| 160 | sourceSets.debug { |
| 161 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 162 | } |
| 163 | sourceSets.release { |
| 164 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 165 | } |
| 166 | minSdkVersion 23 |
| 167 | ext { |
| 168 | abiVersionCode = 3 |
| 169 | } |
| 170 | } |
| 171 | x86_SDK23 { |
| 172 | ndk { |
| 173 | abiFilters "x86" |
| 174 | } |
| 175 | sourceSets.debug { |
| 176 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 177 | } |
| 178 | sourceSets.release { |
| 179 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 180 | } |
| 181 | minSdkVersion 23 |
| 182 | ext { |
| 183 | abiVersionCode = 4 |
| 184 | } |
| 185 | } |
| 186 | arm64 { |
| 187 | ndk { |
| 188 | abiFilters "arm64-v8a" |
| 189 | } |
| 190 | ext { |
| 191 | abiVersionCode = 5 |
| 192 | } |
| 193 | } |
| 194 | x64 { |
| 195 | ndk { |
| 196 | abiFilters "x86_64" |
| 197 | } |
| 198 | ext { |
| 199 | abiVersionCode = 6 |
| 200 | } |
| 201 | } |
| 202 | arm64_SDK23 { |
| 203 | ndk { |
| 204 | abiFilters "arm64-v8a" |
| 205 | } |
| 206 | sourceSets.debug { |
| 207 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 208 | } |
| 209 | sourceSets.release { |
| 210 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 211 | } |
| 212 | minSdkVersion 23 |
| 213 | ext { |
| 214 | abiVersionCode = 7 |
| 215 | } |
| 216 | } |
| 217 | x64_SDK23 { |
| 218 | ndk { |
| 219 | abiFilters "x86_64" |
| 220 | } |
| 221 | sourceSets.debug { |
| 222 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 223 | } |
| 224 | sourceSets.release { |
| 225 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 226 | } |
| 227 | minSdkVersion 23 |
| 228 | ext { |
| 229 | abiVersionCode = 8 |
| 230 | } |
| 231 | } |
| 232 | afat { |
| 233 | sourceSets.debug { |
| 234 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 235 | } |
| 236 | sourceSets.release { |
| 237 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 238 | } |
| 239 | ext { |
| 240 | abiVersionCode = 0 |
| 241 | } |
| 242 | } |
| 243 | } |
| 244 |
| 245 | applicationVariants.all { variant -> |
| 246 | variant.outputs.all { output -> |
| 247 | output.processManifest.doLast { |
| 248 | def abiVersion = variant.productFlavors.get(0).abiVersionCode |
| 249 | String manifestPath = "$manifestOutputDirectory/AndroidManifest.xml" |
| 250 | def manifestContent = file(manifestPath).getText() |
| 251 | manifestContent = manifestContent.replace(String.format('android:versionCode="%d"', defaultConfig.versionCode), String.format('android:versionCode="%s"', defaultConfig.versionCode * 10 + abiVersion)) |
| 252 | file(manifestPath).write(manifestContent) |
| 253 | } |
| 254 | } |
| 255 | } |
| 256 |
| 257 | variantFilter { variant -> |
| 258 | def names = variant.flavors*.name |
| 259 | if(variant.buildType.name!="release" && !names.contains("afat")){ |
| 260 | setIgnore(true) |
| 261 | } |
| 262 | } |
| 263 |
| 264 | defaultConfig { |
| 265 | minSdkVersion 16 |
| 266 | targetSdkVersion 27 |
| 267 | versionName "5.4.0" |
| 268 |
| 269 | vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi'] |
| 270 |
| 271 | externalNativeBuild { |
| 272 | ndkBuild { |
| 273 | arguments "NDK_APPLICATION_MK:=jni/Application.mk", "APP_PLATFORM:=android-16", "-j8" |
| 274 | abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" |
| 275 | } |
| 276 | } |
| 277 |
| 278 | manifestPlaceholders = [applicationClassName:"ApplicationLoader"] |
| 279 | } |
| 280 | } |
| 281 |
| 282 | apply plugin: 'com.google.gms.google-services' |
| 283 |