11plugins {
22 // Gradle doesn't allow conditionally enabling/disabling plugins
3- id " io.sentry.android.gradle" version " 3.1.5 "
3+ id " io.sentry.android.gradle" version " 3.3.0 "
44 id ' com.android.application'
55 id ' com.mikepenz.aboutlibraries.plugin'
66}
77
88android {
99 namespace " com.fox2code.mmm"
1010 compileSdk 33
11+ buildToolsVersion ' 30.0.3'
12+ signingConfigs {
13+ release {
14+ // Everything comes from local.properties
15+ Properties properties = new Properties ()
16+ if (project. rootProject. file(' local.properties' ). exists()) {
17+ properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
18+ storeFile file(properties. getProperty(' keystore.file' ))
19+ storePassword properties. getProperty(' keystore.password' )
20+ keyAlias ' key0'
21+ keyPassword properties. getProperty(' keystore.password' )
22+ }
23+ }
24+ }
1125
1226 defaultConfig {
1327 applicationId " com.fox2code.mmm"
1428 minSdk 21
1529 targetSdk 33
16- versionCode 59
17- versionName " 0.6.7 "
30+ versionCode 60
31+ versionName " 0.6.8 "
1832 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
33+ signingConfig signingConfigs. release
1934 }
2035
2136 buildTypes {
2237 release {
2338 minifyEnabled true
2439 shrinkResources true
25- proguardFiles getDefaultProguardFile(' proguard-android-optimize.txt' ), ' proguard-rules.pro'
40+ proguardFiles getDefaultProguardFile(' proguard-android-optimize.txt' ),
41+ ' proguard-rules.pro'
2642 }
2743 debug {
2844 applicationIdSuffix ' .debug'
2945 debuggable true
46+
3047 // ONLY FOR TESTING SENTRY
3148 // minifyEnabled true
3249 // shrinkResources true
33- // proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
50+ // proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),'proguard-rules.pro'
3451 }
3552 }
3653
@@ -40,9 +57,26 @@ android {
4057 dimension " type"
4158 buildConfigField " boolean" , " ENABLE_AUTO_UPDATER" , " true"
4259 buildConfigField " boolean" , " DEFAULT_ENABLE_CRASH_REPORTING" , " true"
43- buildConfigField(" java.util.List<String>" ,
44- " ENABLED_REPOS" ,
45- " java.util.Arrays.asList(\" magisk_alt_repo\" , \" androidacy_repo\" )" ,)
60+ // Get the androidacy client ID from the androidacy.properties
61+ Properties properties = new Properties ()
62+ // If androidacy.properties doesn't exist, use the default client ID which is heavily
63+ // rate limited to 30 requests per minute
64+ if (project. rootProject. file(' androidacy.properties' ). exists()) {
65+ properties. load(project. rootProject. file(' androidacy.properties' ). newDataInputStream())
66+ } else {
67+ properties. setProperty(' client_id' , ' "5KYccdYxWB2RxMq5FTbkWisXi2dS6yFN9R7RVlFCG98FRdz6Mf5ojY2fyJCUlXJZ"' )
68+ }
69+ buildConfigField(" String" , " ANDROIDACY_CLIENT_ID" , properties. getProperty(' client_id' ))
70+ // If client ID is empty, disable androidacy
71+ if (properties. getProperty(' client_id' ). isEmpty()) {
72+ buildConfigField(" java.util.List<String>" ,
73+ " ENABLED_REPOS" , " java.util.Arrays.asList(\" magisk_alt_repo\" )" )
74+ } else {
75+ buildConfigField(" java.util.List<String>" ,
76+ " ENABLED_REPOS" ,
77+ " java.util.Arrays.asList(\" magisk_alt_repo\" , \" androidacy_repo\" )" ,)
78+ }
79+
4680 }
4781
4882 fdroid {
@@ -62,6 +96,17 @@ android {
6296 buildConfigField(" java.util.List<String>" ,
6397 " ENABLED_REPOS" ,
6498 " java.util.Arrays.asList(\" magisk_alt_repo\" )" ,)
99+
100+ // Get the androidacy client ID from the androidacy.properties
101+ Properties properties = new Properties ()
102+ // If androidacy.properties doesn't exist, use the default client ID which is limited
103+ // to 50 requests per minute
104+ if (project. rootProject. file(' androidacy.properties' ). exists()) {
105+ properties. load(project. rootProject. file(' androidacy.properties' ). newDataInputStream())
106+ } else {
107+ properties. setProperty(' client_id' , ' "dQ1p7X8bF14PVJ7wAU6ORVjPB2IeTinsuAZ8Uos6tQiyUdUyIjSyZSmN54QBbaTy"' )
108+ }
109+ buildConfigField(" String" , " ANDROIDACY_CLIENT_ID" , properties. getProperty(' client_id' ))
65110 }
66111 }
67112
@@ -137,7 +182,7 @@ sentry {
137182 // as Gradle will resolve it to the latest version.
138183 //
139184 // Defaults to the latest published sentry version.
140- sentryVersion = ' 6.5.0 '
185+ sentryVersion = ' 6.9.2 '
141186 }
142187}
143188
@@ -175,31 +220,35 @@ dependencies {
175220 implementation ' androidx.work:work-runtime:2.7.1'
176221 implementation ' com.squareup.okhttp3:okhttp-dnsoverhttps:5.0.0-alpha.10'
177222 implementation ' com.squareup.okhttp3:okhttp-brotli:5.0.0-alpha.10'
223+ // Chromium cronet from microG
224+ implementation fileTree(dir : ' libs' , include : ' *.jar' )
225+ // Force prefer our own version of Cronet
178226 implementation ' com.github.topjohnwu.libsu:io:5.0.1'
179227 implementation ' com.github.Fox2Code:RosettaX:1.0.9'
180228 implementation ' com.github.Fox2Code:AndroidANSI:1.0.1'
181229
182230 if (hasSentryConfig) {
183231 // Error reporting
184- defaultImplementation ' io.sentry:sentry-android:6.5.0 '
185- defaultImplementation ' io.sentry:sentry-android-fragment:6.5.0 '
186- defaultImplementation ' io.sentry:sentry-android-okhttp:6.5.0 '
187- defaultImplementation ' io.sentry:sentry-android-core:6.5.0 '
188- defaultImplementation ' io.sentry:sentry-android-ndk:6.5.0 '
232+ defaultImplementation ' io.sentry:sentry-android:6.9.2 '
233+ defaultImplementation ' io.sentry:sentry-android-fragment:6.9.2 '
234+ defaultImplementation ' io.sentry:sentry-android-okhttp:6.9.2 '
235+ defaultImplementation ' io.sentry:sentry-android-core:6.9.2 '
236+ defaultImplementation ' io.sentry:sentry-android-ndk:6.9.2 '
189237 }
190238
191239 // Markdown
192240 implementation " io.noties.markwon:core:4.6.2"
193241 implementation " io.noties.markwon:html:4.6.2"
194242 implementation " io.noties.markwon:image:4.6.2"
195243 implementation " io.noties.markwon:syntax-highlight:4.6.2"
244+ implementation ' com.google.net.cronet:cronet-okhttp:0.1.0'
245+ // Ignore all org.chromium.net dependencies
196246 annotationProcessor " io.noties:prism4j-bundler:2.0.0"
197247 implementation " com.caverock:androidsvg:1.4"
198248
199249 // Test
200250 testImplementation ' junit:junit:4.13.2'
201- androidTestImplementation ' androidx.test.ext:junit:1.1.3'
202- androidTestImplementation ' androidx.test.espresso:espresso-core:3.4.0'
251+ androidTestImplementation ' androidx.test.ext:junit:1.1.4'
203252}
204253
205254if (hasSentryConfig) {
0 commit comments