Skip to content

Commit 654ddb2

Browse files
committed
Add functions, fix tests
1 parent 2c0c05f commit 654ddb2

File tree

7 files changed

+165
-171
lines changed

7 files changed

+165
-171
lines changed

appcheck/firebase-appcheck-debug-testing/firebase-appcheck-debug-testing.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ android {
3131
targetSdkVersion project.targetSdkVersion
3232
minSdkVersion project.minSdkVersion
3333
versionName version
34+
multiDexEnabled = true
3435
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3536
testInstrumentationRunnerArgument "firebaseAppCheckDebugSecret", System.getenv("FIREBASE_APP_CHECK_DEBUG_SECRET") ?: ''
3637
}

appcheck/firebase-appcheck/firebase-appcheck.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ android {
2929
defaultConfig {
3030
targetSdkVersion project.targetSdkVersion
3131
minSdkVersion project.minSdkVersion
32+
multiDexEnabled = true
3233
versionName version
3334
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3435
}

firebase-functions/firebase-functions.gradle

Lines changed: 0 additions & 106 deletions
This file was deleted.
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
// Copyright 2018 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 {
16+
id("firebase-library")
17+
id("firebase-vendor")
18+
}
19+
20+
firebaseLibrary {
21+
testLab.enabled = true
22+
publishSources = true
23+
}
24+
25+
android {
26+
val targetSdkVersion : Int by rootProject
27+
28+
compileSdk = targetSdkVersion
29+
defaultConfig {
30+
minSdk = 16
31+
targetSdk = targetSdkVersion
32+
multiDexEnabled = true
33+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
34+
consumerProguardFiles("proguard.txt")
35+
}
36+
sourceSets {
37+
getByName("androidTest").java.srcDirs("src/testUtil")
38+
}
39+
compileOptions {
40+
sourceCompatibility = JavaVersion.VERSION_1_8
41+
targetCompatibility = JavaVersion.VERSION_1_8
42+
}
43+
testOptions.unitTests.isIncludeAndroidResources = true
44+
}
45+
46+
dependencies {
47+
implementation(project(":firebase-annotations"))
48+
implementation(project(":firebase-common"))
49+
implementation(project(":firebase-components"))
50+
implementation(project(":appcheck:firebase-appcheck-interop"))
51+
implementation(libs.playservices.base)
52+
implementation(libs.playservices.basement)
53+
implementation(libs.playservices.tasks)
54+
implementation("com.google.firebase:firebase-iid:21.1.0") {
55+
exclude(group = "com.google.firebase", module = "firebase-common")
56+
exclude(group = "com.google.firebase", module = "firebase-components")
57+
}
58+
implementation("com.google.firebase:firebase-auth-interop:18.0.0") {
59+
exclude(group = "com.google.firebase", module = "firebase-common")
60+
}
61+
implementation("com.google.firebase:firebase-iid-interop:17.1.0")
62+
implementation(libs.okhttp)
63+
64+
implementation(libs.javax.inject)
65+
vendor(libs.dagger.dagger) {
66+
exclude(group = "javax.inject", module = "javax.inject")
67+
}
68+
annotationProcessor(libs.dagger.compiler)
69+
70+
annotationProcessor(libs.autovalue)
71+
javadocClasspath(libs.findbugs.jsr305)
72+
javadocClasspath("org.codehaus.mojo:animal-sniffer-annotations:1.21")
73+
javadocClasspath(libs.autovalue.annotations)
74+
75+
testImplementation(libs.junit)
76+
testImplementation(libs.mockito.core)
77+
testImplementation(libs.robolectric) {}
78+
testImplementation(libs.truth)
79+
testImplementation(libs.androidx.test.rules)
80+
testImplementation(libs.androidx.test.core)
81+
82+
androidTestImplementation(project(":integ-testing"))
83+
androidTestImplementation(libs.junit)
84+
androidTestImplementation(libs.truth)
85+
androidTestImplementation(libs.androidx.test.runner)
86+
androidTestImplementation(libs.androidx.test.junit)
87+
androidTestImplementation(libs.mockito.core)
88+
androidTestImplementation(libs.mockito.dexmaker)
89+
}
90+
91+
// ==========================================================================
92+
// Copy from here down if you want to use the google-services plugin in your
93+
// androidTest integration tests.
94+
// ==========================================================================
95+
extra["packageName"] = "com.google.firebase.functions"
96+
apply(from = "../gradle/googleServices.gradle")

