| 7 |
| repositories { |
| 8 | mavenCentral() |
| 9 | google() |
| 10 | } |
| 11 |
| 12 | configurations { |
| 13 | compile.exclude module: 'support-v4' |
| 14 | } |
| 15 |
| 16 | configurations.all { |
| 17 | exclude group: 'com.google.firebase', module: 'firebase-core' |
| 18 | exclude group: 'androidx.recyclerview', module: 'recyclerview' |
| 19 | } |
| 20 |
| 21 | dependencies { |
| 22 | implementation project(':TMessagesProj') |
| 23 | implementation 'androidx.fragment:fragment:1.2.0' |
| 24 | implementation 'androidx.multidex:multidex:2.0.1' |
| 25 | implementation 'androidx.core:core:1.10.1' |
| 26 | coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5' |
| 27 | implementation files('../TMessagesProj/libs/libgsaverification-client.aar') |
| 28 |
| 29 | implementation "com.microsoft.appcenter:appcenter-distribute:3.3.1" |
| 30 | implementation "com.microsoft.appcenter:appcenter-crashes:3.3.1" |
| 31 | implementation "com.microsoft.appcenter:appcenter-analytics:3.3.1" |
| 32 |
| 33 | implementation platform("com.google.firebase:firebase-bom:32.7.0") |
| 34 | implementation "com.google.firebase:firebase-crashlytics:18.6.0" |
| 35 | } |
| 36 |
| 37 | android { |
| 38 | compileSdkVersion 35 |
| 39 | buildToolsVersion '35.0.0' |
| 40 |
| 41 | defaultConfig.applicationId = APP_PACKAGE |
| 42 |
| 43 | sourceSets.main.jniLibs.srcDirs = ['../TMessagesProj/jni/'] |
| 44 |
| 45 | lintOptions { |
| 46 | disable 'MissingTranslation' |
| 47 | disable 'ExtraTranslation' |
| 48 | disable 'BlockedPrivateApi' |
| 49 | } |
| 50 |
| 51 | compileOptions { |
| 52 | sourceCompatibility JavaVersion.VERSION_1_8 |
| 53 | targetCompatibility JavaVersion.VERSION_1_8 |
| 54 |
| 55 | coreLibraryDesugaringEnabled true |
| 56 | } |
| 57 |
| 58 | signingConfigs { |
| 59 | debug { |
| 60 | storeFile file("../TMessagesProj/config/release.keystore") |
| 61 | storePassword RELEASE_STORE_PASSWORD |
| 62 | keyAlias RELEASE_KEY_ALIAS |
| 63 | keyPassword RELEASE_KEY_PASSWORD |
| 64 | } |
| 65 |
| 66 | release { |
| 67 | storeFile file("../TMessagesProj/config/release.keystore") |
| 68 | storePassword RELEASE_STORE_PASSWORD |
| 69 | keyAlias RELEASE_KEY_ALIAS |
| 70 | keyPassword RELEASE_KEY_PASSWORD |
| 71 | } |
| 72 | } |
| 73 |
| 74 | buildTypes { |
| 75 | HA_private { |
| 76 | debuggable false |
| 77 | jniDebuggable false |
| 78 | signingConfig signingConfigs.debug |
| 79 | applicationIdSuffix ".beta" |
| 80 | minifyEnabled true |
| 81 | multiDexEnabled true |
| 82 | proguardFiles getDefaultProguardFile('proguard-android.txt'), '../TMessagesProj/proguard-rules.pro', '../TMessagesProj/proguard-rules-beta.pro' |
| 83 | ndk.debugSymbolLevel = 'FULL' |
| 84 | } |
| 85 | HA_public { |
| 86 | debuggable false |
| 87 | jniDebuggable false |
| 88 | signingConfig signingConfigs.debug |
| 89 | applicationIdSuffix ".beta" |
| 90 | minifyEnabled true |
| 91 | multiDexEnabled true |
| 92 | proguardFiles getDefaultProguardFile('proguard-android.txt'), '../TMessagesProj/proguard-rules.pro', '../TMessagesProj/proguard-rules-beta.pro' |
| 93 | ndk.debugSymbolLevel = 'FULL' |
| 94 | } |
| 95 | HA_hardcore { |
| 96 | debuggable false |
| 97 | jniDebuggable false |
| 98 | signingConfig signingConfigs.debug |
| 99 | applicationIdSuffix ".beta" |
| 100 | minifyEnabled true |
| 101 | multiDexEnabled true |
| 102 | proguardFiles getDefaultProguardFile('proguard-android.txt'), '../TMessagesProj/proguard-rules.pro', '../TMessagesProj/proguard-rules-beta.pro' |
| 103 | ndk.debugSymbolLevel = 'FULL' |
| 104 | } |
| 105 | } |
| 106 |
| 107 | sourceSets.HA_private { |
| 108 | manifest.srcFile '../TMessagesProj/config/debug/AndroidManifest.xml' |
| 109 | } |
| 110 | sourceSets.HA_public { |
| 111 | manifest.srcFile '../TMessagesProj/config/debug/AndroidManifest.xml' |
| 112 | } |
| 113 | sourceSets.HA_hardcore { |
| 114 | manifest.srcFile '../TMessagesProj/config/debug/AndroidManifest.xml' |
| 115 | } |
| 116 |
| 117 | flavorDimensions "minApi" |
| 118 |
| 119 | productFlavors { |
| 120 | bundleAfat { |
| 121 | ndk { |
| 122 | abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" |
| 123 | } |
| 124 | ext { |
| 125 | abiVersionCode = 1 |
| 126 | } |
| 127 | } |
| 128 | bundleAfat_SDK23 { |
| 129 | ndk { |
| 130 | abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" |
| 131 | } |
| 132 | minSdkVersion 23 |
| 133 | ext { |
| 134 | abiVersionCode = 2 |
| 135 | } |
| 136 | } |
| 137 | afat { |
| 138 | ndk { |
| 139 | abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" |
| 140 | } |
| 141 | ext { |
| 142 | abiVersionCode = 9 |
| 143 | } |
| 144 | } |
| 145 | } |
| 146 |
| 147 | defaultConfig.versionCode = Integer.parseInt(APP_VERSION_CODE) |
| 148 |
| 149 | applicationVariants.all { variant -> |
| 150 | variant.outputs.all { output -> |
| 151 | outputFileName = "Telegram-Beta.apk" |
| 152 | output.versionCodeOverride = defaultConfig.versionCode * 10 + variant.productFlavors.get(0).abiVersionCode |
| 153 | } |
| 154 | } |
| 155 |
| 156 | variantFilter { variant -> |
| 157 | def names = variant.flavors*.name |
| 158 | if (variant.buildType.name != "release" && !names.contains("afat")) { |
| 159 | setIgnore(true) |
| 160 | } |
| 161 | } |
| 162 |
| 163 | defaultConfig { |
| 164 | minSdkVersion 21 |
| 165 | targetSdkVersion 35 |
| 166 | versionName APP_VERSION_NAME |
| 167 | ndkVersion "21.4.7075529" |
| 168 |
| 169 | multiDexEnabled true |
| 170 |
| 171 | vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi'] |
| 172 |
| 173 | externalNativeBuild { |
| 174 | cmake { |
| 175 | version '3.10.2' |
| 176 | arguments '-DANDROID_STL=c++_static', '-DANDROID_PLATFORM=android-21' // , '-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON' |
| 177 | } |
| 178 | } |
| 179 | } |
| 180 |
| 181 | buildFeatures { |
| 182 | buildConfig = true |
| 183 | } |
| 184 | namespace 'org.telegram.messenger.regular' |
| 185 |
| 186 | lintOptions { |
| 187 | checkReleaseBuilds false |
| 188 | } |
| 189 | } |
| 190 |
| 191 |