| 7 | apply plugin: "io.sentry.android.gradle" |
| 8 | apply plugin: "io.objectbox" |
| 9 |
| 10 | apply plugin: 'org.telegram.build-plugin' |
| 11 | apply plugin: 'org.telegram.build-app-plugin' |
| 12 | apply plugin: 'idea' |
| 13 |
| 14 | idea { |
| 15 | module { |
| 16 | excludeDirs += [ |
| 17 | file('jni/td'), |
| 18 | file('jni/third_party/boringssl'), |
| 19 | file('jni/third_party/dav1d'), |
| 20 | file('jni/third_party/ffmpeg'), |
| 21 | file('jni/third_party/libvpx'), |
| 22 | file('jni/third_party/libyuv'), |
| 23 | file('jni/third_party/openh264'), |
| 24 | file('jni/third_party/xiph'), |
| 25 | file('jni/tlottie'), |
| 26 | file('jni/voip/webrtc'), |
| 27 | file('jni/sqlite') |
| 28 | ] |
| 29 | } |
| 30 | } |
| 31 |
| 32 | def verName = APP_VERSION_NAME |
| 33 | def verCode = 1249 |
| 34 |
| 35 |
| 36 | def officialVer = APP_VERSION_NAME |
| 37 | def officialCode = APP_VERSION_CODE |
| 38 |
| 39 | def serviceAccountCredentialsFile = rootProject.file("service_account_credentials.json") |
| 40 |
| 41 | def beta = verName.contains("preview") |
| 42 |
| 43 | if (serviceAccountCredentialsFile.isFile()) { |
| 44 | setupPlay(beta) |
| 45 | play.serviceAccountCredentials = serviceAccountCredentialsFile |
| 46 | } else if (System.getenv().containsKey("ANDROID_PUBLISHER_CREDENTIALS")) { |
| 47 | setupPlay(beta) |
| 48 | } |
| 49 |
| 50 | void setupPlay(boolean beta) { |
| 51 | apply plugin: "com.github.triplet.play" |
| 52 | play { |
| 53 | track = beta ? "beta" : "production" |
| 54 | defaultToAppBundles = true |
| 55 | } |
| 56 | } |
| 57 |
| 58 | configurations { |
| 59 | compile.exclude module: "support-v4" |
| 60 | } |
| 61 |
| 62 | def keystorePwd = null |
| 63 | def alias = null |
| 64 | def pwd = null |
| 65 | def sentry_token = System.getenv("SENTRY_AUTH_TOKEN") |
| 66 | def nagram_build_args = System.getenv("NAGRAM_BUILD_ARGS") |
| 67 | def disableCMakeRelWithDebInfo = System.getenv("COMPILE_NATIVE") == null |
| 68 |
| 69 | Properties properties |
| 70 | def base64 = System.getenv("LOCAL_PROPERTIES") |
| 71 | if (base64 != null && !base64.isBlank()) { |
| 72 | properties = new Properties() |
| 73 | properties.load(new ByteArrayInputStream(Base64.decoder.decode(base64))) |
| 74 | } else if (project.rootProject.file("local.properties").exists()) { |
| 75 | properties = new Properties() |
| 76 | properties.load(project.rootProject.file("local.properties").newDataInputStream()) |
| 77 | } |
| 78 |
| 79 | if (properties != null) { |
| 80 | keystorePwd = properties.getProperty("KEYSTORE_PASS") |
| 81 | alias = properties.getProperty("ALIAS_NAME") |
| 82 | pwd = properties.getProperty("ALIAS_PASS") |
| 83 | sentry_token = properties.getProperty("SENTRY_AUTH_TOKEN", sentry_token) |
| 84 | nagram_build_args = properties.getProperty("NAGRAM_BUILD_ARGS", nagram_build_args) |
| 85 | } |
| 86 |
| 87 | keystorePwd = keystorePwd ?: System.getenv("KEYSTORE_PASS") |
| 88 | alias = alias ?: System.getenv("ALIAS_NAME") |
| 89 | pwd = pwd ?: System.getenv("ALIAS_PASS") |
| 90 |
| 91 | def sentry_upload = sentry_token != null && !sentry_token.isEmpty() |
| 92 |
| 93 | def targetTask = "" |
| 94 | if (!gradle.startParameter.taskNames.isEmpty()) { |
| 95 | if (gradle.startParameter.taskNames.size == 1) { |
| 96 | targetTask = gradle.startParameter.taskNames[0].toLowerCase() |
| 97 | } |
| 98 | } |
| 99 |
| 100 | def nativeTarget = System.getenv("NATIVE_TARGET") |
| 101 | if (nativeTarget == null) nativeTarget = "" |
| 102 |
| 103 | android { |
| 104 | compileSdkVersion 36 |
| 105 | buildToolsVersion '36.0.0' |
| 106 | ndkVersion rootProject.ext.ndkVersion // 27.2.12479018 |
| 107 |
| 108 | defaultConfig.applicationId = "xyz.nextalone.nagram" |
| 109 |
| 110 | sourceSets { |
| 111 |
| 112 | main { |
| 113 | assets.srcDirs = ["src/main/assets"] |
| 114 | } |
| 115 |
| 116 | debug { |
| 117 | java { |
| 118 | srcDirs "src/main/java" |
| 119 | } |
| 120 | jniLibs { |
| 121 | srcDir "src/main/libs" |
| 122 | } |
| 123 | } |
| 124 |
| 125 | release { |
| 126 | java { |
| 127 | srcDirs "src/main/java" |
| 128 | } |
| 129 | jniLibs { |
| 130 | srcDir "src/main/libs" |
| 131 | } |
| 132 | } |
| 133 | } |
| 134 |
| 135 | externalNativeBuild { |
| 136 | cmake { |
| 137 | path "jni/CMakeLists.txt" |
| 138 | } |
| 139 | } |
| 140 |
| 141 | lintOptions { |
| 142 | disable 'MissingTranslation' |
| 143 | disable 'ExtraTranslation' |
| 144 | disable 'BlockedPrivateApi' |
| 145 | } |
| 146 |
| 147 | compileOptions { |
| 148 | sourceCompatibility JavaVersion.VERSION_11 |
| 149 | targetCompatibility JavaVersion.VERSION_11 |
| 150 |
| 151 | coreLibraryDesugaringEnabled true |
| 152 | } |
| 153 |
| 154 | splits { |
| 155 |
| 156 | abi { |
| 157 | if (targetTask.contains("fdroid")) { |
| 158 | enable false |
| 159 | universalApk true |
| 160 | } else { |
| 161 | enable true |
| 162 | reset() |
| 163 | universalApk false |
| 164 | if (!nativeTarget.isBlank()) { |
| 165 | include nativeTarget |
| 166 | } else { |
| 167 | include 'armeabi-v7a', 'arm64-v8a' |
| 168 | } |
| 169 | } |
| 170 | } |
| 171 |
| 172 | } |
| 173 |
| 174 | defaultConfig { |
| 175 | minSdkVersion 21 |
| 176 | //noinspection ExpiredTargetSdkVersion,OldTargetApi |
| 177 | targetSdkVersion 36 |
| 178 |
| 179 | versionName verName |
| 180 | versionCode verCode |
| 181 |
| 182 | def appId = "11535358" |
| 183 | def appHash = "33d372962fadb01df47e6ceed4e33cd6" |
| 184 |
| 185 | //obtain your own keys at https://core.telegram.org/api/obtaining_api_id |
| 186 |
| 187 | if (properties != null) { |
| 188 | appId = properties.getProperty("TELEGRAM_APP_ID") ?: System.getenv("TELEGRAM_APP_ID") ?: appId |
| 189 | appHash = properties.getProperty("TELEGRAM_APP_HASH") ?: System.getenv("TELEGRAM_APP_HASH") ?: appHash |
| 190 | } |
| 191 |
| 192 | buildConfigField "String", "BUILD_VERSION_STRING", "\"" + verName + "\"" |
| 193 | buildConfigField "long", "BUILD_TIMESTAMP", APP_BUILD_TIMESTAMP + "" |
| 194 | buildConfigField "String", "OFFICIAL_VERSION", "\"" + officialVer + "\"" |
| 195 | buildConfigField "int", "OFFICIAL_VERSION_CODE", officialCode + "" |
| 196 | buildConfigField "int", "APP_ID", appId |
| 197 | buildConfigField "String", "APP_HASH", "\"" + appHash + "\"" |
| 198 |
| 199 | externalNativeBuild { |
| 200 | cmake { |
| 201 | version '3.22.1' |
| 202 | arguments '-DANDROID_STL=c++_static', '-DANDROID_PLATFORM=android-21' //, '-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON' |
| 203 | targets 'tmessages.49' |
| 204 | } |
| 205 | } |
| 206 | } |
| 207 |
| 208 | bundle { |
| 209 | language { |
| 210 | enableSplit = false |
| 211 | } |
| 212 | } |
| 213 |
| 214 | kotlinOptions { |
| 215 | jvmTarget = JavaVersion.VERSION_11.toString() |
| 216 | } |
| 217 |
| 218 | testOptions { |
| 219 | unitTests.includeAndroidResources = true |
| 220 | } |
| 221 |
| 222 | androidResources { |
| 223 | noCompress += "pack" |
| 224 | localeFilters += ["zz"] |
| 225 | } |
| 226 |
| 227 | signingConfigs { |
| 228 | release { |
| 229 | storeFile project.file("release.keystore") |
| 230 | storePassword keystorePwd |
| 231 | keyAlias alias |
| 232 | keyPassword pwd |
| 233 | } |
| 234 | } |
| 235 |
| 236 | buildTypes { |
| 237 | debug { |
| 238 | isDefault true |
| 239 | debuggable true |
| 240 | jniDebuggable true |
| 241 | multiDexEnabled true |
| 242 | signingConfig signingConfigs.release |
| 243 | } |
| 244 |
| 245 | release { |
| 246 | debuggable false |
| 247 | jniDebuggable false |
| 248 | minifyEnabled true |
| 249 | shrinkResources true |
| 250 | multiDexEnabled true |
| 251 | proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" |
| 252 | matchingFallbacks = ["release", "debug"] |
| 253 | signingConfig signingConfigs.release |
| 254 | } |
| 255 | } |
| 256 |
| 257 | flavorDimensions "version" |
| 258 |
| 259 | packagingOptions { |
| 260 | jniLibs { |
| 261 | excludes += ['/fabric/**', '/META-INF/native-image/**'] |
| 262 | useLegacyPackaging true |
| 263 | } |
| 264 | resources { |
| 265 | excludes += ['/fabric/**', '/META-INF/*.version', '/META-INF/*.kotlin_module', '/META-INF/native-image/**', '/builddef.lst', '/*.txt', '/DebugProbesKt.bin', '/okhttp3/internal/publicsuffix/NOTICE'] |
| 266 | excludes += ["META-INF/INDEX.LIST"] // hutool |
| 267 | } |
| 268 |
| 269 | def lib = "libtmessages.*.so" |
| 270 | pickFirst "lib/armeabi-v7a/$lib" |
| 271 | pickFirst "lib/arm64-v8a/$lib" |
| 272 | } |
| 273 |
| 274 | buildFeatures { |
| 275 | buildConfig true |
| 276 | } |
| 277 |
| 278 | tasks.configureEach { task -> |
| 279 | if (((task.name.endsWith("Ndk") || task.name.startsWith("generateJsonModel") || task.name.startsWith("externalNativeBuild"))) && !task.name.contains("Debug")) { |
| 280 | task.enabled = false |
| 281 | } |
| 282 | if (task.name.contains("uploadCrashlyticsMappingFile")) { |
| 283 | enabled = false |
| 284 | } |
| 285 | if (disableCMakeRelWithDebInfo && task.name.contains("CMakeRelWithDebInfo")) { |
| 286 | enabled = false |
| 287 | } |
| 288 | } |
| 289 |
| 290 | tasks.configureEach { task -> |
| 291 | if (task.name.startsWith("uploadCrashlyticsMappingFile")) { |
| 292 | task.enabled = false |
| 293 | } else if (task.name.contains("Crashlytics") && task.name.contains("NoGcm")) { |
| 294 | task.enabled = false |
| 295 | } else if (task.name.endsWith("GoogleServices") && task.name.contains("NoGcm")) { |
| 296 | task.enabled = false |
| 297 | } else if (task.name.contains("buildCMakeDebug") && nagram_build_args != null && nagram_build_args.contains("skip_buildCMakeDebug")) { |
| 298 | task.enabled = false |
| 299 | } |
| 300 | } |
| 301 |
| 302 | applicationVariants.configureEach { variant -> |
| 303 | variant.outputs.configureEach { output -> |
| 304 | String gramName = "Nagram" |
| 305 | String first = String.format("%s-v%s(%s)", gramName, versionName, versionCode) |
| 306 | String name = outputFileName.replace("TMessagesProj", first) |
| 307 | name = name.replace("-release", "") |
| 308 | outputFileName = name |
| 309 | } |
| 310 | } |
| 311 |
| 312 | namespace "org.telegram.messenger" |
| 313 | } |
| 314 |
| 315 | def fcmVersion = "23.4.1" |
| 316 | def crashlyticsVersion = "18.6.2" |
| 317 |
| 318 | dependencies { |
| 319 | implementation 'androidx.fragment:fragment:1.8.9' |
| 320 | implementation "androidx.core:core-ktx:1.16.0" |
| 321 | implementation "androidx.palette:palette-ktx:1.0.0" |
| 322 | implementation "androidx.exifinterface:exifinterface:1.3.7" |
| 323 | implementation "androidx.dynamicanimation:dynamicanimation:1.0.0" |
| 324 | implementation "androidx.sharetarget:sharetarget:1.2.0" |
| 325 | implementation "androidx.interpolator:interpolator:1.0.0" |
| 326 | implementation 'androidx.biometric:biometric:1.1.0' |
| 327 | implementation 'androidx.webkit:webkit:1.14.0' |
| 328 |
| 329 | implementation ('com.google.android.gms:play-services-cast-framework:21.4.0') { |
| 330 | exclude group: 'androidx.recyclerview', module: "recyclerview" |
| 331 | } |
| 332 | implementation ("androidx.mediarouter:mediarouter:1.7.0") { |
| 333 | exclude group: 'androidx.recyclerview', module: "recyclerview" |
| 334 | } |
| 335 | implementation 'com.google.zxing:core:3.5.4' |
| 336 |
| 337 | implementation 'androidx.car.app:app:1.7.0' |
| 338 | implementation 'androidx.car.app:app-projected:1.7.0' |
| 339 | implementation 'org.nanohttpd:nanohttpd:2.3.1' |
| 340 |
| 341 | compileOnly 'org.checkerframework:checker-qual:2.5.2' |
| 342 | compileOnly 'org.checkerframework:checker-compat-qual:2.5.0' |
| 343 | implementation "com.google.firebase:firebase-messaging:$fcmVersion" |
| 344 | implementation "com.google.firebase:firebase-crashlytics:$crashlyticsVersion" |
| 345 | implementation 'com.google.android.gms:play-services-maps:18.1.0' |
| 346 | implementation 'com.google.android.gms:play-services-auth:20.4.0' |
| 347 | implementation 'com.google.android.gms:play-services-vision:20.1.3' |
| 348 | implementation 'com.google.android.gms:play-services-wearable:18.0.0' |
| 349 | implementation 'com.google.android.gms:play-services-location:21.0.1' |
| 350 | implementation 'com.google.android.gms:play-services-wallet:19.1.0' |
| 351 | implementation "com.googlecode.mp4parser:isoparser:1.0.6" |
| 352 | implementation 'com.stripe:stripe-android:2.0.2' |
| 353 | // add for auto translate |
| 354 | implementation 'com.google.mlkit:language-id:17.0.6' |
| 355 | implementation 'com.android.billingclient:billing:8.0.0' |
| 356 | implementation 'com.google.code.gson:gson:2.11.0' |
| 357 | implementation 'com.google.guava:guava:31.1-android' |
| 358 | implementation 'com.google.android.play:integrity:1.3.0' |
| 359 | implementation 'com.google.android.gms:play-services-safetynet:18.0.1' |
| 360 |
| 361 | implementation 'com.google.android.gms:play-services-mlkit-subject-segmentation:16.0.0-beta1' |
| 362 | implementation 'com.google.android.gms:play-services-mlkit-image-labeling:16.0.8' |
| 363 |
| 364 | implementation "androidx.credentials:credentials:1.6.0-alpha04" |
| 365 | implementation "androidx.credentials:credentials-play-services-auth:1.6.0-alpha04" |
| 366 |
| 367 | implementation "io.noties.markwon:core:4.6.2" |
| 368 | implementation "io.noties.markwon:ext-strikethrough:4.6.2" |
| 369 | implementation "io.noties.markwon:ext-tables:4.6.2" |
| 370 | implementation "io.noties.markwon:html:4.6.2" |
| 371 | implementation "io.noties.markwon:inline-parser:4.6.2" |
| 372 | implementation("io.noties.markwon:ext-latex:4.6.2") { |
| 373 | exclude group: 'ru.noties', module: 'jlatexmath-android' |
| 374 | } |
| 375 |
| 376 | api project(":TMessagesProj_Modules:media3:media-lib-exoplayer") |
| 377 | api project(":TMessagesProj_Modules:media3:media-lib-exoplayer-dash") |
| 378 | api project(":TMessagesProj_Modules:media3:media-lib-exoplayer-hls") |
| 379 | api project(":TMessagesProj_Modules:media3:media-lib-decoder-ffmpeg") |
| 380 | api project(":TMessagesProj_Modules:media3:media-lib-session") |
| 381 | api project(':jlatexmath') |
| 382 |
| 383 | // implementation 'com.google.mlkit:translate:17.0.3' |
| 384 |
| 385 | // constraints { |
| 386 | // implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") { |
| 387 | // because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib") |
| 388 | // } |
| 389 | implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") { |
| 390 | because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib") |
| 391 | } |
| 392 | // } |
| 393 | implementation ('com.google.android.recaptcha:recaptcha:18.7.1') { |
| 394 | exclude group: "com.google.crypto.tink", module: "tink-android" |
| 395 | } |
| 396 |
| 397 | testImplementation "junit:junit:4.13.2" |
| 398 | testImplementation "androidx.test:core:1.5.0" |
| 399 | testImplementation "org.robolectric:robolectric:4.16.1" |
| 400 |
| 401 | coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5' |
| 402 | } |
| 403 | dependencies { |
| 404 | implementation "androidx.browser:browser:1.8.0" |
| 405 | implementation "androidx.viewpager:viewpager:1.0.0" |
| 406 | implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0" |
| 407 | // map |
| 408 | implementation "org.maplibre.gl:android-sdk:11.13.5" |
| 409 |
| 410 | // ktor |
| 411 | implementation "io.ktor:ktor-client-core:3.3.0" |
| 412 | implementation "io.ktor:ktor-client-okhttp:3.3.0" |
| 413 | implementation "io.ktor:ktor-client-content-negotiation:3.3.0" |
| 414 | implementation "io.ktor:ktor-serialization-kotlinx-json-jvm:3.3.0" |
| 415 | implementation "io.ktor:ktor-client-logging:3.3.0" |
| 416 |
| 417 | implementation "cn.hutool:hutool-core:5.8.42" |
| 418 | implementation "cn.hutool:hutool-crypto:5.8.42" |
| 419 | implementation 'cn.hutool:hutool-http:5.8.42' |
| 420 | // openpgp |
| 421 | implementation project(":openpgp-api") |
| 422 |
| 423 | compileOnly fileTree("libs") |
| 424 |
| 425 | // add for undo and redo |
| 426 | implementation 'org.lsposed.hiddenapibypass:hiddenapibypass:6.1' |
| 427 | // add splash screen |
| 428 | implementation("androidx.core:core-splashscreen:1.2.0") |
| 429 | // add for emoji |
| 430 | implementation 'com.jaredrummler:truetypeparser-light:1.0.0' |
| 431 | // add for up |
| 432 | implementation 'org.unifiedpush.android:connector:3.1.2' |
| 433 | // add for copy webm and tgs to gif |
| 434 | implementation "com.airbnb.android:lottie:6.4.1" |
| 435 | } |
| 436 |
| 437 | apply plugin: "com.google.gms.google-services" |
| 438 | apply plugin: "com.google.firebase.crashlytics" |
| 439 |
| 440 | sentry { |
| 441 | // Disables or enables debug log output, e.g. for for sentry-cli. |
| 442 | // Default is disabled. |
| 443 | debug = false |
| 444 |
| 445 | // The slug of the Sentry organization to use for uploading proguard mappings/source contexts. |
| 446 | org = "teampgm" |
| 447 |
| 448 | // The slug of the Sentry project to use for uploading proguard mappings/source contexts. |
| 449 | projectName = "nagram" |
| 450 |
| 451 | // The authentication token to use for uploading proguard mappings/source contexts. |
| 452 | // WARNING: Do not expose this token in your build.gradle files, but rather set an environment |
| 453 | // variable and read it into this property. |
| 454 | authToken = sentry_token |
| 455 |
| 456 | // The url of your Sentry instance. If you're using SAAS (not self hosting) you do not have to |
| 457 | // set this. If you are self hosting you can set your URL here |
| 458 | url = null |
| 459 |
| 460 | // Disables or enables the handling of Proguard mapping for Sentry. |
| 461 | // If enabled the plugin will generate a UUID and will take care of |
| 462 | // uploading the mapping to Sentry. If disabled, all the logic |
| 463 | // related to proguard mapping will be excluded. |
| 464 | // Default is enabled. |
| 465 | includeProguardMapping = sentry_upload |
| 466 |
| 467 | // Whether the plugin should attempt to auto-upload the mapping file to Sentry or not. |
| 468 | // If disabled the plugin will run a dry-run and just generate a UUID. |
| 469 | // The mapping file has to be uploaded manually via sentry-cli in this case. |
| 470 | // Default is enabled. |
| 471 | autoUploadProguardMapping = sentry_upload |
| 472 |
| 473 | // Experimental flag to turn on support for GuardSquare's tools integration (Dexguard and External Proguard). |
| 474 | // If enabled, the plugin will try to consume and upload the mapping file produced by Dexguard and External Proguard. |
| 475 | // Default is disabled. |
| 476 | dexguardEnabled = false |
| 477 |
| 478 | // Disables or enables the automatic configuration of Native Symbols |
| 479 | // for Sentry. This executes sentry-cli automatically so |
| 480 | // you don't need to do it manually. |
| 481 | // Default is disabled. |
| 482 | uploadNativeSymbols = sentry_upload |
| 483 |
| 484 | // Whether the plugin should attempt to auto-upload the native debug symbols to Sentry or not. |
| 485 | // If disabled the plugin will run a dry-run. |
| 486 | // Default is enabled. |
| 487 | autoUploadNativeSymbols = sentry_upload |
| 488 |
| 489 | // Does or doesn't include the source code of native code for Sentry. |
| 490 | // This executes sentry-cli with the --include-sources param. automatically so |
| 491 | // you don't need to do it manually. |
| 492 | // This option has an effect only when [uploadNativeSymbols] is enabled. |
| 493 | // Default is disabled. |
| 494 | includeNativeSources = false |
| 495 |
| 496 | // Generates a JVM (Java, Kotlin, etc.) source bundle and uploads your source code to Sentry. |
| 497 | // This enables source context, allowing you to see your source |
| 498 | // code as part of your stack traces in Sentry. |
| 499 | includeSourceContext = sentry_upload |
| 500 |
| 501 | // Configure additional directories to be included in the source bundle which is used for |
| 502 | // source context. The directories should be specified relative to the Gradle module/project's |
| 503 | // root. For example, if you have a custom source set alongside 'main', the parameter would be |
| 504 | // 'src/custom/java'. |
| 505 | additionalSourceDirsForSourceContext = [] |
| 506 |
| 507 | // Enable or disable the tracing instrumentation. |
| 508 | // Does auto instrumentation for specified features through bytecode manipulation. |
| 509 | // Default is enabled. |
| 510 | tracingInstrumentation { |
| 511 | enabled = true |
| 512 |
| 513 | // Specifies a set of instrumentation features that are eligible for bytecode manipulation. |
| 514 | // Defaults to all available values of InstrumentationFeature enum class. |
| 515 | features = [InstrumentationFeature.DATABASE, InstrumentationFeature.FILE_IO, InstrumentationFeature.OKHTTP, InstrumentationFeature.COMPOSE] |
| 516 |
| 517 | // Enable or disable logcat instrumentation through bytecode manipulation. |
| 518 | // Default is enabled. |
| 519 | logcat { |
| 520 | enabled = true |
| 521 |
| 522 | // Specifies a minimum log level for the logcat breadcrumb logging. |
| 523 | // Defaults to LogcatLevel.WARNING. |
| 524 | minLevel = LogcatLevel.WARNING |
| 525 | } |
| 526 |
| 527 | // The set of glob patterns to exclude from instrumentation. Classes matching any of these |
| 528 | // patterns in the project's sources and dependencies JARs won't be instrumented by the Sentry |
| 529 | // Gradle plugin. |
| 530 | // |
| 531 | // Don't include the file extension. Filtering is done on compiled classes and |
| 532 | // the .class suffix isn't included in the pattern matching. |
| 533 | // |
| 534 | // Example usage: |
| 535 | // ``` |
| 536 | // excludes = ['com/example/donotinstrument/**', '**/*Test'] |
| 537 | // ``` |
| 538 | // |
| 539 | // Only supported when using Android Gradle plugin (AGP) version 7.4.0 and above. |
| 540 | excludes = [] |
| 541 | } |
| 542 |
| 543 | // Enable auto-installation of Sentry components (sentry-android SDK and okhttp, timber and fragment integrations). |
| 544 | // Default is enabled. |
| 545 | // Only available v3.1.0 and above. |
| 546 | autoInstallation { |
| 547 | enabled = true |
| 548 |
| 549 | // Specifies a version of the sentry-android SDK and fragment, timber and okhttp integrations. |
| 550 | // |
| 551 | // This is also useful, when you have the sentry-android SDK already included into a transitive dependency/module and want to |
| 552 | // align integration versions with it (if it's a direct dependency, the version will be inferred). |
| 553 | // |
| 554 | // NOTE: if you have a higher version of the sentry-android SDK or integrations on the classpath, this setting will have no effect |
| 555 | // as Gradle will resolve it to the latest version. |
| 556 | // |
| 557 | // Defaults to the latest published Sentry version. |
| 558 | sentryVersion = '8.57.0' |
| 559 | } |
| 560 |
| 561 | // Disables or enables dependencies metadata reporting for Sentry. |
| 562 | // If enabled, the plugin will collect external dependencies and |
| 563 | // upload them to Sentry as part of events. If disabled, all the logic |
| 564 | // related to the dependencies metadata report will be excluded. |
| 565 | // |
| 566 | // Default is enabled. |
| 567 | includeDependenciesReport = true |
| 568 |
| 569 | // Whether the plugin should send telemetry data to Sentry. |
| 570 | // If disabled the plugin won't send telemetry data. |
| 571 | // This is auto disabled if running against a self hosted instance of Sentry. |
| 572 | // Default is enabled. |
| 573 | telemetry = true |
| 574 | } |
| 575 |