| 1 | apply plugin: 'com.android.application' |
| 2 | apply plugin: 'org.telegram.build-app-plugin' |
| 3 | |
| 4 | repositories { |
| 5 | mavenCentral() |
| 6 | google() |
| 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 | implementation 'androidx.fragment:fragment:1.8.9' |
| 21 | implementation 'androidx.core:core:1.16.0' |
| 22 | coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5' |
| 23 | implementation files('../TMessagesProj/libs/libgsaverification-client.aar') |
| 24 | } |
| 25 | |
| 26 | android { |
| 27 | compileSdkVersion 36 |
| 28 | buildToolsVersion '36.0.0' |
| 29 | |
| 30 | defaultConfig.applicationId = APP_PACKAGE |
| 31 | |
| 32 | sourceSets.main.jniLibs.srcDirs = ['../TMessagesProj/jni/'] |
| 33 | |
| 34 | lintOptions { |
| 35 | disable 'MissingTranslation' |
| 36 | disable 'ExtraTranslation' |
| 37 | disable 'BlockedPrivateApi' |
| 38 | } |
| 39 | |
| 40 | compileOptions { |
| 41 | sourceCompatibility JavaVersion.VERSION_1_8 |
| 42 | targetCompatibility JavaVersion.VERSION_1_8 |
| 43 | |
| 44 | coreLibraryDesugaringEnabled true |
| 45 | } |
| 46 | |
| 47 | androidResources { |
| 48 | noCompress += "pack" |
| 49 | localeFilters += ["zz"] |
| 50 | } |
| 51 | |
| 52 | signingConfigs { |
| 53 | debug { |
| 54 | storeFile file("../TMessagesProj/config/release.keystore") |
| 55 | storePassword RELEASE_STORE_PASSWORD |
| 56 | keyAlias RELEASE_KEY_ALIAS |
| 57 | keyPassword RELEASE_KEY_PASSWORD |
| 58 | } |
| 59 | |
| 60 | release { |
| 61 | storeFile file("../TMessagesProj/config/release.keystore") |
| 62 | storePassword RELEASE_STORE_PASSWORD |
| 63 | keyAlias RELEASE_KEY_ALIAS |
| 64 | keyPassword RELEASE_KEY_PASSWORD |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | buildTypes { |
| 69 | debug { |
| 70 | debuggable true |
| 71 | jniDebuggable true |
| 72 | signingConfig signingConfigs.debug |
| 73 | applicationIdSuffix ".web" |
| 74 | minifyEnabled false |
| 75 | multiDexEnabled true |
| 76 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), '../TMessagesProj/proguard-rules.pro', '../TMessagesProj/proguard-rules-beta.pro' |
| 77 | ndk.debugSymbolLevel = 'FULL' |
| 78 | } |
| 79 | standalone { |
| 80 | matchingFallbacks = ['release'] |
| 81 | debuggable false |
| 82 | jniDebuggable false |
| 83 | signingConfig signingConfigs.release |
| 84 | applicationIdSuffix ".web" |
| 85 | minifyEnabled true |
| 86 | shrinkResources true |
| 87 | multiDexEnabled true |
| 88 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), '../TMessagesProj/proguard-rules.pro' |
| 89 | ndk.debugSymbolLevel = 'FULL' |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | sourceSets.debug { |
| 94 | manifest.srcFile '../TMessagesProj/config/release/AndroidManifest_standalone.xml' |
| 95 | } |
| 96 | sourceSets.standalone { |
| 97 | manifest.srcFile '../TMessagesProj/config/release/AndroidManifest_standalone.xml' |
| 98 | } |
| 99 | |
| 100 | flavorDimensions "minApi" |
| 101 | |
| 102 | productFlavors { |
| 103 | afat { |
| 104 | ndk { |
| 105 | abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" |
| 106 | } |
| 107 | ext { |
| 108 | abiVersionCode = 9 |
| 109 | } |
| 110 | sourceSets.standalone { |
| 111 | manifest.srcFile '../TMessagesProj/config/release/AndroidManifest_standalone.xml' |
| 112 | } |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | defaultConfig.versionCode = Integer.parseInt(APP_VERSION_CODE) |
| 117 | |
| 118 | applicationVariants.all { variant -> |
| 119 | variant.outputs.all { output -> |
| 120 | outputFileName = "app.apk" |
| 121 | output.versionCodeOverride = defaultConfig.versionCode * 10 + variant.productFlavors.get(0).abiVersionCode |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | variantFilter { variant -> |
| 126 | def names = variant.flavors*.name |
| 127 | if (variant.buildType.name != "release" && !names.contains("afat")) { |
| 128 | setIgnore(true) |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | defaultConfig { |
| 133 | minSdkVersion 21 |
| 134 | targetSdkVersion 36 |
| 135 | versionName APP_VERSION_NAME |
| 136 | ndkVersion "27.2.12479018" |
| 137 | |
| 138 | multiDexEnabled true |
| 139 | |
| 140 | vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi'] |
| 141 | |
| 142 | externalNativeBuild { |
| 143 | cmake { |
| 144 | version '3.22.1' |
| 145 | arguments '-DANDROID_STL=c++_static', '-DANDROID_PLATFORM=android-21' //, '-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON' |
| 146 | targets 'tmessages.49' |
| 147 | } |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | buildFeatures { |
| 152 | buildConfig = true |
| 153 | } |
| 154 | namespace 'org.telegram.messenger.web' |
| 155 | |
| 156 | lintOptions { |
| 157 | checkReleaseBuilds false |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | apply plugin: 'com.google.gms.google-services' |
| 162 | |