164 lines
7.3 KiB
Groovy
164 lines
7.3 KiB
Groovy
import org.gradle.internal.os.OperatingSystem
|
|
import java.nio.file.Paths
|
|
|
|
plugins {
|
|
id 'com.android.library'
|
|
id 'org.lsposed.lsparanoid'
|
|
}
|
|
|
|
configurations.configureEach {
|
|
exclude group: 'androidx.recyclerview', module: 'recyclerview'
|
|
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk7'
|
|
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'androidx.activity:activity:1.13.0'
|
|
implementation 'androidx.fragment:fragment:1.8.9'
|
|
implementation 'androidx.core:core:1.18.0'
|
|
implementation 'androidx.palette:palette:1.0.0'
|
|
implementation 'androidx.exifinterface:exifinterface:1.4.2'
|
|
implementation 'androidx.dynamicanimation:dynamicanimation:1.1.0'
|
|
implementation "androidx.sharetarget:sharetarget:1.2.0"
|
|
implementation 'androidx.interpolator:interpolator:1.0.0'
|
|
implementation 'androidx.biometric:biometric:1.1.0'
|
|
|
|
implementation 'com.google.android.gms:play-services-cast-framework:22.3.1'
|
|
implementation 'androidx.mediarouter:mediarouter:1.8.1'
|
|
implementation 'org.nanohttpd:nanohttpd:2.3.1'
|
|
|
|
compileOnly 'org.checkerframework:checker-qual:2.5.2'
|
|
compileOnly 'org.checkerframework:checker-compat-qual:2.5.0'
|
|
implementation 'com.google.firebase:firebase-messaging:25.0.2'
|
|
implementation 'com.google.firebase:firebase-appindexing:20.0.0'
|
|
implementation 'com.google.android.gms:play-services-maps:20.0.0'
|
|
implementation 'com.google.android.gms:play-services-auth:21.5.1'
|
|
implementation 'com.google.android.gms:play-services-vision:20.1.3'
|
|
implementation 'com.google.android.gms:play-services-wearable:20.0.1'
|
|
implementation 'com.google.android.gms:play-services-location:21.3.0'
|
|
implementation 'com.googlecode.mp4parser:isoparser:1.0.6'
|
|
implementation('com.stripe:stripe-android:2.0.2') {
|
|
exclude group: 'com.android.support', module: 'support-annotations'
|
|
}
|
|
implementation 'com.google.mlkit:language-id:17.0.6'
|
|
implementation 'com.android.billingclient:billing:7.1.1'
|
|
implementation 'com.google.code.gson:gson:2.14.0'
|
|
implementation ('com.google.guava:guava:33.6.0-android') {
|
|
exclude group: 'com.google.code.findbugs', module: 'jsr305'
|
|
exclude group: 'org.checkerframework', module: 'checker-compat-qual'
|
|
exclude group: 'org.checkerframework', module: 'checker-qual'
|
|
exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
|
|
exclude group: 'com.google.j2objc', module: 'j2objc-annotations'
|
|
exclude group: 'org.codehaus.mojo', module: 'animal-sniffer-annotations'
|
|
}
|
|
|
|
implementation 'com.google.android.gms:play-services-mlkit-subject-segmentation:16.0.0-beta1'
|
|
implementation 'com.google.android.gms:play-services-mlkit-image-labeling:16.0.8'
|
|
|
|
|
|
implementation "io.noties.markwon:core:4.6.2"
|
|
implementation "io.noties.markwon:ext-strikethrough:4.6.2"
|
|
implementation "io.noties.markwon:ext-tables:4.6.2"
|
|
implementation "io.noties.markwon:html:4.6.2"
|
|
implementation "io.noties.markwon:inline-parser:4.6.2"
|
|
implementation "io.noties.markwon:ext-latex:4.6.2"
|
|
|
|
// implementation 'com.google.mlkit:translate:17.0.3'
|
|
|
|
constraints {
|
|
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
|
|
because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
|
|
}
|
|
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") {
|
|
because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
|
|
}
|
|
}
|
|
|
|
implementation 'androidx.browser:browser:1.10.0'
|
|
implementation 'app.nekogram.gifski:gifski:1.0.0'
|
|
implementation 'app.nekogram.translator:translator:1.5.5'
|
|
implementation 'com.jaredrummler:truetypeparser-light:1.0.0'
|
|
implementation 'com.squareup.okhttp3:okhttp:5.3.2'
|
|
implementation 'org.lsposed.hiddenapibypass:hiddenapibypass:6.1'
|
|
implementation 'org.apache.commons:commons-text:1.15.0'
|
|
|
|
implementation 'com.google.firebase:firebase-analytics:23.2.0'
|
|
implementation 'io.sentry:sentry-android:8.42.0'
|
|
}
|
|
|
|
lsparanoid {
|
|
seed = 7436
|
|
variantFilter = { variant -> variant.buildType == "release" || variant.buildType == "play" }
|
|
}
|
|
|
|
android {
|
|
sourceSets.main.jniLibs.srcDirs = ['./jni/', './src/main/jniLibs/']
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
path 'jni/CMakeLists.txt'
|
|
}
|
|
}
|
|
|
|
Properties localProperties = new Properties()
|
|
if (project.rootProject.file('local.properties').exists()) {
|
|
localProperties.load(project.rootProject.file('local.properties').newDataInputStream())
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
buildConfigField("long", "VERSION_CODE", "${APP_VERSION_CODE}")
|
|
buildConfigField("String","VERSION_NAME","\"${APP_VERSION_NAME}\"")
|
|
buildConfigField("long", "BUILD_VERSION", "${TG_APP_VERSION_CODE}")
|
|
buildConfigField("String","BUILD_VERSION_STRING","\"${TG_APP_VERSION_NAME}\"")
|
|
buildConfigField("boolean", "DEBUG_PRIVATE_VERSION", "false")
|
|
|
|
buildConfigField("int","API_ID", "${localProperties.get("apiId", 0)}")
|
|
buildConfigField("String","API_HASH", "\"${localProperties.get("apiHash")}\"")
|
|
buildConfigField("String","SENTRY_DSN", "\"${localProperties.get("sentryDsn")}\"")
|
|
buildConfigField("long","HELPER_BOT_ID", "${localProperties.get("helperBotId", 0)}")
|
|
buildConfigField("String","HELPER_BOT_USERNAME", "\"${localProperties.get("helperBotUsername")}\"")
|
|
}
|
|
|
|
release {
|
|
buildConfigField("long", "VERSION_CODE", "${APP_VERSION_CODE}")
|
|
buildConfigField("String","VERSION_NAME","\"${APP_VERSION_NAME}\"")
|
|
buildConfigField("long", "BUILD_VERSION", "${TG_APP_VERSION_CODE}")
|
|
buildConfigField("String","BUILD_VERSION_STRING","\"${TG_APP_VERSION_NAME}\"")
|
|
buildConfigField("boolean", "DEBUG_PRIVATE_VERSION", "false")
|
|
|
|
buildConfigField("int","API_ID", "${localProperties.get("apiId", 0)}")
|
|
buildConfigField("String","API_HASH", "\"${localProperties.get("apiHash")}\"")
|
|
buildConfigField("String","SENTRY_DSN", "\"${localProperties.get("sentryDsn")}\"")
|
|
buildConfigField("long","HELPER_BOT_ID", "${localProperties.get("helperBotId", 0)}")
|
|
buildConfigField("String","HELPER_BOT_USERNAME", "\"${localProperties.get("helperBotUsername")}\"")
|
|
}
|
|
}
|
|
namespace 'org.telegram.messenger'
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
version '3.22.1'
|
|
}
|
|
}
|
|
|
|
defaultConfig {
|
|
externalNativeBuild {
|
|
cmake {
|
|
arguments '-DANDROID_STL=c++_static', '-DANDROID_PLATFORM=android-23', '-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON', '-DCMAKE_BUILD_TYPE=Release'
|
|
abiFilters "arm64-v8a"
|
|
System.getenv("PATH").split(File.pathSeparator).any { path ->
|
|
var file = Paths.get("${path.trim()}${File.separator}ccache${if (OperatingSystem.current().windows) ".exe" else ""}").toFile()
|
|
if (file.exists()) {
|
|
println("Using ccache ${file.getAbsolutePath()}")
|
|
arguments += "-DANDROID_CCACHE=${file.getAbsolutePath()}"
|
|
return true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
vectorDrawables {
|
|
generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi']
|
|
}
|
|
}
|
|
}
|