Skip to content

Commit becb76d

Browse files
Merge branch 'refs/heads/remoteConfigCustomTargeting' into tushar-khandelwal/rc-custom-targeting
# Conflicts: # firebase-config/src/main/java/com/google/firebase/remoteconfig/RemoteConfigComponent.java # firebase-config/src/main/java/com/google/firebase/remoteconfig/internal/ConfigSharedPrefsClient.java # firebase-config/src/test/java/com/google/firebase/remoteconfig/internal/ConfigSharedPrefsClientTest.java
2 parents 5a41f0d + 5f75cc8 commit becb76d

File tree

202 files changed

+15480
-7515
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+15480
-7515
lines changed

.github/workflows/build-src-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: build-src-check
1+
name: Check buildSrc
22

33
on:
44
pull_request:

.github/workflows/changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Changelog
1+
name: Verify changelog update
22

33
on:
44
pull_request

.github/workflows/fireci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: fireci
1+
name: Run fireci tests
22

33
on:
44
pull_request:

.github/workflows/private-mirror-sync.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
fetch-depth: 0
2020
submodules: true
2121
token: ${{ secrets.GOOGLE_OSS_BOT_TOKEN }}
22+
committer: google-oss-bot <[email protected]>
2223
- name: Force push HEAD to private repo main branch
2324
run: |
2425
git remote add mirror https://github.com/FirebasePrivate/firebase-android-sdk.git

.github/workflows/update-cpp-sdk-on-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# *another* workflow on the Firebase C++ SDK, which will check for the Android
33
# version update and create a PR updating its dependencies if any version
44
# numbers changed.
5-
name: update-cpp-sdk-on-release
5+
name: Update C++ SDKs on release
66
on:
77
push:
88
branches:

