Skip to content

[Infra] Bump kotlin and related deps to 2.0.21 #7105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ plugins {
alias(libs.plugins.protobuf) apply false
alias(libs.plugins.errorprone)
alias(libs.plugins.crashlytics) apply false
alias(libs.plugins.kapt) apply false
id("PublishingPlugin")
id("firebase-ci")
id("smoke-tests")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ private void triggerFirebaseRemoteConfigFetchAndActivateOnSuccessfulFetch() {
@VisibleForTesting
protected void syncConfigValues(Map<String, FirebaseRemoteConfigValue> newlyFetchedMap) {
allRcConfigMap.putAll(newlyFetchedMap);
for (String existingKey : allRcConfigMap.keySet()) {
for (String existingKey : ((Map<String, FirebaseRemoteConfigValue>) allRcConfigMap).keySet()) {
if (!newlyFetchedMap.containsKey(existingKey)) {
allRcConfigMap.remove(existingKey);
}
Expand Down
2 changes: 1 addition & 1 deletion firebase-sessions/firebase-sessions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ plugins {
id("firebase-library")
id("firebase-vendor")
id("kotlin-android")
id("kotlin-kapt")
alias(libs.plugins.kapt)
}

firebaseLibrary {
Expand Down
13 changes: 7 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ cardview = "1.0.0"
checkerQual = "2.5.2"
constraintlayout = "2.1.4"
coreKtx = "1.12.0"
coroutines = "1.7.3"
dagger = "2.43.2"
coroutines = "1.9.0"
dagger = "2.55"
datastore = "1.1.3"
dexmaker = "2.28.1"
dexmakerVersion = "1.2"
Expand All @@ -45,16 +45,16 @@ javalite = "3.25.5"
jsonassert = "1.5.0"
kotest = "5.9.0" # Do not use 5.9.1 because it reverts the fix for https://github.com/kotest/kotest/issues/3981
kotestAssertionsCore = "5.8.1"
kotlin = "1.8.22"
ktorVersion = "2.3.2"
kotlin = "2.0.21"
ktorVersion = "3.0.3"
legacySupportV4 = "1.0.0"
lifecycleProcess = "2.3.1"
material = "1.12.0"
mavenResolverApi = "1.9.23"
mavenResolverProvider = "3.9.9"
mockito = "5.2.0"
mockitoAndroid = "3.4.0"
mockk = "1.13.11"
mockk = "1.14.0" # Do not use 1.14.2 or above due to a bug in spyK and bumps kotlin to 2.1.x
playServicesCloudMessaging = "17.2.0"
playServicesStats = "17.0.2"
playServicesVision = "20.1.3"
Expand All @@ -68,7 +68,7 @@ robolectric = "4.12"
runner = "1.0.2"
rxandroid = "2.0.2"
rxjava = "2.1.14"
serialization = "1.5.1"
serialization = "1.7.3"
slf4jNop = "2.0.9"
spotless = "7.0.4"
testServices = "1.2.0"
Expand Down Expand Up @@ -240,3 +240,4 @@ protobuf = { id = "com.google.protobuf", version.ref = "protobufGradlePlugin" }
errorprone = { id = "net.ltgt.errorprone", version.ref = "gradleErrorpronePlugin" }
google-services = { id = "com.google.gms.google-services", version.ref = "googleServices" }
crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebaseCrashlyticsGradle" }
kapt = { id = "org.jetbrains.kotlin.kapt", version = "2.1.20"}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import java.io.BufferedOutputStream
import java.io.File
import java.util.zip.ZipEntry
import java.util.zip.ZipOutputStream
import kotlin.properties.ReadOnlyProperty
import kotlin.reflect.KProperty
import org.gradle.api.DefaultTask
import org.gradle.api.Project
import org.gradle.api.Task
Expand All @@ -39,7 +41,6 @@ import org.gradle.kotlin.dsl.apply
import org.gradle.workers.WorkAction
import org.gradle.workers.WorkParameters
import org.gradle.workers.WorkQueue
import org.jetbrains.kotlin.gradle.utils.provider

/**
* Creates a file at the buildDir for the given [Project].
Expand Down Expand Up @@ -307,3 +308,15 @@ val Provider<Directory>.nestedFile: Provider<File>
*/
val Directory.nestedFile: File
get() = asFileTree.single { it.isFile }

/**
* Creates a delegated provider.
*
* Useful to expose a provide via delegated properties. See [tempFile] for a reference usage.
*/
internal fun <T : Any> provider(provider: () -> T) =
object : ReadOnlyProperty<Any?, T> {
override operator fun getValue(thisRef: Any?, property: KProperty<*>): T {
return provider()
}
}
26 changes: 13 additions & 13 deletions smoke-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ buildscript {
}

dependencies {
classpath "com.android.tools.build:gradle:8.3.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0"
classpath "com.google.gms:google-services:4.3.14"
classpath "com.google.firebase:firebase-crashlytics-gradle:2.8.1"
classpath "com.android.tools.build:gradle:8.6.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.21"
classpath "com.google.gms:google-services:4.4.3"
classpath "com.google.firebase:firebase-crashlytics-gradle:3.0.4"
}
}

Expand Down Expand Up @@ -69,33 +69,33 @@ apply from: "configure.gradle"
dependencies {
implementation libs.androidx.test.core
// Common utilities (application side)
implementation "androidx.test:rules:1.4.0"
implementation "androidx.test:runner:1.4.0"
implementation "androidx.test:rules:1.5.0"
implementation "androidx.test:runner:1.6.2"
// Firebase
implementation "com.google.firebase:firebase-analytics"
implementation "com.google.firebase:firebase-annotations"
implementation "com.google.firebase:firebase-appdistribution:16.0.0-beta03"
implementation "com.google.firebase:firebase-appdistribution-api:16.0.0-beta03"
implementation "com.google.firebase:firebase-appdistribution:16.0.0-beta15"
implementation "com.google.firebase:firebase-appdistribution-api:16.0.0-beta15"
implementation "com.google.firebase:firebase-auth"
implementation "com.google.firebase:firebase-common"
implementation "com.google.firebase:firebase-config"
implementation "com.google.firebase:firebase-crashlytics:18.6.4"
implementation "com.google.firebase:firebase-crashlytics:19.4.4"
implementation "com.google.firebase:firebase-database"
implementation "com.google.firebase:firebase-firestore"
implementation "com.google.firebase:firebase-functions"
// TODO(yifany): remove after the issue is fixed
// https://github.com/firebase/firebase-android-sdk/issues/4206
implementation "com.google.firebase:firebase-iid:21.1.0"
implementation "com.google.firebase:firebase-iid"
implementation "com.google.firebase:firebase-inappmessaging"
implementation "com.google.firebase:firebase-messaging"
implementation "com.google.firebase:firebase-ml-modeldownloader:24.2.3"
implementation "com.google.firebase:firebase-ml-modeldownloader:25.0.1"
implementation "com.google.firebase:firebase-perf"
implementation "com.google.firebase:firebase-storage"
implementation "com.google.truth:truth:1.0.1"
implementation "com.google.truth:truth:1.4.4"
implementation libs.junit

// Common utilities (instrumentation side)
androidTestImplementation "androidx.test:runner:1.4.0"
androidTestImplementation "androidx.test:runner:1.6.2"
androidTestImplementation libs.junit

// Desugaring library
Expand Down
2 changes: 1 addition & 1 deletion smoke-tests/configure.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


def configurePlatform() {
def bom = "com.google.firebase:firebase-bom:20.0.0"
def bom = "com.google.firebase:firebase-bom:33.16.0"
if (project.hasProperty("firebase-bom")) {
bom = project.getProperty("firebase-bom")
}
Expand Down
1 change: 0 additions & 1 deletion smoke-tests/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

android.enableR8=true
android.useAndroidX=true

org.gradle.jvmargs=-Xmx8g
4 changes: 2 additions & 2 deletions tools/lint/src/test/kotlin/FirebaseAppGetDetectorTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class FirebaseAppGetDetectorTests : LintDetectorTest() {
val instance = FirebaseApp.getInstance().get(Foo::class.java)

@JvmStatic
fun getInstance(app: FirebaseApp) = app.get(Foo::class.java)
fun getInstance(app: FirebaseApp): Foo = app.get(Foo::class.java)
}
}
"""
Expand All @@ -145,7 +145,7 @@ class FirebaseAppGetDetectorTests : LintDetectorTest() {
val instance = FirebaseApp.getInstance().get(FooImpl::class.java)

@JvmStatic
fun getInstance(app: FirebaseApp) = app.get(FooImpl::class.java)
fun getInstance(app: FirebaseApp): Foo = app.get(FooImpl::class.java)
}
}
class FooImpl : Foo()
Expand Down
Loading