Skip to content

Commit d6bea74

Browse files
Merge
2 parents e82d7a8 + 7b9b80e commit d6bea74

File tree

121 files changed

+6296
-473
lines changed

Some content is hidden

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

121 files changed

+6296
-473
lines changed

.idea/runConfigurations/Firestore_Integration_Tests__Firestore_Emulator_.xml

Lines changed: 7 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/Firestore_Unit_Tests.xml

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

alternative-root-project.gradle

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
// Copyright 2021 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+
import com.google.firebase.gradle.MultiProjectReleasePlugin
16+
17+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
18+
19+
buildscript {
20+
ext.kotlinVersion = '1.3.72'
21+
repositories {
22+
google()
23+
jcenter()
24+
mavenCentral()
25+
maven {
26+
url "https://plugins.gradle.org/m2/"
27+
}
28+
maven {
29+
url 'https://storage.googleapis.com/android-ci/mvn/'
30+
}
31+
}
32+
33+
dependencies {
34+
classpath 'com.android.tools.build:gradle:3.4.3'
35+
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.14'
36+
classpath 'net.ltgt.gradle:gradle-errorprone-plugin:1.2.1'
37+
classpath 'org.jsoup:jsoup:1.11.2'
38+
classpath 'gradle.plugin.com.github.sherter.google-java-format:google-java-format-gradle-plugin:0.8'
39+
classpath 'com.google.gms:google-services:4.3.0'
40+
classpath 'me.tatarka:gradle-retrolambda:3.7.1'
41+
classpath 'digital.wup:android-maven-publish:3.6.2'
42+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
43+
classpath 'org.jlleitschuh.gradle:ktlint-gradle:7.1.0'
44+
}
45+
}
46+
47+
ext {
48+
playServicesVersion = '16.0.1'
49+
supportAnnotationsVersion = '28.0.0'
50+
gMavenRoot = 'https://dl.google.com/dl/android/maven2'
51+
firebaseDefaultPreguardFile='oss/default-preguard.txt'
52+
errorproneVersion = '2.3.2'
53+
errorproneJavacVersion = '9+181-r4173-1'
54+
googleTruthVersion = '0.40'
55+
56+
}
57+
58+
apply from: 'build.gradle'
59+
60+
configure(subprojects) {
61+
afterEvaluate {
62+
tasks.verifyGoogleJavaFormat {
63+
exclude '**/build/classes/**'
64+
}
65+
}
66+
}
67+
68+
apply plugin: MultiProjectReleasePlugin

alternative-settings.gradle

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright 2021 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+
rootProject.name = 'com.google.firebase'
16+
//Note: do not add subprojects to this file. Instead add them to subprojects.gradle
17+
18+
apply from: 'gradle/projectSettings.gradle'
19+
20+
discoverSubprojects(file('subprojects.cfg')).each {
21+
include ":$it"
22+
}
23+
24+
renameBuildScripts(rootProject)
25+
rootProject.buildFileName = 'alternative-root-project.gradle'
26+
27+
apply from: new File(settingsDir, 'gradle/buildCache.gradle')

buildSrc/build.gradle

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
plugins {
1616
id "org.gradle.kotlin.kotlin-dsl" version "1.2.6"
1717
id "org.jlleitschuh.gradle.ktlint" version "9.2.1"
18+
id 'com.github.sherter.google-java-format' version '0.9'
1819
}
1920

