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