|
| 1 | +// Copyright 2023 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +plugins { id("firebase-library") } |
| 16 | + |
| 17 | +firebaseLibrary { |
| 18 | + testLab.enabled = true |
| 19 | + publishSources = true |
| 20 | +} |
| 21 | + |
| 22 | +android { |
| 23 | + val targetSdkVersion: Int by rootProject |
| 24 | + val minSdkVersion: Int by rootProject |
| 25 | + |
| 26 | + installation.timeOutInMs = 60 * 1000 |
| 27 | + compileSdk = targetSdkVersion |
| 28 | + |
| 29 | + defaultConfig { |
| 30 | + minSdk = minSdkVersion |
| 31 | + targetSdk = targetSdkVersion |
| 32 | + multiDexEnabled = true |
| 33 | + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" |
| 34 | + } |
| 35 | + |
| 36 | + buildTypes { release { isMinifyEnabled = false } } |
| 37 | + |
| 38 | + sourceSets { |
| 39 | + named("androidTest") { java.srcDir("src/testUtil/java") } |
| 40 | + named("test") { java.srcDir("src/testUtil") } |
| 41 | + |
| 42 | + compileOptions { |
| 43 | + sourceCompatibility = JavaVersion.VERSION_1_8 |
| 44 | + targetCompatibility = JavaVersion.VERSION_1_8 |
| 45 | + } |
| 46 | + |
| 47 | + packagingOptions.resources.excludes += "META-INF/DEPENDENCIES" |
| 48 | + testOptions.unitTests.isIncludeAndroidResources = true |
| 49 | + } |
| 50 | +} |
| 51 | + |
| 52 | +dependencies { |
| 53 | + implementation("com.google.firebase:firebase-common:20.3.2") |
| 54 | + implementation("com.google.firebase:firebase-components:17.1.0") |
| 55 | + implementation("com.google.firebase:firebase-auth-interop:20.0.0") |
| 56 | + implementation("com.google.firebase:firebase-appcheck-interop:16.1.1") |
| 57 | + implementation("com.google.firebase:firebase-database-collection:18.0.1") |
| 58 | + |
| 59 | + implementation(libs.androidx.annotation) |
| 60 | + implementation(libs.bundles.playservices) |
| 61 | + |
| 62 | + testImplementation(libs.truth) |
| 63 | + testImplementation(libs.junit) |
| 64 | + testImplementation(libs.quickcheck) |
| 65 | + testImplementation(libs.robolectric) |
| 66 | + testImplementation(libs.mockito.core) |
| 67 | + testImplementation(libs.androidx.test.core) |
| 68 | + testImplementation(libs.androidx.test.rules) |
| 69 | + testImplementation("com.firebase:firebase-token-generator:2.0.0") |
| 70 | + testImplementation("com.fasterxml.jackson.core:jackson-core:2.13.1") |
| 71 | + testImplementation("com.fasterxml.jackson.core:jackson-databind:2.13.1") |
| 72 | + |
| 73 | + androidTestImplementation(libs.truth) |
| 74 | + androidTestImplementation(libs.quickcheck) |
| 75 | + androidTestImplementation(libs.androidx.test.junit) |
| 76 | + androidTestImplementation(libs.androidx.test.runner) |
| 77 | + androidTestImplementation("org.hamcrest:hamcrest:2.2") |
| 78 | + androidTestImplementation("org.hamcrest:hamcrest-library:2.2") |
| 79 | + androidTestImplementation("com.fasterxml.jackson.core:jackson-core:2.13.1") |
| 80 | + androidTestImplementation("com.fasterxml.jackson.core:jackson-databind:2.13.1") |
| 81 | +} |
| 82 | + |
| 83 | +ext["packageName"] = "com.google.firebase.database" |
| 84 | + |
| 85 | +apply("../gradle/googleServices.gradle") |
0 commit comments