Bug 1876335 - use GRADLE_MAVEN_REPOSITORIES in more places. r=owlish,geckoview-review...
[gecko.git] / mobile / android / android-components / components / lib / crash / build.gradle
blobafedcf30442e6c4227580b24535670ecbc04d811
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/. */
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     }
17     dependencies {
18         classpath "org.mozilla.telemetry:glean-gradle-plugin:${Versions.mozilla_glean}"
19         classpath  ComponentsDependencies.plugin_serialization
20     }
23 plugins {
24     id "com.jetbrains.python.envs" version "$python_envs_plugin"
27 apply plugin: 'com.android.library'
28 apply plugin: 'com.google.devtools.ksp'
29 apply plugin: 'kotlin-android'
30 apply plugin: 'kotlinx-serialization'
32 android {
33     defaultConfig {
34         minSdkVersion config.minSdkVersion
35         compileSdk config.compileSdkVersion
36         targetSdkVersion config.targetSdkVersion
38         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
40         javaCompileOptions {
41             annotationProcessorOptions {
42                 arguments += ["room.incremental": "true"]
43             }
44         }
45     }
47     ksp {
48         arg("room.schemaLocation", "$projectDir/schemas".toString())
49     }
51     buildTypes {
52         release {
53             minifyEnabled false
54             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
55         }
56     }
58     buildFeatures {
59         viewBinding true
60         buildConfig true
61     }
63     namespace 'mozilla.components.lib.crash'
66 dependencies {
67     implementation ComponentsDependencies.kotlin_coroutines
68     implementation ComponentsDependencies.kotlin_json
70     implementation ComponentsDependencies.androidx_appcompat
71     implementation ComponentsDependencies.androidx_constraintlayout
72     implementation ComponentsDependencies.androidx_recyclerview
74     implementation project(':support-base')
75     implementation project(':support-ktx')
76     implementation project(':support-utils')
78     implementation ComponentsDependencies.androidx_room_runtime
79     ksp ComponentsDependencies.androidx_room_compiler
81     // We only compile against GeckoView and Glean. It's up to the app to add those dependencies if it wants to
82     // send crash reports to Socorro (GV).
83     compileOnly project(":service-glean")
84     testImplementation project(":service-glean")
85     testImplementation ComponentsDependencies.androidx_work_testing
87     testImplementation project(':support-test')
88     testImplementation ComponentsDependencies.androidx_test_core
89     testImplementation ComponentsDependencies.androidx_test_junit
90     testImplementation ComponentsDependencies.testing_robolectric
91     testImplementation ComponentsDependencies.testing_coroutines
92     testImplementation ComponentsDependencies.testing_mockwebserver
93     testImplementation ComponentsDependencies.mozilla_glean_forUnitTests
96 apply plugin: "org.mozilla.telemetry.glean-gradle-plugin"
97 apply from: '../../../android-lint.gradle'
98 apply from: '../../../publish.gradle'
99 ext.configurePublish(config.componentsGroupId, archivesBaseName, project.ext.description)