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