| 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 | 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 | buildTypes { |
| 74 | debug { |
| 75 | debuggable true |
| 76 | jniDebuggable true |
| 77 | signingConfig signingConfigs.debug |
| 78 | applicationIdSuffix ".web" |
| 79 | minifyEnabled false |
| 80 | multiDexEnabled true |
| 81 | proguardFiles getDefaultProguardFile('proguard-android.txt'), '../TMessagesProj/proguard-rules.pro', '../TMessagesProj/proguard-rules-beta.pro' |
| 82 | ndk.debugSymbolLevel = 'FULL' |
| 83 | } |
| 84 | standalone { |
| 85 | debuggable false |
| 86 | jniDebuggable false |
| 87 | signingConfig signingConfigs.release |
| 88 | applicationIdSuffix ".web" |
| 89 | minifyEnabled true |
| 90 | multiDexEnabled true |
| 91 | proguardFiles getDefaultProguardFile('proguard-android.txt'), '../TMessagesProj/proguard-rules.pro' |
| 92 | ndk.debugSymbolLevel = 'FULL' |
| 93 | } |
| 94 | } |
| 95 |
| 96 | sourceSets.debug { |
| 97 | manifest.srcFile '../TMessagesProj/config/release/AndroidManifest.xml' |
| 98 | } |
| 99 | sourceSets.standalone { |
| 100 | manifest.srcFile '../TMessagesProj/config/release/AndroidManifest.xml' |
| 101 | } |
| 102 |
| 103 | flavorDimensions "minApi" |
| 104 |
| 105 | productFlavors { |
| 106 | afat { |
| 107 | ndk { |
| 108 | abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" |
| 109 | } |
| 110 | ext { |
| 111 | abiVersionCode = 9 |
| 112 | } |
| 113 | sourceSets.standalone { |
| 114 | manifest.srcFile '../TMessagesProj/config/release/AndroidManifest.xml' |
| 115 | } |
| 116 | } |
| 117 | } |
| 118 |
| 119 | defaultConfig.versionCode = Integer.parseInt(APP_VERSION_CODE) |
| 120 |
| 121 | applicationVariants.all { variant -> |
| 122 | variant.outputs.all { output -> |
| 123 | outputFileName = "app.apk" |
| 124 | output.versionCodeOverride = defaultConfig.versionCode * 10 + variant.productFlavors.get(0).abiVersionCode |
| 125 | } |
| 126 | } |
| 127 |
| 128 | variantFilter { variant -> |
| 129 | def names = variant.flavors*.name |
| 130 | if (variant.buildType.name != "release" && !names.contains("afat")) { |
| 131 | setIgnore(true) |
| 132 | } |
| 133 | } |
| 134 |
| 135 | defaultConfig { |
| 136 | minSdkVersion 26 |
| 137 | targetSdkVersion 35 |
| 138 | versionName APP_VERSION_NAME |
| 139 | ndkVersion "27.2.12479018" |
| 140 |
| 141 | multiDexEnabled true |
| 142 |
| 143 | vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi'] |
| 144 |
| 145 | externalNativeBuild { |
| 146 | cmake { |
| 147 | version '3.10.2' |
| 148 | arguments '-DANDROID_STL=c++_static', '-DANDROID_PLATFORM=android-21' //, '-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON' |
| 149 | } |
| 150 | } |
| 151 |
| 152 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
| 153 | } |
| 154 |
| 155 |
| 156 | buildFeatures { |
| 157 | buildConfig = true |
| 158 | } |
| 159 | namespace 'org.telegram.messenger.test' |
| 160 |
| 161 | lintOptions { |
| 162 | checkReleaseBuilds false |
| 163 | } |
| 164 | } |
| 165 |
| 166 |