import com.android.build.api.variant.FilterConfiguration plugins { id 'com.android.application' id 'com.google.gms.google-services' id 'io.sentry.android.gradle' } dependencies { implementation project(':TMessagesProj') } sentry { uploadNativeSymbols = false includeSourceContext = false additionalSourceDirsForSourceContext = [ '../TMessagesProj/src/main/java' ] autoInstallation { enabled = false } ignoredBuildTypes = ["debug", "release"] } android { defaultConfig.applicationId = APP_PACKAGE packagingOptions { resources { excludes += '**' } } Properties localProperties = new Properties() if (project.rootProject.file('local.properties').exists()) { localProperties.load(project.rootProject.file('local.properties').newDataInputStream()) } signingConfigs { if (localProperties.getProperty("storeFile") != null) { sign { storeFile file(localProperties.getProperty("storeFile")) storePassword localProperties.getProperty("storePassword") keyAlias localProperties.getProperty("keyAlias") keyPassword localProperties.getProperty("keyPassword") } } } buildTypes { debug { if (localProperties.getProperty("storeFile") != null) { signingConfig signingConfigs.sign } applicationIdSuffix ".beta" } release { minifyEnabled true shrinkResources true vcsInfo.include false if (localProperties.getProperty("storeFile") != null) { signingConfig signingConfigs.sign } else { signingConfig signingConfigs.debug } proguardFiles '../TMessagesProj/proguard-rules.pro' } } defaultConfig.versionCode = Integer.parseInt(APP_VERSION_CODE) defaultConfig { versionName APP_VERSION_NAME multiDexEnabled true manifestPlaceholders = [MAPS_API_KEY: localProperties.get("mapsApiKey")] } packagingOptions { jniLibs { useLegacyPackaging = true } } bundle { language { enableSplit = false } } splits.abi { var buildingBundle = gradle.startParameter.taskNames.any { it.startsWith("bundle") } enable !buildingBundle universalApk false reset() include "arm64-v8a" } namespace 'org.telegram.messenger.regular' dependenciesInfo { includeInApk false includeInBundle false } } androidComponents { onVariants(selector().all()) { variant -> variant.outputs.each { output -> def abi = output.filters.find { it.filterType == FilterConfiguration.FilterType.ABI }?.identifier def abiName = abi ?: "universal" def baseVersionCode = output.versionCode.get() output.outputFileName.set("FoxiGram-${output.versionName.get()}-${baseVersionCode}-${abiName}.apk") output.versionCode.set(baseVersionCode * 10) } } }