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