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