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