| 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:1.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 34 |
| 34 | buildToolsVersion '34.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 | dexOptions { |
| 47 | jumboMode = true |
| 48 | } |
| 49 |
| 50 | compileOptions { |
| 51 | sourceCompatibility JavaVersion.VERSION_1_8 |
| 52 | targetCompatibility JavaVersion.VERSION_1_8 |
| 53 |
| 54 | coreLibraryDesugaringEnabled true |
| 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 | minifyEnabled false |
| 79 | shrinkResources 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 | release { |
| 85 | debuggable false |
| 86 | jniDebuggable false |
| 87 | signingConfig signingConfigs.release |
| 88 | minifyEnabled true |
| 89 | shrinkResources false |
| 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/debug/AndroidManifest.xml' |
| 98 | } |
| 99 |
| 100 | sourceSets.release { |
| 101 | manifest.srcFile '../TMessagesProj/config/release/AndroidManifest.xml' |
| 102 | } |
| 103 |
| 104 | flavorDimensions "minApi" |
| 105 |
| 106 | productFlavors { |
| 107 | afat { |
| 108 | ndk { |
| 109 | abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" |
| 110 | } |
| 111 | sourceSets.debug { |
| 112 | manifest.srcFile '../TMessagesProj/config/debug/AndroidManifest_SDK23.xml' |
| 113 | } |
| 114 | sourceSets.release { |
| 115 | manifest.srcFile '../TMessagesProj/config/release/AndroidManifest_SDK23.xml' |
| 116 | } |
| 117 | ext { |
| 118 | abiVersionCode = 9 |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 |
| 123 | defaultConfig.versionCode = Integer.parseInt(APP_VERSION_CODE) |
| 124 |
| 125 | applicationVariants.all { variant -> |
| 126 | variant.outputs.all { output -> |
| 127 | outputFileName = "app-huawei.apk" |
| 128 | output.versionCodeOverride = defaultConfig.versionCode * 10 + variant.productFlavors.get(0).abiVersionCode |
| 129 | } |
| 130 | } |
| 131 |
| 132 | variantFilter { variant -> |
| 133 | def names = variant.flavors*.name |
| 134 | if (variant.buildType.name != "release" && !names.contains("afat")) { |
| 135 | setIgnore(true) |
| 136 | } |
| 137 | } |
| 138 |
| 139 | defaultConfig { |
| 140 | minSdkVersion 19 |
| 141 | targetSdkVersion 34 |
| 142 | versionName APP_VERSION_NAME |
| 143 | ndkVersion "21.4.7075529" |
| 144 |
| 145 | multiDexEnabled true |
| 146 |
| 147 | vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi'] |
| 148 |
| 149 | externalNativeBuild { |
| 150 | cmake { |
| 151 | version '3.10.2' |
| 152 | arguments '-DANDROID_STL=c++_static', '-DANDROID_PLATFORM=android-16' |
| 153 | } |
| 154 | } |
| 155 | } |
| 156 |
| 157 | buildFeatures { |
| 158 | buildConfig = true |
| 159 | } |
| 160 | namespace 'org.telegram.messenger.huawei' |
| 161 |
| 162 | lintOptions { |
| 163 | checkReleaseBuilds false |
| 164 | } |
| 165 | } |
| 166 |
| 167 | apply plugin: 'com.google.gms.google-services' |
| 168 |