Skip to content

Commit 85f129e

Browse files
committed
Merge branch 'master' into rl.update-android-gradle
2 parents c61d9bf + d4776b3 commit 85f129e

File tree

619 files changed

+218276
-194904
lines changed

Some content is hidden

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

619 files changed

+218276
-194904
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ build/
55
captures/
66
local.properties
77
google-services.json
8-
/build.gradle
98
_artifacts
109
.DS_Store
10+
firebase-crashlytics-ndk/.externalNativeBuild/

.idea/runConfigurations/Firestore_Unit_Tests.xml

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

.opensource/project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"pages": {
99
"README.md": "Development Guide",
1010
"docs/ktx/common.md": "Common KTX",
11+
"docs/ktx/dynamic-links.md": "Dynamic Links KTX",
1112
"docs/ktx/firestore.md": "Firestore KTX",
1213
"docs/ktx/functions.md": "Functions KTX",
1314
"docs/ktx/inappmessaging.md": "In-App Messaging KTX",

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ Firebase Android libraries exercise all three types of tests recommended by the
6363
Depending on the requirements of the specific project, some or all of these
6464
tests may be used to support changes.
6565

66+
> :warning: **Running tests with errorprone**
67+
>
68+
> To run with errorprone add `withErrorProne` to the command line, e.g.
69+
>
70+
> `./gradlew :<firebase-project>:check withErrorProne`.
71+
6672
### Unit Testing
6773

6874
These are tests that run on your machine's local Java Virtual Machine (JVM). At

apk-size/apk-size.gradle

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright 2020 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+
buildscript {
16+
17+
repositories {
18+
google()
19+
jcenter()
20+
21+
}
22+
dependencies {
23+
classpath 'com.android.tools.build:gradle:3.4.2'
24+
}
25+
}
26+
27+
apply from: '../sdkProperties.gradle'
28+
29+
task clean(type: Delete) {
30+
delete rootProject.buildDir
31+
}
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package com.google.firebase.gradle.plugins.ci
15+
apply plugin: "com.android.application"
16+
apply from: "default.gradle"
17+
android {
18+
flavorDimensions "apkSize"
1619

17-
import java.util.regex.Pattern
20+
compileOptions {
21+
sourceCompatibility JavaVersion.VERSION_1_8
22+
targetCompatibility JavaVersion.VERSION_1_8
23+
}
24+
}
1825

19-
/** Contains plugin configuration properties. */
20-
class ContinuousIntegrationExtension {
21-
/** List of paths that the plugin should ignore when querying the Git commit. */
22-
List<Pattern> ignorePaths = []
23-
}
26+
apply from: "src/base/base.gradle"
27+
apply from: "configure.gradle"

apk-size/app/configure.gradle

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// Copyright 2020 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+
16+
repositories {
17+
maven {
18+
url '../../build/m2repository/'
19+
}
20+
google()
21+
jcenter()
22+
}
23+
24+
// firebase-inappmessaging-display fails with `java.lang.OutOfMemoryError (no error message)`
25+
// in task `:transformDexArchiveWithExternalLibsDexMergerForFirebase-inappmessaging-displayRelease`
26+
//
27+
// firebase-inappmessaging-display-ktx fails with `java.lang.OutOfMemoryError: GC overhead limit exceeded`
28+
// in task `:transformClassesAndResourcesWithR8ForFirebase-inappmessaging-display-ktxAggressive`
29+
//
30+
// Setting max heap size to 16g in gradle.properties and android.dexOptions did not help.
31+
// When running with `gradle --continue`, failing tasks did not timeout. Thus, disable for now.
32+
// TODO (yifany): Needs further investigation.
33+
def blacklist = [
34+
'firebase-inappmessaging-display',
35+
'firebase-inappmessaging-display-ktx'
36+
]
37+
if (project.hasProperty('sdks')) {
38+
project.android {
39+
sdks.split(',').each { sdk ->
40+
def (groupId, artifactId, version) = sdk.split(':')
41+
if (blacklist.contains(artifactId)) {
42+
return
43+
}
44+
productFlavors.create(artifactId) {
45+
dimension 'apkSize'
46+
}
47+
dependencies.add("${artifactId}Implementation", sdk)
48+
}
49+
}
50+
}

apk-size/settings.gradle

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2020 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='apk-size'
16+
rootProject.buildFileName='apk-size.gradle'
17+
include ':app'

root-project.gradle renamed to build.gradle

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import com.google.firebase.gradle.plugins.license.LicenseResolverPlugin
1616

1717
buildscript {
18-
ext.kotlinVersion = '1.3.50'
18+
ext.kotlinVersion = '1.3.72'
1919
repositories {
2020
google()
2121
jcenter()
@@ -43,21 +43,19 @@ buildscript {
4343
}
4444

4545
apply from: 'sdkProperties.gradle'
46+
apply from: "gradle/errorProne.gradle"
4647

4748
ext {
4849
playServicesVersion = '16.0.1'
4950
supportAnnotationsVersion = '28.0.0'
50-
errorproneVersion = '2.3.2'
51-
errorproneJavacVersion = '9+181-r4173-1'
5251
googleTruthVersion = '0.45'
53-
robolectricVersion = '4.1'
52+
robolectricVersion = '4.3.1'
5453
}
5554

5655
apply plugin: com.google.firebase.gradle.plugins.publish.PublishingPlugin
5756
apply plugin: com.google.firebase.gradle.plugins.ci.ContinuousIntegrationPlugin
5857
apply plugin: com.google.firebase.gradle.plugins.ci.SmokeTestsPlugin
5958
apply plugin: com.google.firebase.gradle.plugins.ci.metrics.MetricsPlugin
60-
apply plugin: com.google.firebase.gradle.plugins.ci.CheckCoveragePlugin
6159

6260
firebaseContinuousIntegration {
6361
ignorePaths = [
@@ -66,18 +64,17 @@ firebaseContinuousIntegration {
6664
]
6765
}
6866

67+
if(JavaVersion.current() != JavaVersion.VERSION_11){
68+
throw new GradleException("This build must be run with java 11. You're using ${JavaVersion.current()}.")
69+
}
70+
6971
configure(subprojects) {
7072
repositories {
7173
google()
7274
jcenter()
7375
mavenLocal()
7476
}
75-
apply plugin: 'net.ltgt.errorprone'
76-
dependencies {
77-
errorprone "com.google.errorprone:error_prone_core:$errorproneVersion"
78-
errorproneJavac "com.google.errorprone:javac:$errorproneJavacVersion"
7977

80-
}
8178
apply plugin: 'com.github.sherter.google-java-format'
8279
googleJavaFormat {
8380
toolVersion = '1.7'
@@ -99,10 +96,6 @@ configure(subprojects) {
9996
exclude '**/package-info.java'
10097
}
10198

102-
tasks.withType(JavaCompile) {
103-
options.errorprone.excludedPaths = '.*/build/generated/.*'
104-
}
105-
10699
apply plugin: "org.jlleitschuh.gradle.ktlint"
107100
}
108101

buildSrc/$project.buildDir/generated/third_party_licenses/third_party_licenses.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

buildSrc/$project.buildDir/generated/third_party_licenses/third_party_licenses.txt

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

buildSrc/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
// limitations under the License.
1414

1515
plugins {
16-
id 'java-gradle-plugin'
17-
id 'groovy'
16+
id "org.gradle.kotlin.kotlin-dsl" version "1.2.6"
17+
id "org.jlleitschuh.gradle.ktlint" version "9.2.1"
1818
}
1919

2020
repositories {
@@ -42,12 +42,10 @@ dependencies {
4242
implementation 'digital.wup:android-maven-publish:3.6.2'
4343
implementation 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.20'
4444
implementation 'org.json:json:20180813'
45-
4645
implementation 'io.opencensus:opencensus-api:0.18.0'
4746
implementation 'io.opencensus:opencensus-exporter-stats-stackdriver:0.18.0'
4847
runtime 'io.opencensus:opencensus-impl:0.18.0'
4948
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.6'
50-
5149
implementation 'org.jetbrains.dokka:dokka-android-gradle-plugin:0.9.17-g005'
5250

5351
implementation 'com.android.tools.build:gradle:3.5.2'
@@ -57,6 +55,9 @@ dependencies {
5755
exclude group: 'org.codehaus.groovy'
5856
}
5957

58+
testImplementation 'junit:junit:4.13-rc-1'
59+
testImplementation group: 'com.google.code.gson', name: 'gson', version: '2.8.6'
60+
testImplementation "com.google.truth:truth:1.0.1"
6061
testImplementation 'commons-io:commons-io:2.6'
6162

6263
}

buildSrc/src/main/groovy/com/google/firebase/gradle/plugins/ci/AffectedProjectFinder.groovy

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

0 commit comments

Comments
 (0)