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