Based on Nekogram. Key additions: - Rebrand to FoxiGram (app name, APK name, applicationId com.foxigram.app) - Embedded Xray (VLESS+Reality) proxy client via JNI libxray.so - Bundled hidden one-tap proxies (LTE + WiFi), read-only in UI - Auto-restore proxy on restart, rebind to active network (LTE/WiFi) - Server credentials externalized to git-ignored XrayServers.java (+ template) - libxray Go source included; compiled .so, keystore, google-services.json ignored
117 lines
No EOL
3.1 KiB
Groovy
117 lines
No EOL
3.1 KiB
Groovy
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)
|
|
}
|
|
}
|
|
} |