| 7 |
| maven { url 'https://developer.huawei.com/repo/' } |
| 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 | implementation 'androidx.fragment:fragment:1.2.0' |
| 22 | implementation 'androidx.multidex:multidex:2.0.1' |
| 23 | coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5' |
| 24 | implementation files('../TMessagesProj/libs/libgsaverification-client.aar') |
| 25 |
| 26 | implementation 'com.google.firebase:firebase-messaging:22.0.0' |
| 27 | implementation 'com.huawei.hms:push:6.5.0.300' |
| 28 | implementation 'com.huawei.hms:maps:6.6.0.300' |
| 29 | implementation 'com.huawei.hms:location:6.4.0.300' |
| 30 | } |
| 31 |
| 32 | android { |
| 33 | compileSdkVersion 35 |
| 34 | buildToolsVersion '35.0.0' |
| 35 |
| 36 | defaultConfig.applicationId = APP_PACKAGE |
| 37 |
| 38 | sourceSets.main.jniLibs.srcDirs = ['../TMessagesProj/jni/'] |
| 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 | signingConfigs { |
| 54 | debug { |
| 55 | storeFile file("../TMessagesProj/config/release.keystore") |
| 56 | storePassword RELEASE_STORE_PASSWORD |
| 57 | keyAlias RELEASE_KEY_ALIAS |
| 58 | keyPassword RELEASE_KEY_PASSWORD |
| 59 | } |
| 60 |
| 61 | release { |
| 62 | storeFile file("../TMessagesProj/config/release.keystore") |
| 63 | storePassword RELEASE_STORE_PASSWORD |
| 64 | keyAlias RELEASE_KEY_ALIAS |
| 65 | keyPassword RELEASE_KEY_PASSWORD |
| 66 | } |
| 67 | } |
| 68 |
| 69 | buildTypes { |
| 70 | debug { |
| 71 | debuggable true |
| 72 | jniDebuggable true |
| 73 | signingConfig signingConfigs.debug |
| 74 | minifyEnabled false |
| 75 | shrinkResources false |
| 76 | multiDexEnabled true |
| 77 | proguardFiles getDefaultProguardFile('proguard-android.txt'), '../TMessagesProj/proguard-rules.pro', '../TMessagesProj/proguard-rules-beta.pro' |
| 78 | ndk.debugSymbolLevel = 'FULL' |
| 79 | } |
| 80 | release { |
| 81 | debuggable false |
| 82 | jniDebuggable false |
| 83 | signingConfig signingConfigs.release |
| 84 | minifyEnabled true |
| 85 | shrinkResources false |
| 86 | multiDexEnabled true |
| 87 | proguardFiles getDefaultProguardFile('proguard-android.txt'), '../TMessagesProj/proguard-rules.pro' |
| 88 | ndk.debugSymbolLevel = 'FULL' |
| 89 | } |
| 90 | } |
| 91 |
| 92 | sourceSets.debug { |
| 93 | manifest.srcFile '../TMessagesProj/config/debug/AndroidManifest.xml' |
| 94 | } |
| 95 |
| 96 | sourceSets.release { |
| 97 | manifest.srcFile '../TMessagesProj/config/release/AndroidManifest.xml' |
| 98 | } |
| 99 |
| 100 | flavorDimensions "minApi" |
| 101 |
| 102 | productFlavors { |
| 103 | afat { |
| 104 | ndk { |
| 105 | abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" |
| 106 | } |
| 107 | sourceSets.debug { |
| 108 | manifest.srcFile '../TMessagesProj/config/debug/AndroidManifest_SDK23.xml' |
| 109 | } |
| 110 | sourceSets.release { |
| 111 | manifest.srcFile '../TMessagesProj/config/release/AndroidManifest_SDK23.xml' |
| 112 | } |
| 113 | ext { |
| 114 | abiVersionCode = 9 |
| 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-huawei.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 21 |
| 137 | targetSdkVersion 35 |
| 138 | versionName APP_VERSION_NAME |
| 139 | ndkVersion "21.4.7075529" |
| 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 |
| 153 | buildFeatures { |
| 154 | buildConfig = true |
| 155 | } |
| 156 | namespace 'org.telegram.messenger.huawei' |
| 157 |
| 158 | lintOptions { |
| 159 | checkReleaseBuilds false |
| 160 | } |
| 161 | } |
| 162 |
| 163 | apply plugin: 'com.google.gms.google-services' |
| 164 |