From 7286ca29f5d8828eb4c67b3c794a1ceca27a25aa Mon Sep 17 00:00:00 2001 From: Daymon Date: Wed, 29 Mar 2023 12:53:22 -0500 Subject: [PATCH 1/4] Add additional common deps to toml --- gradle/libs.versions.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a45e9465003..26b963dcde8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -43,9 +43,11 @@ androidx-test-core = { module = "androidx.test:core", version = "1.5.0" } androidx-test-junit = { module = "androidx.test.ext:junit", version = "1.1.4" } androidx-test-rules = { module = "androidx.test:rules", version = "1.5.0" } androidx-test-runner = { module = "androidx.test:runner", version = "1.5.1" } +androidx-multidex = { module = "androidx.multidex:multidex", version = "2.0.1" } junit = { module = "junit:junit", version = "4.13.2" } kotlin-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } mockito-core = { module = "org.mockito:mockito-core", version = "2.28.2"} +mockito-inline = { module = "org.mockito:mockito-inline", version = "2.28.2"} mockito-dexmaker = { module = "com.linkedin.dexmaker:dexmaker-mockito", version = "2.28.3"} robolectric = {module = "org.robolectric:robolectric", version.ref = "robolectric" } truth = { module = "com.google.truth:truth", version.ref = "truth"} From a87aef0241e4fdd403c6b1c218eccea84289a803 Mon Sep 17 00:00:00 2001 From: Daymon Date: Wed, 29 Mar 2023 12:53:37 -0500 Subject: [PATCH 2/4] Migrate firebase-installations to KTS + VC --- .../firebase-installations.gradle | 70 ------------------- .../firebase-installations.gradle.kts | 66 +++++++++++++++++ 2 files changed, 66 insertions(+), 70 deletions(-) delete mode 100644 firebase-installations/firebase-installations.gradle create mode 100644 firebase-installations/firebase-installations.gradle.kts diff --git a/firebase-installations/firebase-installations.gradle b/firebase-installations/firebase-installations.gradle deleted file mode 100644 index a1cda1158f8..00000000000 --- a/firebase-installations/firebase-installations.gradle +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -plugins { - id 'firebase-library' -} - -android { - compileSdkVersion project.targetSdkVersion - defaultConfig { - minSdkVersion project.minSdkVersion - targetSdkVersion project.targetSdkVersion - multiDexEnabled true - versionName version - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - testOptions { - unitTests { - includeAndroidResources = true - } - } -} - -dependencies { - implementation 'com.google.firebase:firebase-common:20.3.1' - implementation 'com.google.firebase:firebase-installations-interop:17.1.0' - implementation 'com.google.firebase:firebase-components:17.1.0' - implementation 'com.google.firebase:firebase-annotations:16.2.0' - - implementation 'androidx.multidex:multidex:2.0.1' - implementation 'com.google.android.gms:play-services-tasks:18.0.1' - - javadocClasspath 'com.google.code.findbugs:jsr305:3.0.2' - - compileOnly "com.google.auto.value:auto-value-annotations:1.6.5" - annotationProcessor "com.google.auto.value:auto-value:1.6.2" - - testImplementation project(':integ-testing') - testImplementation 'androidx.test:core:1.2.0' - testImplementation 'junit:junit:4.12' - testImplementation "org.robolectric:robolectric:$robolectricVersion" - testImplementation "com.google.truth:truth:$googleTruthVersion" - testImplementation 'org.mockito:mockito-core:2.25.0' - testImplementation 'org.mockito:mockito-inline:2.25.0' - - androidTestImplementation project(':integ-testing') - androidTestImplementation 'androidx.test.ext:junit:1.1.1' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation "com.google.truth:truth:$googleTruthVersion" - androidTestImplementation 'junit:junit:4.12' - androidTestImplementation "androidx.annotation:annotation:1.0.0" - androidTestImplementation 'org.mockito:mockito-core:2.25.0' - androidTestImplementation 'org.mockito:mockito-inline:2.25.0' -} diff --git a/firebase-installations/firebase-installations.gradle.kts b/firebase-installations/firebase-installations.gradle.kts new file mode 100644 index 00000000000..b72c25ca3d6 --- /dev/null +++ b/firebase-installations/firebase-installations.gradle.kts @@ -0,0 +1,66 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +plugins { id("firebase-library") } + +android { + val targetSdkVersion: Int by rootProject + val minSdkVersion: Int by rootProject + + compileSdk = targetSdkVersion + + defaultConfig { + minSdk = minSdkVersion + targetSdk = targetSdkVersion + multiDexEnabled = true + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + testOptions.unitTests.isIncludeAndroidResources = true +} + +dependencies { + implementation("com.google.firebase:firebase-common:20.3.2") + implementation("com.google.firebase:firebase-installations-interop:17.1.0") + implementation("com.google.firebase:firebase-components:17.1.0") + implementation("com.google.firebase:firebase-annotations:16.2.0") + + implementation(libs.androidx.multidex) + implementation(libs.playservices.tasks) + + compileOnly(libs.autovalue.annotations) + annotationProcessor(libs.autovalue) + + testImplementation(project(":integ-testing")) + testImplementation(libs.androidx.test.core) + testImplementation(libs.junit) + testImplementation(libs.truth) + testImplementation(libs.robolectric) + testImplementation(libs.mockito.core) + testImplementation(libs.mockito.inline) + + androidTestImplementation(project(":integ-testing")) + androidTestImplementation(libs.androidx.test.junit) + androidTestImplementation(libs.androidx.test.runner) + androidTestImplementation(libs.truth) + androidTestImplementation(libs.junit) + androidTestImplementation(libs.androidx.annotation) + androidTestImplementation(libs.mockito.core) + androidTestImplementation(libs.mockito.inline) +} From ff1e011bca4e57ee20cdcff2f75ef6ea3e135cdd Mon Sep 17 00:00:00 2001 From: Daymon Date: Wed, 29 Mar 2023 13:02:21 -0500 Subject: [PATCH 3/4] Migrate fis-ktx to KTS + VC --- firebase-installations/ktx/ktx.gradle | 56 --------------------- firebase-installations/ktx/ktx.gradle.kts | 61 +++++++++++++++++++++++ 2 files changed, 61 insertions(+), 56 deletions(-) delete mode 100644 firebase-installations/ktx/ktx.gradle create mode 100644 firebase-installations/ktx/ktx.gradle.kts diff --git a/firebase-installations/ktx/ktx.gradle b/firebase-installations/ktx/ktx.gradle deleted file mode 100644 index f65e81b67b9..00000000000 --- a/firebase-installations/ktx/ktx.gradle +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -plugins { - id 'firebase-library' - id 'kotlin-android' -} - -firebaseLibrary { - releaseWith project(':firebase-installations') - publishJavadoc = true - publishSources = true -} - -android { - compileSdkVersion project.targetSdkVersion - defaultConfig { - minSdkVersion project.minSdkVersion - multiDexEnabled true - targetSdkVersion project.targetSdkVersion - versionName version - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - test.java.srcDirs += 'src/test/kotlin' - androidTest.java.srcDirs += 'src/androidTest/kotlin' - } - testOptions.unitTests.includeAndroidResources = true -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" - - implementation 'com.google.firebase:firebase-common:20.3.1' - implementation 'com.google.firebase:firebase-common-ktx:20.3.1' - implementation 'com.google.firebase:firebase-components:17.1.0' - implementation project(':firebase-installations') - implementation 'com.google.firebase:firebase-installations-interop:17.1.0' - - testImplementation "org.robolectric:robolectric:$robolectricVersion" - testImplementation 'junit:junit:4.13' - testImplementation "com.google.truth:truth:$googleTruthVersion" - testImplementation 'androidx.test:core:1.2.0' -} diff --git a/firebase-installations/ktx/ktx.gradle.kts b/firebase-installations/ktx/ktx.gradle.kts new file mode 100644 index 00000000000..010a30b4b42 --- /dev/null +++ b/firebase-installations/ktx/ktx.gradle.kts @@ -0,0 +1,61 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +plugins { + id("firebase-library") + kotlin("android") +} + +firebaseLibrary { + releaseWith(project(":firebase-installations")) + publishJavadoc = true + publishSources = true +} + +android { + val targetSdkVersion: Int by rootProject + val minSdkVersion: Int by rootProject + + compileSdk = targetSdkVersion + + defaultConfig { + minSdk = minSdkVersion + targetSdk = targetSdkVersion + multiDexEnabled = true + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + sourceSets { + named("main") { java.srcDirs("src/main/kotlin") } + named("test") { java.srcDirs("src/test/kotlin") } + named("androidTest") { java.srcDirs("src/androidTest/kotlin") } + } + + testOptions.unitTests.isIncludeAndroidResources = true +} + +dependencies { + implementation(project(":firebase-installations")) + implementation("com.google.firebase:firebase-common:20.3.2") + implementation("com.google.firebase:firebase-common-ktx:20.3.2") + implementation("com.google.firebase:firebase-components:17.1.0") + implementation("com.google.firebase:firebase-installations-interop:17.1.0") + + implementation(libs.kotlin.stdlib) + + testImplementation(libs.robolectric) + testImplementation(libs.junit) + testImplementation(libs.truth) + testImplementation(libs.androidx.test.core) +} From be0fd809adec1e8555376aacaa708cf932e80ca7 Mon Sep 17 00:00:00 2001 From: Daymon Date: Wed, 29 Mar 2023 13:07:24 -0500 Subject: [PATCH 4/4] Migrate fis-interop to KTS + VC --- .../firebase-installations-interop.gradle | 47 ------------------- .../firebase-installations-interop.gradle.kts | 46 ++++++++++++++++++ 2 files changed, 46 insertions(+), 47 deletions(-) delete mode 100644 firebase-installations-interop/firebase-installations-interop.gradle create mode 100644 firebase-installations-interop/firebase-installations-interop.gradle.kts diff --git a/firebase-installations-interop/firebase-installations-interop.gradle b/firebase-installations-interop/firebase-installations-interop.gradle deleted file mode 100644 index 0a43f053cc4..00000000000 --- a/firebase-installations-interop/firebase-installations-interop.gradle +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - - -plugins { - id 'firebase-library' -} - -firebaseLibrary.publishJavadoc = false - -android { - compileSdkVersion project.targetSdkVersion - defaultConfig { - minSdkVersion project.minSdkVersion - targetSdkVersion project.targetSdkVersion - versionName version - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - testOptions { - unitTests { - includeAndroidResources = true - } - } -} - -dependencies { - implementation 'com.google.android.gms:play-services-tasks:18.0.1' - implementation 'com.google.firebase:firebase-annotations:16.2.0' - - compileOnly "com.google.auto.value:auto-value-annotations:1.6.5" - annotationProcessor "com.google.auto.value:auto-value:1.6.2" -} diff --git a/firebase-installations-interop/firebase-installations-interop.gradle.kts b/firebase-installations-interop/firebase-installations-interop.gradle.kts new file mode 100644 index 00000000000..2cf9d75a5f7 --- /dev/null +++ b/firebase-installations-interop/firebase-installations-interop.gradle.kts @@ -0,0 +1,46 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +plugins { id("firebase-library") } + +firebaseLibrary { publishJavadoc = false } + +android { + val targetSdkVersion: Int by rootProject + val minSdkVersion: Int by rootProject + + compileSdk = targetSdkVersion + + defaultConfig { + minSdk = minSdkVersion + targetSdk = targetSdkVersion + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + testOptions.unitTests.isIncludeAndroidResources = true +} + +dependencies { + implementation("com.google.firebase:firebase-annotations:16.2.0") + + implementation(libs.playservices.tasks) + + compileOnly(libs.autovalue.annotations) + annotationProcessor(libs.autovalue) +}