build.gradle (3071B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 buildscript { 6 repositories { 7 gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository -> 8 maven { 9 url = repository 10 if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) { 11 allowInsecureProtocol = true 12 } 13 } 14 } 15 } 16 17 dependencies { 18 classpath libs.kotlin.serialization 19 classpath libs.mozilla.glean.gradle.plugin 20 } 21 } 22 23 plugins { 24 alias(libs.plugins.python.envs.plugin) 25 } 26 27 apply plugin: 'com.android.library' 28 apply plugin: 'com.google.devtools.ksp' 29 apply plugin: 'kotlin-android' 30 apply plugin: 'kotlinx-serialization' 31 32 android { 33 defaultConfig { 34 javaCompileOptions { 35 annotationProcessorOptions { 36 arguments += ["room.incremental": "true"] 37 } 38 } 39 } 40 41 sourceSets { 42 main { 43 java { 44 // Generated files are output in the objdir 45 srcDir "${gradle.mozconfig.topobjdir}/mobile/android/android-components/components/lib/crash/src/main/java" 46 } 47 } 48 } 49 50 ksp { 51 arg("room.schemaLocation", "$projectDir/schemas".toString()) 52 } 53 54 buildFeatures { 55 viewBinding = true 56 buildConfig = true 57 } 58 59 namespace = 'mozilla.components.lib.crash' 60 } 61 62 dependencies { 63 // We only compile against GeckoView and Glean. It's up to the app to add those dependencies if it wants to 64 // send crash reports to Socorro (GV). 65 compileOnly libs.mozilla.glean 66 67 implementation project(':components:support-base') 68 implementation project(':components:support-ktx') 69 implementation project(':components:support-utils') 70 71 implementation libs.androidx.appcompat 72 implementation libs.androidx.constraintlayout 73 implementation libs.androidx.core.ktx 74 implementation libs.androidx.recyclerview 75 implementation libs.androidx.room.runtime 76 ksp libs.androidx.room.compiler 77 implementation libs.kotlinx.coroutines 78 implementation libs.kotlinx.serialization.json 79 80 testImplementation project(':components:support-test') 81 82 testImplementation libs.androidx.test.core 83 testImplementation libs.androidx.test.junit 84 testImplementation libs.androidx.work.testing 85 testImplementation libs.kotlinx.coroutines.test 86 testImplementation libs.mockwebserver 87 testImplementation libs.mozilla.glean 88 testImplementation libs.mozilla.glean.forUnitTests 89 testImplementation libs.robolectric 90 } 91 92 ext { 93 gleanNamespace = "mozilla.telemetry.glean" 94 gleanPythonEnvDir = gradle.mozconfig.substs.GRADLE_GLEAN_PARSER_VENV 95 } 96 apply plugin: "org.mozilla.telemetry.glean-gradle-plugin" 97 apply from: '../../../common-config.gradle' 98 apply from: '../../../publish.gradle' 99 ext.configurePublish(config.componentsGroupId, project.name, project.ext.description)