-
Notifications
You must be signed in to change notification settings - Fork 190
/
Copy pathbuild.gradle
214 lines (181 loc) · 7.62 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
google()
}
configurations {
compile.exclude module: 'support-v4'
}
configurations.all {
exclude group: 'com.google.firebase', module: 'firebase-core'
exclude group: 'androidx.recyclerview', module: 'recyclerview'
}
dependencies {
implementation 'androidx.core:core:1.9.0'
implementation 'androidx.palette:palette:1.0.0'
implementation 'androidx.exifinterface:exifinterface:1.3.6'
implementation 'androidx.dynamicanimation:dynamicanimation:1.0.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation "androidx.sharetarget:sharetarget:1.2.0"
implementation 'com.google.android.gms:play-services-measurement:21.2.0'
compileOnly 'org.checkerframework:checker-qual:2.5.2'
compileOnly 'org.checkerframework:checker-compat-qual:2.5.5'
implementation 'com.google.firebase:firebase-messaging:23.1.1'
implementation 'com.google.firebase:firebase-config:21.2.1'
implementation 'com.google.firebase:firebase-datatransport:18.1.7'
implementation 'com.google.firebase:firebase-appindexing:20.0.0'
implementation 'com.google.android.gms:play-services-maps:18.1.0'
implementation 'com.google.android.gms:play-services-auth:20.4.1'
implementation 'com.google.android.gms:play-services-vision:20.1.3'
implementation 'com.google.android.gms:play-services-wearable:18.0.0'
implementation 'com.google.android.gms:play-services-location:21.0.1'
implementation 'com.google.android.gms:play-services-wallet:19.1.0'
implementation 'com.google.android.gms:play-services-safetynet:18.0.1'
implementation 'com.googlecode.mp4parser:isoparser:1.0.6'
implementation 'com.stripe:stripe-android:2.0.2'
implementation 'com.google.mlkit:language-id:16.1.1'
implementation 'com.android.billingclient:billing:5.1.0'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'com.google.guava:guava:31.1-android'
def camerax_version = "1.3.0-alpha04"
implementation "androidx.camera:camera-camera2:${camerax_version}"
implementation "androidx.camera:camera-core:${camerax_version}"
implementation "androidx.camera:camera-extensions:${camerax_version}"
implementation "androidx.camera:camera-lifecycle:${camerax_version}"
implementation "androidx.camera:camera-view:${camerax_version}"
implementation "androidx.camera:camera-video:${camerax_version}"
implementation 'androidx.interpolator:interpolator:1.0.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.2'
//implementation 'com.github.KieronQuinn:MonetCompat:0.4.1'
implementation files('libs/libgsaverification-client.aar')
}
def isPmBuild = "false"
def abis = [9: 'universal', 1: 'armeabi-v7a', 5: 'arm64-v8a', 2: 'x86', 6: 'x86_64']
android {
compileSdkVersion 33
buildToolsVersion '33.0.1'
ndkVersion "21.4.7075529"
namespace 'org.telegram.messenger'
defaultConfig.applicationId = APP_PACKAGE
defaultConfig.versionCode = Integer.parseInt(APP_VERSION_CODE)
Properties localProperties = new Properties()
if (project.rootProject.file('API_KEYS').exists()) {
localProperties.load(project.rootProject.file('API_KEYS').newDataInputStream())
}
defaultConfig {
minSdkVersion 21
targetSdkVersion 33
versionName APP_VERSION_NAME
// Obtain your own keys at: https://core.telegram.org/api/obtaining_api_id
buildConfigField 'int', 'APP_ID', localProperties.getProperty("APP_ID")
buildConfigField 'String', 'APP_HASH', localProperties.getProperty("APP_HASH")
// Google Console: https://console.cloud.google.com/google/maps-apis/credentials
resValue 'string', 'MAPS_V2_API', localProperties.getProperty("MAPS_V2_API")
externalNativeBuild {
cmake {
version '3.10.2'
arguments '-DANDROID_STL=c++_static', '-DANDROID_PLATFORM=android-21'
}
}
}
externalNativeBuild.cmake.path 'jni/CMakeLists.txt'
sourceSets.main {
jniLibs.srcDirs = ['jni']
//jniLibs.srcDir 'libs'
//jni.srcDirs = []
res.srcDirs = ['src/main/res', 'src/main/res-solar', 'src/main/res-tabs']
}
lint {
checkReleaseBuilds false
disable 'MissingTranslation', 'ExtraTranslation', 'BlockedPrivateApi'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
coreLibraryDesugaringEnabled true
}
signingConfigs {
release {
storeFile file("config/extera.jks")
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
}
packagingOptions.exclude 'META-INF/DEPENDENCIES'
buildTypes {
debug {
debuggable false
jniDebuggable false
signingConfig signingConfigs.release
minifyEnabled true
shrinkResources true
multiDexEnabled true
zipAlignEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ndk.debugSymbolLevel = 'FULL'
buildConfigField "boolean", "DEBUG_VERSION", "true"
buildConfigField "boolean", "IS_PM_BUILD", isPmBuild
}
release {
debuggable false
jniDebuggable false
signingConfig signingConfigs.release
minifyEnabled true
shrinkResources true
multiDexEnabled true
zipAlignEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ndk.debugSymbolLevel = 'FULL'
buildConfigField "boolean", "DEBUG_VERSION", "false"
buildConfigField "boolean", "IS_PM_BUILD", isPmBuild
}
}
flavorDimensions "minApi"
productFlavors {
armv7 {
ndk.abiFilters "armeabi-v7a"
ext.abiVersionCode = 1
}
x86 {
ndk.abiFilters "x86"
ext.abiVersionCode = 2
}
arm64 {
ndk.abiFilters "arm64-v8a"
ext.abiVersionCode = 5
}
x64 {
ndk.abiFilters "x86_64"
ext.abiVersionCode = 6
}
afat {
ndk.abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
sourceSets.release.manifest.srcFile 'config/release/AndroidManifest.xml'
ext.abiVersionCode = 9
}
beta {
ndk.abiFilters "armeabi-v7a", "arm64-v8a"
sourceSets.debug.manifest.srcFile 'config/debug/AndroidManifest.xml'
ext.abiVersionCode = 9
}
}
applicationVariants.all { variant ->
variant.outputs.all { output ->
def buildType = variant.productFlavors[0].name == "beta" ? "beta-" : ""
def date = new Date()
def formattedDate = date.format('ddMMyyyy')
def abi = abis.get(variant.productFlavors.get(0).abiVersionCode)
outputFileName = "exteraGram-${buildType}${abi}-${formattedDate}.apk"
output.versionCodeOverride = defaultConfig.versionCode * (isPmBuild == "true" ? 100 : 10) + variant.productFlavors.get(0).abiVersionCode
}
}
variantFilter { variant ->
def names = variant.flavors*.name
setIgnore(variant.buildType.name != "debug" && names.contains("beta") || variant.buildType.name != "release" && !names.contains("beta"))
}
bundle.language.enableSplit false
dependenciesInfo.includeInApk false
}