| 7 |
| configurations { |
| 8 | compile.exclude module: 'support-v4' |
| 9 | } |
| 10 |
| 11 | dependencies { |
| 12 | compile 'com.google.android.gms:play-services-gcm:11.0.4' |
| 13 | compile 'com.google.android.gms:play-services-maps:11.0.4' |
| 14 | compile 'com.google.android.gms:play-services-vision:11.0.4' |
| 15 | compile 'com.google.android.gms:play-services-wallet:11.0.4' |
| 16 | compile 'com.google.android.gms:play-services-wearable:11.0.4' |
| 17 | compile 'com.android.support:support-core-ui:25.3.1' |
| 18 | compile 'com.android.support:support-compat:25.3.1' |
| 19 | compile 'com.android.support:support-core-utils:25.3.1' |
| 20 | compile 'com.android.support:support-v13:25.3.1' |
| 21 | compile 'com.android.support:palette-v7:25.3.1' |
| 22 | compile 'net.hockeyapp.android:HockeySDK:4.1.3' |
| 23 | compile 'com.googlecode.mp4parser:isoparser:1.0.6' |
| 24 | compile 'com.stripe:stripe-android:2.0.2' |
| 25 | } |
| 26 |
| 27 | android { |
| 28 | compileSdkVersion 26 |
| 29 | buildToolsVersion '26.0.2' |
| 30 |
| 31 |
| 32 | useLibrary 'org.apache.http.legacy' |
| 33 | defaultConfig.applicationId = "org.telegram.messenger" |
| 34 |
| 35 | sourceSets.main.jniLibs.srcDirs = ['./jni/'] |
| 36 |
| 37 | externalNativeBuild { |
| 38 | ndkBuild { |
| 39 | path "jni/Android.mk" |
| 40 | } |
| 41 | } |
| 42 |
| 43 | dexOptions { |
| 44 | jumboMode = true |
| 45 | } |
| 46 |
| 47 | compileOptions { |
| 48 | sourceCompatibility JavaVersion.VERSION_1_7 |
| 49 | targetCompatibility JavaVersion.VERSION_1_7 |
| 50 | } |
| 51 |
| 52 | signingConfigs { |
| 53 | debug { |
| 54 | storeFile file("config/release.keystore") |
| 55 | storePassword RELEASE_STORE_PASSWORD |
| 56 | keyAlias RELEASE_KEY_ALIAS |
| 57 | keyPassword RELEASE_KEY_PASSWORD |
| 58 | v2SigningEnabled false |
| 59 | } |
| 60 |
| 61 | release { |
| 62 | storeFile file("config/release.keystore") |
| 63 | storePassword RELEASE_STORE_PASSWORD |
| 64 | keyAlias RELEASE_KEY_ALIAS |
| 65 | keyPassword RELEASE_KEY_PASSWORD |
| 66 | v2SigningEnabled false |
| 67 | } |
| 68 | } |
| 69 |
| 70 | buildTypes { |
| 71 | debug { |
| 72 | debuggable true |
| 73 | jniDebuggable true |
| 74 | signingConfig signingConfigs.debug |
| 75 | applicationIdSuffix ".beta" |
| 76 | } |
| 77 |
| 78 | release { |
| 79 | debuggable false |
| 80 | jniDebuggable false |
| 81 | signingConfig signingConfigs.release |
| 82 | minifyEnabled false |
| 83 | shrinkResources false |
| 84 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 85 | } |
| 86 |
| 87 | foss { |
| 88 | debuggable false |
| 89 | jniDebuggable false |
| 90 | signingConfig signingConfigs.release |
| 91 | } |
| 92 | } |
| 93 |
| 94 | defaultConfig.versionCode = 1155 |
| 95 |
| 96 | sourceSets.debug { |
| 97 | manifest.srcFile 'config/debug/AndroidManifest.xml' |
| 98 | } |
| 99 |
| 100 | sourceSets.release { |
| 101 | manifest.srcFile 'config/release/AndroidManifest.xml' |
| 102 | } |
| 103 |
| 104 | sourceSets.foss { |
| 105 | manifest.srcFile 'config/foss/AndroidManifest.xml' |
| 106 | } |
| 107 |
| 108 | flavorDimensions "minApi" |
| 109 |
| 110 | productFlavors { |
| 111 | x86 { |
| 112 | ndk { |
| 113 | abiFilter "x86" |
| 114 | } |
| 115 | versionCode = 2 |
| 116 | } |
| 117 | armv7 { |
| 118 | ndk { |
| 119 | abiFilter "armeabi-v7a" |
| 120 | } |
| 121 | versionCode = 1 |
| 122 | } |
| 123 | x86_SDK23 { |
| 124 | ndk { |
| 125 | abiFilter "x86" |
| 126 | } |
| 127 | sourceSets.debug { |
| 128 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 129 | } |
| 130 | sourceSets.release { |
| 131 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 132 | } |
| 133 | minSdkVersion 23 |
| 134 | versionCode = 4 |
| 135 | } |
| 136 | armv7_SDK23 { |
| 137 | ndk { |
| 138 | abiFilter "armeabi-v7a" |
| 139 | } |
| 140 | sourceSets.debug { |
| 141 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 142 | } |
| 143 | sourceSets.release { |
| 144 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 145 | } |
| 146 | minSdkVersion 23 |
| 147 | versionCode = 3 |
| 148 | } |
| 149 | fat { |
| 150 | sourceSets.debug { |
| 151 | manifest.srcFile 'config/debug/AndroidManifest_SDK23.xml' |
| 152 | } |
| 153 | sourceSets.release { |
| 154 | manifest.srcFile 'config/release/AndroidManifest_SDK23.xml' |
| 155 | } |
| 156 | versionCode = 5 |
| 157 | } |
| 158 | } |
| 159 |
| 160 | applicationVariants.all { variant -> |
| 161 | variant.outputs.all { output -> |
| 162 | output.processManifest.doLast { |
| 163 | def abiVersion = variant.productFlavors.get(0).versionCode |
| 164 | String manifestPath = "$manifestOutputDirectory/AndroidManifest.xml" |
| 165 | def manifestContent = file(manifestPath).getText() |
| 166 | manifestContent = manifestContent.replace(String.format('android:versionCode="%d"', abiVersion), String.format('android:versionCode="%s"', defaultConfig.versionCode * 10 + abiVersion)) |
| 167 | file(manifestPath).write(manifestContent) |
| 168 | } |
| 169 | } |
| 170 | } |
| 171 |
| 172 | defaultConfig { |
| 173 | minSdkVersion 16 |
| 174 | targetSdkVersion 25 |
| 175 | versionName "4.6.0" |
| 176 |
| 177 | externalNativeBuild { |
| 178 | ndkBuild { |
| 179 | arguments "NDK_APPLICATION_MK:=jni/Application.mk", "APP_PLATFORM:=android-14" |
| 180 | abiFilters "armeabi-v7a", "x86" |
| 181 | } |
| 182 | } |
| 183 | } |
| 184 | } |
| 185 |
| 186 | apply plugin: 'com.google.gms.google-services' |
| 187 |