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