2021
repositories {
@@ -35,18 +36,45 @@ repositories {
3536
// Refer go/fireperf-plugin-test-on-head for more details.
3637
def perfPluginVersion = System.getenv("FIREBASE_PERF_PLUGIN_VERSION") ?: "1.3.4"
3738

39+
googleJavaFormat {
40+
toolVersion = '1.7'
41+
}
42+
tasks.googleJavaFormat {
43+
source '.'
44+
include '**/java/**/*.java'
45+
exclude '**/generated/**'
46+
exclude '**/package-info.java'
47+
}
48+
49+
tasks.verifyGoogleJavaFormat {
50+
source '.'
51+
include '**/java/**/*.java'
52+
exclude '**/generated/**'
53+
exclude '**/package-info.java'
54+
}
55+
3856
dependencies {
3957
// Firebase performance plugin, it should be added here because of how gradle dependency
4058
// resolution works, otherwise it breaks Fireperf Test Apps.
4159
// See https://github.com/gradle/gradle/issues/12286
4260
implementation "com.google.firebase:perf-plugin:$perfPluginVersion"
4361

4462
implementation 'org.jsoup:jsoup:1.11.2'
63+
implementation "com.google.auto.value:auto-value-annotations:1.6.6"
64+
annotationProcessor "com.google.auto.value:auto-value:1.6.5"
4565
implementation 'digital.wup:android-maven-publish:3.6.2'
4666
implementation 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72'
4767
implementation 'org.json:json:20180813'
4868
implementation 'io.opencensus:opencensus-api:0.18.0'
4969
implementation 'io.opencensus:opencensus-exporter-stats-stackdriver:0.18.0'
70+
implementation "org.eclipse.aether:aether-api:1.0.0.v20140518"
71+
implementation "org.eclipse.aether:aether-util:1.0.0.v20140518"
72+
implementation "org.eclipse.aether:aether-impl:1.0.0.v20140518"
73+
implementation "org.eclipse.aether:aether-connector-basic:1.0.0.v20140518"
74+
implementation "org.eclipse.aether:aether-transport-file:1.0.0.v20140518"
75+
implementation "org.eclipse.aether:aether-transport-http:1.0.0.v20140518"
76+
implementation "org.eclipse.aether:aether-transport-wagon:1.0.0.v20140518"
77+
implementation "org.apache.maven:maven-aether-provider:3.1.0"
5078
runtime 'io.opencensus:opencensus-impl:0.18.0'
5179
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.6'
5280
implementation 'org.jetbrains.dokka:dokka-android-gradle-plugin:0.9.17-g013-9b8280a'
@@ -65,6 +93,10 @@ gradlePlugin {
6593
id = 'LicenseResolverPlugin'
6694
implementationClass = 'com.google.firebase.gradle.plugins.license.LicenseResolverPlugin'
6795
}
96+
multiProjectReleasePlugin {
97+
id = 'MultiProjectReleasePlugin'
98+
implementationClass = 'com.google.firebase.gradle.MultiProjectReleasePlugin'
99+
}
68100
publishingPlugin {
69101
id = 'PublishingPlugin'
70102
implementationClass = 'com.google.firebase.gradle.plugins.publish.PublishingPlugin'

buildSrc/devsite_transform.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Copyright 2021 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+
set -x
16+
#!/bin/sh -x
17+
grep -rl 'http://' | xargs sed -i 's|http://|//|g'
18+
grep -rl 'https://' | xargs sed -i 's|https://|//|g'
19+
grep -rl 'reference/com/google/' | xargs sed -i 's|reference/com/google/|/docs/reference/android/com/google/|g'
20+
grep -rl '//developers.google.com/android//docs/reference/android/' | xargs sed -i 's|//developers.google.com/android//docs/reference/android/|//developers.google.com/android/reference/|g'
21+
grep -rl '//developers.google.com/android/reference/com/google/firebase/' | xargs sed -i 's|//developers.google.com/android/reference/com/google/firebase/|/docs/reference/android/com/google/firebase/|g'
22+
grep -rl 'href="reference' | xargs sed -i 's|href="reference|href="/docs/reference/android/|g'
23+
grep -rl '/docs/reference/android///developers.google.com/android/reference/' | xargs sed -i 's|/docs/reference/android///developers.google.com/android/reference/|/docs/reference/android/|g'
24+
grep -rl '/docs/reference/android///developer.android.com/reference/' | xargs sed -i 's|/docs/reference/android///developer.android.com/reference/|//developer.android.com/reference/|g'
25+
grep -rl '/docs/reference/android//docs/reference/android/' | xargs sed -i 's|/docs/reference/android//docs/reference/android/|/docs/reference/android/|g'
26+
find . -name '*.html' | xargs sed -i 's/[ \t]*$//' "$@"
27+
# TODO(b/37810114): Remove this hack once b/64612004 is fixed and propagated to our javadoc.
28+
find . -name '*.html' | xargs perl -0777 -p -i -e 's|.+<div class="jd-tagdata">\n(.*\n){1,5}?(?:.+<tr>\n.+\n.+<td><!-- no parameter comment --></td>\n.+</tr>\n)+?(.+\n){1,5}?.*</div>||gm'
29+
find . -name '_toc.yaml' | xargs sed -i 's|"com\.google\.firebase|"firebase|g'
30+
find . -name '_toc.yaml' | xargs sed -i 's|"com\.goo gle\.android\.gms\.|"|g'
31+
find . -name "_toc.yaml" | xargs sed -i 's|path: reference/|path: /docs/reference/android/|g'
32+
33+
#Delete blank lines
34+
find . -name "_toc.yaml" | xargs sed -i 's/[ \t]*$//'
35+
36+
#Delete newline after section:
37+
find . -name "_toc.yaml" | xargs sed -i -z 's/section:\n\n+/section:\n/g'
38+
39+
#Delete whitestapes after toc sections
40+
find . -name "_toc.yaml" | xargs sed -i 's|section: |section:|g'
41+
42+
#Delete blank lines at the top of a file
43+
find . -name "_toc.yaml" | xargs sed -i '/./,$!d'
44+
45+
#Delete all kotlin javadoc
46+
rm -rf "ktx/"

buildSrc/gms_transform.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Copyright 2021 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+
set -x
16+
#!/bin/sh -x
17+
grep -rl 'http://' | xargs sed -i 's|http://|//|g'
18+
grep -rl 'https://' | xargs sed -i 's|https://|//|g'
19+
grep -rl '/docs/reference/android///developers.google.com/' | xargs sed -i 's|/docs/reference/android///developers.google.com||g'
20+
grep -rl '/docs/reference/android/reference' | xargs sed -i 's|/docs/reference/android/reference|/android/reference|g'
21+
grep -rl '//developers.google.com/android/reference/com/google/firebase/' | xargs sed -i 's|//developers.google.com/android/reference/com/google/firebase/|/android/reference/com/google/firebase/|g'
22+
grep -rl '/docs/reference/android///developer.android.com/reference/' | xargs sed -i 's|/docs/reference/android///developer.android.com/reference/|//developer.android.com/reference/|g'
23+
find . -name '*.html' | xargs sed -i 's/[ \t]*$//' "$@"
24+
find . -name '*.html' | xargs perl -0777 -p -i -e 's|.+<div class="jd-tagdata">\n(.*\n){1,5}?(?:.+<tr>\n.+\n.+<td><!-- no parameter comment --></td>\n.+</tr>\n)+?(.+\n){1,5}?.*</div>||gm'
25+
find . -name '_toc.yaml' | xargs sed -i 's|"com\.google\.firebase|"firebase|g'
26+
find . -name '_toc.yaml' | xargs sed -i 's|"com\.google\.android\.gms\.|"|g'i
27+
find . -name "_toc.yaml" | xargs sed -i 's|path: reference/|path: /android/reference/|g'
28+
find . -name "_toc.yaml" | xargs sed -i 's|path: /docs/reference/android/|path: /android/reference/|g'
29+
30+
#Delete blank lines
31+
find . -name "_toc.yaml" | xargs sed -i 's/[ \t]*$//'
32+
33+
#Path substitutions after cl/273770926
34+
find . -name '*.html' | xargs sed -i 's/\/_project.yaml/\/android\/_project.yaml/'
35+
36+
#Delete newline after section:
37+
find . -name "_toc.yaml" | xargs sed -i -z 's/section:\n\n+/section:\n/g'
38+
39+
#Path substitution after cl/273770926
40+
find . -name '*.html' | xargs sed -i 's|/docs/reference/_book.yaml|/android/_book.yaml|g'
41+
42+
#Delete whitespaces after section
43+
find . -name "_toc.yaml" | xargs sed -i 's|section: |section:|g'
44+
45+
#Delete blank lines at top of file
46+
find . -name "_toc.yaml" | xargs sed -i '/./,$!d'
47+
48+
rm -rf "ktx/"

0 commit comments

Comments
 (0)