Skip to content

Commit 12ec27b

Browse files
authored
chore: upgrade to AGP 7.2.2 and Kotlin 1.7.10 (#2054)
* remove jcenter from build.gradle.kts * chore: update kotlin code style * refactor: upgrade to AGP 7.2.2 * upgrade Kotlin to 1.7.10
1 parent 399b0cd commit 12ec27b

File tree

14 files changed

+61
-57
lines changed

14 files changed

+61
-57
lines changed

app/build.gradle.kts

+7-6
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ android {
3939

4040
lint {
4141
// Common lint options across all modules
42-
disable(
42+
43+
disable += mutableSetOf(
4344
"IconExpectedSize",
4445
"InvalidPackage", // Firestore uses GRPC which makes lint mad
4546
"NewerVersionAvailable", "GradleDependency", // For reproducible builds
@@ -49,13 +50,13 @@ android {
4950
)
5051

5152
// Module-specific
52-
disable("ResourceName", "MissingTranslation", "DuplicateStrings")
53+
disable += mutableSetOf("ResourceName", "MissingTranslation", "DuplicateStrings")
5354

54-
isCheckAllWarnings = true
55-
isWarningsAsErrors = true
56-
isAbortOnError = true
55+
checkAllWarnings = true
56+
warningsAsErrors = true
57+
abortOnError = true
5758

58-
baselineFile = file("$rootDir/library/quality/lint-baseline.xml")
59+
baseline = file("$rootDir/library/quality/lint-baseline.xml")
5960
}
6061

6162
compileOptions {

auth/build.gradle.kts

+6-6
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ android {
3232

3333
lint {
3434
// Common lint options across all modules
35-
disable(
35+
disable += mutableSetOf(
3636
"IconExpectedSize",
3737
"InvalidPackage", // Firestore uses GRPC which makes lint mad
3838
"NewerVersionAvailable", "GradleDependency", // For reproducible builds
3939
"SelectableText", "SyntheticAccessor" // We almost never care about this
4040
)
4141

4242
// Module specific
43-
disable(
43+
disable += mutableSetOf(
4444
"UnusedQuantity",
4545
"UnknownNullness", // TODO fix in future PR
4646
"TypographyQuotes", // Straight versus directional quotes
@@ -50,11 +50,11 @@ android {
5050
"VectorPath"
5151
)
5252

53-
isCheckAllWarnings = true
54-
isWarningsAsErrors = true
55-
isAbortOnError = true
53+
checkAllWarnings = true
54+
warningsAsErrors = true
55+
abortOnError = true
5656

57-
baselineFile = file("$rootDir/library/quality/lint-baseline.xml")
57+
baseline = file("$rootDir/library/quality/lint-baseline.xml")
5858
}
5959

6060
testOptions {

build.gradle.kts

-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ buildscript {
44
repositories {
55
google()
66
mavenCentral()
7-
jcenter()
87
mavenLocal()
98
}
109

@@ -25,7 +24,6 @@ allprojects {
2524
repositories {
2625
google()
2726
mavenCentral()
28-
jcenter()
2927
mavenLocal()
3028
}
3129

buildSrc/build.gradle.kts

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
repositories {
22
mavenCentral()
3-
jcenter()
43
}
54

65
plugins {

buildSrc/src/main/kotlin/Config.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ object Config {
22
const val version = "8.0.2-SNAPSHOT"
33
val submodules = listOf("auth", "common", "firestore", "database", "storage")
44

5-
private const val kotlinVersion = "1.3.72"
5+
private const val kotlinVersion = "1.7.10"
66

77
object SdkVersions {
88
const val compile = 29
@@ -11,7 +11,7 @@ object Config {
1111
}
1212

1313
object Plugins {
14-
const val android = "com.android.tools.build:gradle:7.0.0"
14+
const val android = "com.android.tools.build:gradle:7.2.2"
1515
const val kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
1616
const val google = "com.google.gms:google-services:4.3.8"
1717

common/build.gradle.kts

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ android {
2121

2222
lint {
2323
// Common lint options across all modules
24-
disable(
24+
disable += mutableSetOf(
2525
"IconExpectedSize",
2626
"InvalidPackage", // Firestore uses GRPC which makes lint mad
2727
"NewerVersionAvailable", "GradleDependency", // For reproducible builds
2828
"SelectableText", "SyntheticAccessor" // We almost never care about this
2929
)
3030

31-
isCheckAllWarnings = true
32-
isWarningsAsErrors = true
33-
isAbortOnError = true
31+
checkAllWarnings = true
32+
warningsAsErrors = true
33+
abortOnError = true
3434

35-
baselineFile = file("$rootDir/library/quality/lint-baseline.xml")
35+
baseline = file("$rootDir/library/quality/lint-baseline.xml")
3636
}
3737

3838
buildTypes {

database/build.gradle.kts

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ android {
2323

2424
lint {
2525
// Common lint options across all modules
26-
disable(
26+
disable += mutableSetOf(
2727
"IconExpectedSize",
2828
"InvalidPackage", // Firestore uses GRPC which makes lint mad
2929
"NewerVersionAvailable", "GradleDependency", // For reproducible builds
3030
"SelectableText", "SyntheticAccessor" // We almost never care about this
3131
)
3232

33-
isCheckAllWarnings = true
34-
isWarningsAsErrors = true
35-
isAbortOnError = true
33+
checkAllWarnings = true
34+
warningsAsErrors = true
35+
abortOnError = true
3636

37-
baselineFile = file("$rootDir/library/quality/lint-baseline.xml")
37+
baseline = file("$rootDir/library/quality/lint-baseline.xml")
3838
}
3939

4040
buildTypes {

firestore/build.gradle.kts

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ android {
1919

2020
lint {
2121
// Common lint options across all modules
22-
disable(
22+
disable += mutableSetOf(
2323
"IconExpectedSize",
2424
"InvalidPackage", // Firestore uses GRPC which makes lint mad
2525
"NewerVersionAvailable", "GradleDependency", // For reproducible builds
2626
"SelectableText", "SyntheticAccessor" // We almost never care about this
2727
)
2828

29-
isCheckAllWarnings = true
30-
isWarningsAsErrors = true
31-
isAbortOnError = true
29+
checkAllWarnings = true
30+
warningsAsErrors = true
31+
abortOnError = true
3232

33-
baselineFile = file("$rootDir/library/quality/lint-baseline.xml")
33+
baseline = file("$rootDir/library/quality/lint-baseline.xml")
3434
}
3535

3636
buildTypes {

gradle.properties

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ org.gradle.caching=true
44

55
android.useAndroidX=true
66
android.enableJetifier=true
7+
# Kotlin code style for this project: "official" or "obsolete":
8+
kotlin.code.style=official
9+
# Enables namespacing of each library's R class so that its R class includes only the
10+
# resources declared in the library itself and none from the library's dependencies,
11+
# thereby reducing the size of the R class for that library
12+
android.nonTransitiveRClass=false
713

814
GROUP=com.firebaseui
915
VERSION_NAME=8.0.2-SNAPSHOT
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

internal/lintchecks/build.gradle.kts

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ android {
2222

2323
lint {
2424
// Common lint options across all modules
25-
disable(
25+
disable += mutableSetOf(
2626
"IconExpectedSize",
2727
"InvalidPackage", // Firestore uses GRPC which makes lint mad
2828
"NewerVersionAvailable", "GradleDependency", // For reproducible builds
2929
"SelectableText", "SyntheticAccessor" // We almost never care about this
3030
)
3131

32-
isCheckAllWarnings = true
33-
isWarningsAsErrors = true
34-
isAbortOnError = true
32+
checkAllWarnings = true
33+
warningsAsErrors = true
34+
abortOnError = true
3535

36-
baselineFile = file("$rootDir/library/quality/lint-baseline.xml")
36+
baseline = file("$rootDir/library/quality/lint-baseline.xml")
3737
}
3838
}
3939

library/build.gradle.kts

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ android {
2121

2222
lint {
2323
// Common lint options across all modules
24-
disable(
24+
disable += mutableSetOf(
2525
"IconExpectedSize",
2626
"InvalidPackage", // Firestore uses GRPC which makes lint mad
2727
"NewerVersionAvailable", "GradleDependency", // For reproducible builds
2828
"SelectableText", "SyntheticAccessor" // We almost never care about this
2929
)
3030

31-
isCheckAllWarnings = true
32-
isWarningsAsErrors = true
33-
isAbortOnError = false // Override
31+
checkAllWarnings = true
32+
warningsAsErrors = true
33+
abortOnError = false // Override
3434

35-
baselineFile = file("$rootDir/library/quality/lint-baseline.xml")
35+
baseline = file("$rootDir/library/quality/lint-baseline.xml")
3636
}
3737
}
3838

proguard-tests/build.gradle.kts

+9-9
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ plugins {
66
val inCiBuild = System.getenv("CI") == "true"
77

88
android {
9-
compileSdkVersion(Config.SdkVersions.compile)
9+
compileSdk = Config.SdkVersions.compile
1010

1111
defaultConfig {
12-
minSdkVersion(Config.SdkVersions.min)
13-
targetSdkVersion(Config.SdkVersions.target)
12+
minSdk = Config.SdkVersions.min
13+
targetSdk = Config.SdkVersions.target
1414

1515
versionName = Config.version
1616
versionCode = 1
@@ -45,21 +45,21 @@ android {
4545
targetCompatibility = JavaVersion.VERSION_1_8
4646
}
4747

48-
lintOptions {
48+
lint {
4949
// Common lint options across all modules
50-
disable(
50+
disable += mutableSetOf(
5151
"IconExpectedSize",
5252
"InvalidPackage", // Firestore uses GRPC which makes lint mad
5353
"NewerVersionAvailable", "GradleDependency", // For reproducible builds
5454
"SelectableText", "SyntheticAccessor", // We almost never care about this
5555
"MediaCapabilities"
5656
)
5757

58-
isCheckAllWarnings = true
59-
isWarningsAsErrors = true
60-
isAbortOnError = true
58+
checkAllWarnings = true
59+
warningsAsErrors = true
60+
abortOnError = true
6161

62-
baselineFile = file("$rootDir/library/quality/lint-baseline.xml")
62+
baseline = file("$rootDir/library/quality/lint-baseline.xml")
6363
}
6464

6565
variantFilter {

storage/build.gradle.kts

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ android {
2121

2222
lint {
2323
// Common lint options across all modules
24-
disable(
24+
disable += mutableSetOf(
2525
"IconExpectedSize",
2626
"InvalidPackage", // Firestore uses GRPC which makes lint mad
2727
"NewerVersionAvailable", "GradleDependency", // For reproducible builds
2828
"SelectableText", "SyntheticAccessor" // We almost never care about this
2929
)
3030

31-
isCheckAllWarnings = true
32-
isWarningsAsErrors = true
33-
isAbortOnError = true
31+
checkAllWarnings = true
32+
warningsAsErrors = true
33+
abortOnError = true
3434

35-
baselineFile = file("$rootDir/library/quality/lint-baseline.xml")
35+
baseline = file("$rootDir/library/quality/lint-baseline.xml")
3636
}
3737

3838
buildTypes {

0 commit comments

Comments
 (0)