|
5 | 5 | @file:Suppress("UnstableApiUsage", "SpellCheckingInspection") |
6 | 6 |
|
7 | 7 | import com.android.build.api.variant.FilterConfiguration.FilterType.ABI |
8 | | -import io.sentry.android.gradle.instrumentation.logcat.LogcatLevel |
9 | 8 | import java.util.Properties |
10 | 9 |
|
11 | 10 | plugins { |
@@ -14,11 +13,8 @@ plugins { |
14 | 13 | id("com.mikepenz.aboutlibraries.plugin") |
15 | 14 | kotlin("android") |
16 | 15 | kotlin("kapt") |
17 | | - id("com.google.devtools.ksp") version "1.8.22-1.0.11" |
18 | | - id("io.sentry.android.gradle") version "3.12.0" |
| 16 | + id("com.google.devtools.ksp") version "1.9.10-1.0.13" |
19 | 17 | } |
20 | | - |
21 | | -val hasSentryConfig = File(rootProject.projectDir, "sentry.properties").exists() |
22 | 18 | android { |
23 | 19 | // functions to get git info: gitCommitHash, gitBranch, gitRemote |
24 | 20 | val gitCommitHash = providers.exec { |
@@ -52,8 +48,8 @@ android { |
52 | 48 | applicationId = "com.fox2code.mmm" |
53 | 49 | minSdk = 26 |
54 | 50 | targetSdk = 34 |
55 | | - versionCode = 85 |
56 | | - versionName = "2.3.1" |
| 51 | + versionCode = 86 |
| 52 | + versionName = "2.3.2" |
57 | 53 | vectorDrawables { |
58 | 54 | useSupportLibrary = true |
59 | 55 | } |
@@ -85,10 +81,6 @@ android { |
85 | 81 | "en" |
86 | 82 | ) |
87 | 83 | ) |
88 | | - // ksp room processor |
89 | | - room { |
90 | | - schemaLocationDir.set(file("roomSchemas")) |
91 | | - } |
92 | 84 | } |
93 | 85 |
|
94 | 86 | splits { |
@@ -159,39 +151,23 @@ android { |
159 | 151 | buildConfigField("boolean", "DEFAULT_ENABLE_CRASH_REPORTING", "true") |
160 | 152 | buildConfigField("boolean", "DEFAULT_ENABLE_CRASH_REPORTING_PII", "true") |
161 | 153 | buildConfigField("boolean", "DEFAULT_ENABLE_ANALYTICS", "true") |
162 | | - val properties = Properties() |
163 | | - if (project.rootProject.file("local.properties").exists()) { |
164 | | - properties.load(project.rootProject.file("local.properties").reader()) |
165 | | - // grab matomo.url |
166 | | - buildConfigField( |
167 | | - "String", "ANALYTICS_ENDPOINT", "\"" + properties.getProperty( |
168 | | - "matomo.url", "https://s-api.androidacy.com/matomo.php" |
169 | | - ) + "\"" |
170 | | - ) |
171 | | - } else { |
172 | | - buildConfigField( |
173 | | - "String", "ANALYTICS_ENDPOINT", "\"https://s-api.androidacy.com/matomo.php\"" |
174 | | - ) |
175 | | - } |
176 | 154 | buildConfigField("boolean", "ENABLE_PROTECTION", "true") |
177 | 155 | // Get the androidacy client ID from the androidacy.properties |
178 | 156 |
|
179 | 157 | val propertiesA = Properties() |
180 | | - // If androidacy.properties doesn"t exist, use the default client ID which is heavily |
181 | | - // rate limited to 30 requests per minute |
| 158 | + val default = "5KYccdYxWB2RxMq5FTbkWisXi2dS6yFN9R7RVlFCG98FRdz6Mf5ojY2fyJCUlXJZ" |
182 | 159 | if (project.rootProject.file("androidacy.properties").exists()) { |
183 | 160 | propertiesA.load(project.rootProject.file("androidacy.properties").reader()) |
184 | | - properties.setProperty( |
185 | | - "client_id", "\"" + propertiesA.getProperty( |
| 161 | + propertiesA.setProperty( |
| 162 | + "client_id", propertiesA.getProperty( |
186 | 163 | "client_id", |
187 | | - "5KYccdYxWB2RxMq5FTbkWisXi2dS6yFN9R7RVlFCG98FRdz6Mf5ojY2fyJCUlXJZ" |
188 | | - ) + "\"" |
| 164 | + default |
| 165 | + ) |
189 | 166 | ) |
190 | 167 | } else { |
191 | | - properties.setProperty( |
192 | | - "client_id", "5KYccdYxWB2RxMq5FTbkWisXi2dS6yFN9R7RVlFCG98FRdz6Mf5ojY2fyJCUlXJZ" |
193 | | - ) |
| 168 | + propertiesA.setProperty("client_id", "\"" + default + "\"") |
194 | 169 | } |
| 170 | + |
195 | 171 | buildConfigField( |
196 | 172 | "String", "ANDROIDACY_CLIENT_ID", "\"" + propertiesA.getProperty("client_id") + "\"" |
197 | 173 | ) |
@@ -228,38 +204,21 @@ android { |
228 | 204 | buildConfigField("boolean", "DEFAULT_ENABLE_CRASH_REPORTING", "true") |
229 | 205 | buildConfigField("boolean", "DEFAULT_ENABLE_CRASH_REPORTING_PII", "true") |
230 | 206 | buildConfigField("boolean", "DEFAULT_ENABLE_ANALYTICS", "true") |
231 | | - val properties = Properties() |
232 | | - if (project.rootProject.file("local.properties").exists()) { |
233 | | - properties.load(project.rootProject.file("local.properties").reader()) |
234 | | - // grab matomo.url |
235 | | - buildConfigField( |
236 | | - "String", "ANALYTICS_ENDPOINT", "\"" + properties.getProperty( |
237 | | - "matomo.url", "https://s-api.androidacy.com/matomo.php" |
238 | | - ) + "\"" |
239 | | - ) |
240 | | - } else { |
241 | | - buildConfigField( |
242 | | - "String", "ANALYTICS_ENDPOINT", "\"https://s-api.androidacy.com/matomo.php\"" |
243 | | - ) |
244 | | - } |
245 | 207 | buildConfigField("boolean", "ENABLE_PROTECTION", "true") |
246 | 208 | // Get the androidacy client ID from the androidacy.properties |
247 | 209 |
|
248 | 210 | val propertiesA = Properties() |
249 | | - // If androidacy.properties doesn"t exist, use the default client ID which is heavily |
250 | | - // rate limited to 30 requests per minute |
| 211 | + val default = "5KYccdYxWB2RxMq5FTbkWisXi2dS6yFN9R7RVlFCG98FRdz6Mf5ojY2fyJCUlXJZ" |
251 | 212 | if (project.rootProject.file("androidacy.properties").exists()) { |
252 | 213 | propertiesA.load(project.rootProject.file("androidacy.properties").reader()) |
253 | | - properties.setProperty( |
254 | | - "client_id", "\"" + propertiesA.getProperty( |
255 | | - "play_client_id", |
256 | | - "5KYccdYxWB2RxMq5FTbkWisXi2dS6yFN9R7RVlFCG98FRdz6Mf5ojY2fyJCUlXJZ" |
257 | | - ) + "\"" |
| 214 | + propertiesA.setProperty( |
| 215 | + "client_id", propertiesA.getProperty( |
| 216 | + "client_id", |
| 217 | + default |
| 218 | + ) |
258 | 219 | ) |
259 | 220 | } else { |
260 | | - properties.setProperty( |
261 | | - "client_id", "5KYccdYxWB2RxMq5FTbkWisXi2dS6yFN9R7RVlFCG98FRdz6Mf5ojY2fyJCUlXJZ" |
262 | | - ) |
| 221 | + propertiesA.setProperty("client_id", "\"" + default + "\"") |
263 | 222 | } |
264 | 223 | buildConfigField( |
265 | 224 | "String", "ANDROIDACY_CLIENT_ID", "\"" + propertiesA.getProperty("client_id") + "\"" |
@@ -300,20 +259,6 @@ android { |
300 | 259 | buildConfigField("boolean", "DEFAULT_ENABLE_CRASH_REPORTING", "false") |
301 | 260 | buildConfigField("boolean", "DEFAULT_ENABLE_CRASH_REPORTING_PII", "false") |
302 | 261 | buildConfigField("boolean", "DEFAULT_ENABLE_ANALYTICS", "false") |
303 | | - val properties = Properties() |
304 | | - if (project.rootProject.file("local.properties").exists()) { |
305 | | - properties.load(project.rootProject.file("local.properties").reader()) |
306 | | - // grab matomo.url |
307 | | - buildConfigField( |
308 | | - "String", "ANALYTICS_ENDPOINT", "\"" + properties.getProperty( |
309 | | - "matomo.url", "https://s-api.androidacy.com/matomo.php" |
310 | | - ) + "\"" |
311 | | - ) |
312 | | - } else { |
313 | | - buildConfigField( |
314 | | - "String", "ANALYTICS_ENDPOINT", "\"https://s-api.androidacy.com/matomo.php\"" |
315 | | - ) |
316 | | - } |
317 | 262 | buildConfigField("boolean", "ENABLE_PROTECTION", "true") |
318 | 263 |
|
319 | 264 | // Repo with ads or tracking feature are disabled by default for the |
@@ -355,44 +300,6 @@ android { |
355 | 300 | } |
356 | 301 | } |
357 | 302 |
|
358 | | -sentry { |
359 | | - |
360 | | - includeProguardMapping.set(true) |
361 | | - |
362 | | - autoUploadProguardMapping.set(hasSentryConfig) |
363 | | - |
364 | | - experimentalGuardsquareSupport.set(true) |
365 | | - |
366 | | - uploadNativeSymbols.set(hasSentryConfig) |
367 | | - |
368 | | - includeNativeSources.set(hasSentryConfig) |
369 | | - |
370 | | - tracingInstrumentation { |
371 | | - enabled.set(true) |
372 | | - |
373 | | - logcat { |
374 | | - enabled.set(true) |
375 | | - |
376 | | - minLevel.set(LogcatLevel.WARNING) |
377 | | - } |
378 | | - } |
379 | | - |
380 | | - autoInstallation { |
381 | | - enabled.set(true) |
382 | | - } |
383 | | - |
384 | | - includeDependenciesReport.set(true) |
385 | | - includeSourceContext.set(hasSentryConfig) |
386 | | - |
387 | | - // Includes additional source directories into the source bundle. |
388 | | - // These directories are resolved relative to the project directory. |
389 | | - additionalSourceDirsForSourceContext.set(setOf("src/main/java", "src/main/kotlin")) |
390 | | - |
391 | | - org.set("androidacy") |
392 | | - projectName.set("foxmmm") |
393 | | - uploadNativeSymbols.set(hasSentryConfig) |
394 | | -} |
395 | | - |
396 | 303 | val abiCodes = mapOf("armeabi-v7a" to 1, "x86" to 2, "x86_64" to 3, "arm64-v8a" to 4) |
397 | 304 |
|
398 | 305 | // For per-density APKs, create a similar map: |
@@ -452,11 +359,7 @@ dependencies { |
452 | 359 | implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0") |
453 | 360 | implementation("androidx.webkit:webkit:1.8.0") |
454 | 361 | implementation("com.google.android.material:material:1.9.0") |
455 | | - implementation("dev.rikka.rikkax.layoutinflater:layoutinflater:1.3.0") |
456 | | - implementation("dev.rikka.rikkax.insets:insets:1.3.0") |
457 | | - implementation("com.github.KieronQuinn:MonetCompat:0.4.1") |
458 | | - implementation("com.github.Fox2Code.FoxCompat:foxcompat:1.2.14") |
459 | | - implementation("com.github.Fox2Code.FoxCompat:hiddenapis:1.2.14") |
| 362 | + |
460 | 363 | implementation("com.mikepenz:aboutlibraries:10.8.3") |
461 | 364 |
|
462 | 365 | // Utils |
@@ -481,9 +384,6 @@ dependencies { |
481 | 384 | implementation("com.github.Fox2Code:RosettaX:1.0.9") |
482 | 385 | implementation("com.github.Fox2Code:AndroidANSI:1.2.1") |
483 | 386 |
|
484 | | - // sentry |
485 | | - implementation("io.sentry:sentry-android:6.29.0") |
486 | | - |
487 | 387 | // Markdown |
488 | 388 | // TODO: switch to an updated implementation |
489 | 389 | implementation("io.noties.markwon:core:4.6.2") |
@@ -493,10 +393,6 @@ dependencies { |
493 | 393 | implementation("com.google.net.cronet:cronet-okhttp:0.1.0") |
494 | 394 | implementation("com.caverock:androidsvg:1.4") |
495 | 395 |
|
496 | | - implementation("dev.rikka.rikkax.core:core:1.4.1") |
497 | | - implementation("org.lsposed.hiddenapibypass:hiddenapibypass:4.3") |
498 | | - implementation("com.github.tiann:FreeReflection:3.1.0") |
499 | | - |
500 | 396 | implementation("androidx.core:core-ktx:1.12.0") |
501 | 397 |
|
502 | 398 | // timber |
@@ -510,7 +406,7 @@ dependencies { |
510 | 406 | implementation("org.apache.commons:commons-compress:1.24.0") |
511 | 407 |
|
512 | 408 | // analytics |
513 | | - implementation("com.github.matomo-org:matomo-sdk-android:HEAD") |
| 409 | + implementation("ly.count.android:sdk:23.8.2") |
514 | 410 |
|
515 | 411 | // annotations |
516 | 412 | implementation("org.jetbrains:annotations-java5:24.0.1") |
|