| 7 |
| google() |
| 8 | } |
| 9 |
| 10 | configurations { |
| 11 | compile.exclude module: 'support-v4' |
| 12 | } |
| 13 |
| 14 | configurations.all { |
| 15 | exclude group: 'com.google.firebase', module: 'firebase-core' |
| 16 | exclude group: 'androidx.recyclerview', module: 'recyclerview' |
| 17 | } |
| 18 |
| 19 | dependencies { |
| 20 | implementation project(':TMessagesProj') |
| 21 | coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5' |
| 22 |
| 23 | androidTestImplementation 'junit:junit:4.13.2' |
| 24 | androidTestImplementation 'androidx.test.ext:junit:1.1.5' |
| 25 | androidTestImplementation 'androidx.test:runner:1.5.2' |
| 26 | androidTestImplementation "org.jetbrains.kotlin:kotlin-test:1.9.20" |
| 27 | androidTestImplementation "org.jetbrains.kotlin:kotlin-test-junit:1.9.20" |
| 28 | androidTestImplementation "com.appmattus.fixture:fixture:1.2.0" |
| 29 | } |
| 30 |
| 31 | android { |
| 32 | compileSdkVersion 35 |
| 33 | buildToolsVersion '35.0.0' |
| 34 |
| 35 | defaultConfig.applicationId = APP_PACKAGE |
| 36 |
| 37 | sourceSets.main.jniLibs.srcDirs = ['../TMessagesProj/jni/'] |
| 38 | testBuildType "debug" |
| 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 | kotlinOptions { |
| 54 | jvmTarget = "1.8" |
| 55 | } |
| 56 |
| 57 | androidResources { |
| 58 | localeFilters += ["en", "ar", "de", "es", "it", "ko", "nl", "pt-rBR", "ru", "uk"] |
| 59 | } |
| 60 |
| 61 | signingConfigs { |
| 62 | debug { |
| 63 | storeFile file("../TMessagesProj/config/release.keystore") |
| 64 | storePassword RELEASE_STORE_PASSWORD |
| 65 | keyAlias RELEASE_KEY_ALIAS |
| 66 | keyPassword RELEASE_KEY_PASSWORD |
| 67 | } |
| 68 |
| 69 | release { |
| 70 | storeFile file("../TMessagesProj/config/release.keystore") |
| 71 | storePassword RELEASE_STORE_PASSWORD |
| 72 | keyAlias RELEASE_KEY_ALIAS |
| 73 | keyPassword RELEASE_KEY_PASSWORD |
| 74 | } |
| 75 | } |
| 76 |
| 77 | buildTypes { |
| 78 | debug { |
| 79 | debuggable true |
| 80 | jniDebuggable true |
| 81 | signingConfig signingConfigs.debug |
| 82 | applicationIdSuffix ".web" |
| 83 | minifyEnabled false |
| 84 | multiDexEnabled true |
| 85 | proguardFiles getDefaultProguardFile('proguard-android.txt'), '../TMessagesProj/proguard-rules.pro', '../TMessagesProj/proguard-rules-beta.pro' |
| 86 | ndk.debugSymbolLevel = 'FULL' |
| 87 | } |
| 88 | standalone { |
| 89 | debuggable false |
| 90 | jniDebuggable false |
| 91 | signingConfig signingConfigs.release |
| 92 | applicationIdSuffix ".web" |
| 93 | minifyEnabled true |
| 94 | multiDexEnabled true |
| 95 | proguardFiles getDefaultProguardFile('proguard-android.txt'), '../TMessagesProj/proguard-rules.pro' |
| 96 | ndk.debugSymbolLevel = 'FULL' |
| 97 | } |
| 98 | } |
| 99 |
| 100 | sourceSets.debug { |
| 101 | manifest.srcFile '../TMessagesProj/config/release/AndroidManifest.xml' |
| 102 | } |
| 103 | sourceSets.standalone { |
| 104 | manifest.srcFile '../TMessagesProj/config/release/AndroidManifest.xml' |
| 105 | } |
| 106 |
| 107 | flavorDimensions "minApi" |
| 108 |
| 109 | productFlavors { |
| 110 | afat { |
| 111 | ndk { |
| 112 | abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" |
| 113 | } |
| 114 | ext { |
| 115 | abiVersionCode = 9 |
| 116 | } |
| 117 | sourceSets.standalone { |
| 118 | manifest.srcFile '../TMessagesProj/config/release/AndroidManifest.xml' |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 |
| 123 | defaultConfig.versionCode = Integer.parseInt(APP_VERSION_CODE) |
| 124 |
| 125 | applicationVariants.all { variant -> |
| 126 | variant.outputs.all { output -> |
| 127 | outputFileName = "app.apk" |
| 128 | output.versionCodeOverride = defaultConfig.versionCode * 10 + variant.productFlavors.get(0).abiVersionCode |
| 129 | } |
| 130 | } |
| 131 |
| 132 | variantFilter { variant -> |
| 133 | def names = variant.flavors*.name |
| 134 | if (variant.buildType.name != "release" && !names.contains("afat")) { |
| 135 | setIgnore(true) |
| 136 | } |
| 137 | } |
| 138 |
| 139 | defaultConfig { |
| 140 | minSdkVersion 26 |
| 141 | targetSdkVersion 35 |
| 142 | versionName APP_VERSION_NAME |
| 143 | ndkVersion "27.2.12479018" |
| 144 |
| 145 | multiDexEnabled true |
| 146 |
| 147 | vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi'] |
| 148 |
| 149 | externalNativeBuild { |
| 150 | cmake { |
| 151 | version '3.10.2' |
| 152 | arguments '-DANDROID_STL=c++_static', '-DANDROID_PLATFORM=android-21' //, '-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON' |
| 153 | } |
| 154 | } |
| 155 |
| 156 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
| 157 | } |
| 158 |
| 159 |
| 160 | buildFeatures { |
| 161 | buildConfig = true |
| 162 | } |
| 163 | namespace 'org.telegram.messenger.test' |
| 164 |
| 165 | lintOptions { |
| 166 | checkReleaseBuilds false |
| 167 | } |
| 168 | } |
| 169 |
| 170 |