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