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