Skip to content

Commit 6d22c3c

Browse files
misc fixes and upgrades
Signed-off-by: androidacy-user <opensource@androidacy.com>
1 parent c4ea88c commit 6d22c3c

60 files changed

Lines changed: 645 additions & 1054 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-debug.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,33 +62,33 @@ jobs:
6262

6363
# UPLOAD ARTIFACT SECTION
6464
# Will be shorter, when https://github.com/actions/upload-artifact/pull/354 will be merged
65-
# FoxMMM-default-debug
66-
- name: Upload FoxMMM-default-arm64-v8a-debug
65+
# AMMM-default-debug
66+
- name: Upload AMMM-default-arm64-v8a-debug
6767
uses: actions/upload-artifact@v3
6868
with:
69-
name: FoxMMM-default-arm64-v8a-debug
69+
name: AMMM-default-arm64-v8a-debug
7070
path: app/build/outputs/apk/default/debug/*-default-arm64-v8a-debug.apk
7171

72-
- name: Upload FoxMMM-default-armeabi-v7a-debug
72+
- name: Upload AMMM-default-armeabi-v7a-debug
7373
uses: actions/upload-artifact@v3
7474
with:
75-
name: FoxMMM-default-armeabi-v7a-debug
75+
name: AMMM-default-armeabi-v7a-debug
7676
path: app/build/outputs/apk/default/debug/*-default-armeabi-v7a-debug.apk
7777

78-
- name: Upload FoxMMM-default-universal-debug
78+
- name: Upload AMMM-default-universal-debug
7979
uses: actions/upload-artifact@v3
8080
with:
81-
name: FoxMMM-default-universal-debug
81+
name: AMMM-default-universal-debug
8282
path: app/build/outputs/apk/default/debug/*-default-universal-debug.apk
8383

84-
- name: Upload FoxMMM-default-x86-debug
84+
- name: Upload AMMM-default-x86-debug
8585
uses: actions/upload-artifact@v3
8686
with:
87-
name: FoxMMM-default-x86-debug
87+
name: AMMM-default-x86-debug
8888
path: app/build/outputs/apk/default/debug/*-default-x86-debug.apk
8989

90-
- name: Upload FoxMMM-default-x86_64-debug
90+
- name: Upload AMMM-default-x86_64-debug
9191
uses: actions/upload-artifact@v3
9292
with:
93-
name: FoxMMM-default-x86_64-debug
93+
name: AMMM-default-x86_64-debug
9494
path: app/build/outputs/apk/default/debug/*-default-x86_64-debug.apk

app/build.gradle.kts

Lines changed: 19 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
@file:Suppress("UnstableApiUsage", "SpellCheckingInspection")
66

77
import com.android.build.api.variant.FilterConfiguration.FilterType.ABI
8-
import io.sentry.android.gradle.instrumentation.logcat.LogcatLevel
98
import java.util.Properties
109

1110
plugins {
@@ -14,11 +13,8 @@ plugins {
1413
id("com.mikepenz.aboutlibraries.plugin")
1514
kotlin("android")
1615
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"
1917
}
20-
21-
val hasSentryConfig = File(rootProject.projectDir, "sentry.properties").exists()
2218
android {
2319
// functions to get git info: gitCommitHash, gitBranch, gitRemote
2420
val gitCommitHash = providers.exec {
@@ -52,8 +48,8 @@ android {
5248
applicationId = "com.fox2code.mmm"
5349
minSdk = 26
5450
targetSdk = 34
55-
versionCode = 85
56-
versionName = "2.3.1"
51+
versionCode = 86
52+
versionName = "2.3.2"
5753
vectorDrawables {
5854
useSupportLibrary = true
5955
}
@@ -85,10 +81,6 @@ android {
8581
"en"
8682
)
8783
)
88-
// ksp room processor
89-
room {
90-
schemaLocationDir.set(file("roomSchemas"))
91-
}
9284
}
9385

9486
splits {
@@ -159,39 +151,23 @@ android {
159151
buildConfigField("boolean", "DEFAULT_ENABLE_CRASH_REPORTING", "true")
160152
buildConfigField("boolean", "DEFAULT_ENABLE_CRASH_REPORTING_PII", "true")
161153
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-
}
176154
buildConfigField("boolean", "ENABLE_PROTECTION", "true")
177155
// Get the androidacy client ID from the androidacy.properties
178156

179157
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"
182159
if (project.rootProject.file("androidacy.properties").exists()) {
183160
propertiesA.load(project.rootProject.file("androidacy.properties").reader())
184-
properties.setProperty(
185-
"client_id", "\"" + propertiesA.getProperty(
161+
propertiesA.setProperty(
162+
"client_id", propertiesA.getProperty(
186163
"client_id",
187-
"5KYccdYxWB2RxMq5FTbkWisXi2dS6yFN9R7RVlFCG98FRdz6Mf5ojY2fyJCUlXJZ"
188-
) + "\""
164+
default
165+
)
189166
)
190167
} else {
191-
properties.setProperty(
192-
"client_id", "5KYccdYxWB2RxMq5FTbkWisXi2dS6yFN9R7RVlFCG98FRdz6Mf5ojY2fyJCUlXJZ"
193-
)
168+
propertiesA.setProperty("client_id", "\"" + default + "\"")
194169
}
170+
195171
buildConfigField(
196172
"String", "ANDROIDACY_CLIENT_ID", "\"" + propertiesA.getProperty("client_id") + "\""
197173
)
@@ -228,38 +204,21 @@ android {
228204
buildConfigField("boolean", "DEFAULT_ENABLE_CRASH_REPORTING", "true")
229205
buildConfigField("boolean", "DEFAULT_ENABLE_CRASH_REPORTING_PII", "true")
230206
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-
}
245207
buildConfigField("boolean", "ENABLE_PROTECTION", "true")
246208
// Get the androidacy client ID from the androidacy.properties
247209

248210
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"
251212
if (project.rootProject.file("androidacy.properties").exists()) {
252213
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+
)
258219
)
259220
} else {
260-
properties.setProperty(
261-
"client_id", "5KYccdYxWB2RxMq5FTbkWisXi2dS6yFN9R7RVlFCG98FRdz6Mf5ojY2fyJCUlXJZ"
262-
)
221+
propertiesA.setProperty("client_id", "\"" + default + "\"")
263222
}
264223
buildConfigField(
265224
"String", "ANDROIDACY_CLIENT_ID", "\"" + propertiesA.getProperty("client_id") + "\""
@@ -300,20 +259,6 @@ android {
300259
buildConfigField("boolean", "DEFAULT_ENABLE_CRASH_REPORTING", "false")
301260
buildConfigField("boolean", "DEFAULT_ENABLE_CRASH_REPORTING_PII", "false")
302261
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-
}
317262
buildConfigField("boolean", "ENABLE_PROTECTION", "true")
318263

319264
// Repo with ads or tracking feature are disabled by default for the
@@ -355,44 +300,6 @@ android {
355300
}
356301
}
357302

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-
396303
val abiCodes = mapOf("armeabi-v7a" to 1, "x86" to 2, "x86_64" to 3, "arm64-v8a" to 4)
397304

398305
// For per-density APKs, create a similar map:
@@ -452,11 +359,7 @@ dependencies {
452359
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
453360
implementation("androidx.webkit:webkit:1.8.0")
454361
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+
460363
implementation("com.mikepenz:aboutlibraries:10.8.3")
461364

462365
// Utils
@@ -481,9 +384,6 @@ dependencies {
481384
implementation("com.github.Fox2Code:RosettaX:1.0.9")
482385
implementation("com.github.Fox2Code:AndroidANSI:1.2.1")
483386

484-
// sentry
485-
implementation("io.sentry:sentry-android:6.29.0")
486-
487387
// Markdown
488388
// TODO: switch to an updated implementation
489389
implementation("io.noties.markwon:core:4.6.2")
@@ -493,10 +393,6 @@ dependencies {
493393
implementation("com.google.net.cronet:cronet-okhttp:0.1.0")
494394
implementation("com.caverock:androidsvg:1.4")
495395

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-
500396
implementation("androidx.core:core-ktx:1.12.0")
501397

502398
// timber
@@ -510,7 +406,7 @@ dependencies {
510406
implementation("org.apache.commons:commons-compress:1.24.0")
511407

512408
// analytics
513-
implementation("com.github.matomo-org:matomo-sdk-android:HEAD")
409+
implementation("ly.count.android:sdk:23.8.2")
514410

515411
// annotations
516412
implementation("org.jetbrains:annotations-java5:24.0.1")

app/src/main/AndroidManifest.xml

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
tools:ignore="QueryAllPackagesPermission"
55
tools:targetApi="tiramisu">
66

7-
<uses-sdk tools:overrideLibrary="io.sentry.android" />
8-
97
<queries>
108
<intent>
119
<action android:name="com.fox2code.mmm.utils.intent.action.OPEN_EXTERNAL" />
@@ -32,9 +30,12 @@
3230
<!-- Open config apps for applications -->
3331
<uses-permission-sdk-23 android:name="android.permission.QUERY_ALL_PACKAGES" />
3432
<!-- Open and read zips -->
35-
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
33+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
34+
android:maxSdkVersion="32" />
3635
<!-- Write to external storage -->
37-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
36+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
37+
android:maxSdkVersion="32"
38+
tools:ignore="ScopedStorage" />
3839
<!-- Post background notifications -->
3940
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
4041
<!-- Install updates -->
@@ -187,31 +188,6 @@
187188
android:name="android.support.FILE_PROVIDER_PATHS"
188189
android:resource="@xml/shared_file_paths" />
189190
</provider>
190-
191-
<meta-data
192-
android:name="io.sentry.auto-init"
193-
android:value="false" />
194-
<meta-data
195-
android:name="io.sentry.dsn"
196-
android:value="https://09652942e9c042e39daed0bc5a8a98c3@g-fe.androidacy.com/3" /> <!-- enable view hierarchy for crashes -->
197-
<meta-data
198-
android:name="io.sentry.attach-view-hierarchy"
199-
android:value="true" /> <!-- Sane value, but feel free to lower it -->
200-
<meta-data
201-
android:name="io.sentry.traces.sample-rate"
202-
android:value="0.2" /> <!-- Doesn't actually monitor anything, just used to get the activities the user went through -->
203-
<meta-data
204-
android:name="io.sentry.traces.user-interaction.enable"
205-
android:value="true" /> <!-- Just a screenshot of ONLY the current activity at the time of the crash -->
206-
<meta-data
207-
android:name="io.sentry.attach-screenshot"
208-
android:value="true" /> <!-- Just the current activity at the time of the crash -->
209-
<meta-data
210-
android:name="io.sentry.attach-stacktrace"
211-
android:value="true" /> <!-- Performance profiling -->
212-
<meta-data
213-
android:name="io.sentry.traces.profiling.sample-rate"
214-
android:value="0.2" />
215191
</application>
216192

217193
</manifest>

0 commit comments

Comments
 (0)