Skip to content

Commit 7c0bb34

Browse files
committed
Merge remote-tracking branch 'origin/master' into DynamicModuleSupportBug177833559
2 parents a435e3b + f56a977 commit 7c0bb34

File tree

19 files changed

+1760
-1
lines changed

19 files changed

+1760
-1
lines changed

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: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,21 @@ dependencies {
6060
implementation "com.google.firebase:perf-plugin:$perfPluginVersion"
6161

6262
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"
6365
implementation 'digital.wup:android-maven-publish:3.6.2'
6466
implementation 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72'
6567
implementation 'org.json:json:20180813'
6668
implementation 'io.opencensus:opencensus-api:0.18.0'
6769
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"
6878
runtime 'io.opencensus:opencensus-impl:0.18.0'
6979
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.6'
7080
implementation 'org.jetbrains.dokka:dokka-android-gradle-plugin:0.9.17-g013-9b8280a'
@@ -83,6 +93,10 @@ gradlePlugin {
8393
id = 'LicenseResolverPlugin'
8494
implementationClass = 'com.google.firebase.gradle.plugins.license.LicenseResolverPlugin'
8595
}
96+
multiProjectReleasePlugin {
97+
id = 'MultiProjectReleasePlugin'
98+
implementationClass = 'com.google.firebase.gradle.MultiProjectReleasePlugin'
99+
}
86100
publishingPlugin {
87101
id = 'PublishingPlugin'
88102
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)