buildSrc/build.gradle.kts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,11 @@ dependencies {
5252
annotationProcessor("com.google.auto.value:auto-value:1.6.5")
5353
implementation(kotlin("gradle-plugin", "1.8.22"))
5454
implementation(libs.org.json)
55+
implementation(libs.bundles.maven.resolver)
5556

56-
implementation("org.eclipse.aether:aether-api:1.0.0.v20140518")
57-
implementation("org.eclipse.aether:aether-util:1.0.0.v20140518")
57+
implementation("com.google.guava:guava:31.1-jre")
5858
implementation("org.ow2.asm:asm-tree:9.5")
59-
implementation("org.eclipse.aether:aether-impl:1.0.0.v20140518")
60-
implementation("org.eclipse.aether:aether-connector-basic:1.0.0.v20140518")
61-
implementation("org.eclipse.aether:aether-transport-file:1.0.0.v20140518")
62-
implementation("org.eclipse.aether:aether-transport-http:1.0.0.v20140518")
63-
implementation("org.eclipse.aether:aether-transport-wagon:1.0.0.v20140518")
64-
implementation("org.apache.maven:maven-aether-provider:3.3.9")
65-
6659
implementation("org.eclipse.jgit:org.eclipse.jgit:6.3.0.202209071007-r")
67-
6860
implementation(libs.kotlinx.serialization.json)
6961
implementation("com.google.code.gson:gson:2.8.9")
7062
implementation(libs.android.gradlePlugin.gradle)

buildSrc/src/main/java/com/google/firebase/gradle/bomgenerator/BomGeneratorTask.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import static java.util.stream.Collectors.toList;
1818

19-
import com.google.common.collect.ImmutableList;
2019
import com.google.common.collect.ImmutableMap;
2120
import com.google.common.collect.Sets;
2221
import com.google.firebase.gradle.bomgenerator.model.Dependency;
@@ -51,7 +50,7 @@
5150

5251
public abstract class BomGeneratorTask extends DefaultTask {
5352
private static final List<String> BOM_ARTIFACTS =
54-
ImmutableList.of(
53+
List.of(
5554
"com.google.firebase:firebase-analytics",
5655
"com.google.firebase:firebase-analytics-ktx",
5756
"com.google.firebase:firebase-appcheck-debug",
@@ -94,7 +93,7 @@ public abstract class BomGeneratorTask extends DefaultTask {
9493
"com.google.firebase:firebase-storage-ktx",
9594
"com.google.firebase:firebase-vertexai");
9695
private static final List<String> IGNORED_ARTIFACTS =
97-
ImmutableList.of(
96+
List.of(
9897
"crash-plugin",
9998
"firebase-ml-vision",
10099
"crashlytics",
@@ -175,7 +174,7 @@ public abstract class BomGeneratorTask extends DefaultTask {
175174
"firebase-ml-natural-language-translate",
176175
"firebase-ml-natural-language-translate-model");
177176
private static final List<String> IMPORTANT_NON_FIREBASE_LIBRARIES =
178-
ImmutableList.of(
177+
List.of(
179178
"com.google.android.gms:play-services-ads",
180179
"com.google.gms:google-services",
181180
"com.android.tools.build:gradle",

buildSrc/src/main/java/com/google/firebase/gradle/plugins/BaseFirebaseLibraryPlugin.kt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import java.nio.file.Paths
2323
import org.gradle.api.Plugin
2424
import org.gradle.api.Project
2525
import org.gradle.api.artifacts.ProjectDependency
26+
import org.gradle.api.file.ConfigurableFileCollection
2627
import org.gradle.api.provider.Provider
2728
import org.gradle.api.publish.PublishingExtension
2829
import org.gradle.api.publish.maven.MavenPom
@@ -124,7 +125,10 @@ abstract class BaseFirebaseLibraryPlugin : Plugin<Project> {
124125
Coverage.apply(library)
125126
}
126127

127-
protected fun getApiInfo(project: Project, srcDirs: Set<File>): TaskProvider<ApiInformationTask> {
128+
protected fun getApiInfo(
129+
project: Project,
130+
srcDirs: ConfigurableFileCollection,
131+
): TaskProvider<ApiInformationTask> {
128132
val outputFile =
129133
project.rootProject.file(
130134
Paths.get(
@@ -138,7 +142,7 @@ abstract class BaseFirebaseLibraryPlugin : Plugin<Project> {
138142
project.file("api.txt").takeIf { it.exists() } ?: project.rootProject.file("empty-api.txt")
139143
val apiInfo =
140144
project.tasks.register<ApiInformationTask>("apiInformation") {
141-
sources.value(project.provider { srcDirs })
145+
sources.from(project.provider { srcDirs })
142146
apiTxtFile.set(apiTxt)
143147
baselineFile.set(project.file("baseline.txt"))
144148
this.outputFile.set(outputFile)
@@ -157,17 +161,17 @@ abstract class BaseFirebaseLibraryPlugin : Plugin<Project> {
157161
}
158162
}
159163

160-
protected fun getGenerateApiTxt(project: Project, srcDirs: Set<File>) =
164+
protected fun getGenerateApiTxt(project: Project, srcDirs: ConfigurableFileCollection) =
161165
project.tasks.register<GenerateApiTxtTask>("generateApiTxtFile") {
162-
sources.value(project.provider { srcDirs })
166+
sources.from(project.provider { srcDirs })
163167
apiTxtFile.set(project.file("api.txt"))
164168
baselineFile.set(project.file("baseline.txt"))
165169
updateBaseline.set(project.hasProperty("updateBaseline"))
166170
}
167171

168-
protected fun getDocStubs(project: Project, srcDirs: Set<File>) =
172+
protected fun getDocStubs(project: Project, srcDirs: ConfigurableFileCollection) =
169173
project.tasks.register<GenerateStubsTask>("docStubs") {
170-
sources.value(project.provider { srcDirs })
174+
sources.from(project.provider { srcDirs })
171175
}
172176

173177
/**

buildSrc/src/main/java/com/google/firebase/gradle/plugins/DackkaGenerationTask.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import java.io.File
2020
import javax.inject.Inject
2121
import org.gradle.api.DefaultTask
2222
import org.gradle.api.file.FileCollection
23+
import org.gradle.api.file.RegularFileProperty
2324
import org.gradle.api.provider.ListProperty
2425
import org.gradle.api.provider.Property
2526
import org.gradle.api.tasks.CacheableTask
@@ -53,7 +54,7 @@ import org.json.JSONObject
5354
@CacheableTask
5455
abstract class GenerateDocumentationTaskExtension : DefaultTask() {
5556
@get:[InputFile Classpath]
56-
abstract val dackkaJarFile: Property<File>
57+
abstract val dackkaJarFile: RegularFileProperty
5758

5859
@get:[InputFiles Classpath]
5960
abstract val dependencies: Property<FileCollection>
@@ -72,7 +73,7 @@ abstract class GenerateDocumentationTaskExtension : DefaultTask() {
7273

7374
@get:Input abstract val clientName: Property<String>
7475

75-
@get:OutputDirectory abstract val outputDirectory: Property<File>
76+
@get:OutputDirectory abstract val outputDirectory: RegularFileProperty
7677
}
7778

7879
/**
@@ -123,7 +124,7 @@ constructor(private val workerExecutor: WorkerExecutor) : GenerateDocumentationT
123124
val jsonMap =
124125
mapOf(
125126
"moduleName" to "",
126-
"outputDir" to outputDirectory.get().absolutePath,
127+
"outputDir" to outputDirectory.get().asFile.absolutePath,
127128
"globalLinks" to "",
128129
"sourceSets" to
129130
listOf(
@@ -215,7 +216,7 @@ constructor(private val workerExecutor: WorkerExecutor) : GenerateDocumentationT
215216
*/
216217
interface DackkaParams : WorkParameters {
217218
val args: ListProperty<String>
218-
val dackkaFile: Property<File>
219+
val dackkaFile: RegularFileProperty
219220
}
220221

221222
/**

buildSrc/src/main/java/com/google/firebase/gradle/plugins/DackkaPlugin.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ package com.google.firebase.gradle.plugins
1818

1919
import com.android.build.api.attributes.BuildTypeAttr
2020
import com.android.build.gradle.LibraryExtension
21-
import java.io.File
2221
import org.gradle.api.Plugin
2322
import org.gradle.api.Project
23+
import org.gradle.api.file.RegularFile
2424
import org.gradle.api.provider.Provider
2525
import org.gradle.api.tasks.Copy
2626
import org.gradle.api.tasks.Delete
@@ -204,26 +204,26 @@ abstract class DackkaPlugin : Plugin<Project> {
204204
private fun GenerateDocumentationTask.applyCommonConfigurations() {
205205
dependsOnAndMustRunAfter("createFullJarRelease")
206206

207-
val dackkaFile = project.provider { project.dackkaConfig.singleFile }
207+
val dackkaFile = project.layout.projectDirectory.file(project.dackkaConfig.singleFile.path)
208208

209-
dackkaJarFile.set(dackkaFile)
209+
dackkaJarFile.convention(dackkaFile)
210210
clientName.set(project.firebaseLibrary.artifactId)
211211
}
212212

213213
private fun registerFiresiteTransformTask(
214214
project: Project,
215-
dackkaOutputDirectory: Provider<File>,
215+
dackkaOutputDirectory: Provider<RegularFile>,
216216
) =
217217
project.tasks.register<FiresiteTransformTask>("firesiteTransform") {
218218
val outputDir by tempFile("dackkaTransformedFiles")
219219

220-
dackkaFiles.set(dackkaOutputDirectory.childFile("docs/reference"))
220+
dackkaFiles.set(dackkaOutputDirectory)
221221
outputDirectory.set(outputDir)
222222
}
223223

224224
private fun registerCopyDocsToCommonDirectoryTask(
225225
project: Project,
226-
transformedFilesDirectory: Provider<File>,
226+
transformedFilesDirectory: Provider<RegularFile>,
227227
) =
228228
project.tasks.register<Copy>("copyDocsToCommonDirectory") {
229229
from(transformedFilesDirectory)

0 commit comments

Comments
 (0)