firebase-functions/ktx/ktx.gradle

Lines changed: 0 additions & 64 deletions
This file was deleted.

firebase-functions/ktx/ktx.gradle.kts

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Copyright 2019 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 {
16+
id("firebase-library")
17+
id("kotlin-android")
18+
}
19+
20+
firebaseLibrary {
21+
releaseWith(project(":firebase-functions"))
22+
publishJavadoc = true
23+
publishSources = true
24+
testLab.enabled = true
25+
}
26+
27+
android {
28+
val targetSdkVersion : Int by rootProject
29+
val minSdkVersion : Int by rootProject
30+
31+
compileSdk = targetSdkVersion
32+
defaultConfig {
33+
minSdk = minSdkVersion
34+
targetSdk = targetSdkVersion
35+
multiDexEnabled = true
36+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
37+
}
38+
sourceSets {
39+
getByName("main").java.srcDirs("src/main/kotlin")
40+
getByName("test").java.srcDirs("src/test/kotlin")
41+
getByName("androidTest").java.srcDirs("src/androidTest/kotlin")
42+
}
43+
testOptions.unitTests.isIncludeAndroidResources = true
44+
}
45+
46+
dependencies {
47+
implementation(project(":firebase-common"))
48+
implementation(project(":firebase-components"))
49+
implementation(project(":firebase-common:ktx"))
50+
implementation(project(":firebase-functions"))
51+
implementation(libs.kotlin.stdlib)
52+
implementation(libs.androidx.annotation)
53+
implementation(libs.playservices.tasks)
54+
55+
androidTestImplementation(libs.junit)
56+
androidTestImplementation(libs.truth)
57+
androidTestImplementation(libs.androidx.test.runner)
58+
59+
testImplementation(libs.robolectric)
60+
testImplementation(libs.junit)
61+
testImplementation(libs.truth)
62+
testImplementation(libs.androidx.test.core)
63+
}

gradle/libs.versions.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,23 @@ androidx-core = { module = "androidx.core:core", version = "1.2.0" }
2121
androidx-futures = { module = "androidx.concurrent:concurrent-futures", version = "1.1.0" }
2222
autovalue = { module = "com.google.auto.value:auto-value", version.ref = "autovalue" }
2323
autovalue-annotations = { module = "com.google.auto.value:auto-value-annotations", version.ref = "autovalue" }
24-
dagger = { module = "com.google.dagger:dagger", version.ref = "dagger"}
24+
dagger-dagger = { module = "com.google.dagger:dagger", version.ref = "dagger"}
2525
dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "dagger" }
2626
errorprone-annotations = { module = "com.google.errorprone:error_prone_annotations", version = "2.9.0" }
2727
findbugs-jsr305 = { module = "com.google.code.findbugs:jsr305", version = "3.0.2"}
2828
javax-inject = { module = "javax.inject:javax.inject", version = "1" }
2929
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
3030
kotlin-coroutines-tasks = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-play-services", version.ref = "coroutines" }
31+
okhttp = {module = "com.squareup.okhttp3:okhttp", version = "3.12.13"}
3132
org-json = { module = "org.json:json", version = "20210307" }
33+
playservices-base = { module = "com.google.android.gms:play-services-base", version = "18.1.0"}
3234
playservices-basement = { module = "com.google.android.gms:play-services-basement", version = "18.1.0"}
3335
playservices-tasks = { module = "com.google.android.gms:play-services-tasks", version = "18.0.2"}
3436

3537
# Test libs
3638
androidx-test-core = { module = "androidx.test:core", version = "1.5.0" }
3739
androidx-test-junit = { module = "androidx.test.ext:junit", version = "1.1.4" }
40+
androidx-test-rules = { module = "androidx.test:rules", version = "1.5.0" }
3841
androidx-test-runner = { module = "androidx.test:runner", version = "1.5.1" }
3942
junit = { module = "junit:junit", version = "4.13.2" }
4043
kotlin-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }

0 commit comments

Comments
 (0)