From 6aae713e1ced0ed7170602de5e22d589353e1853 Mon Sep 17 00:00:00 2001 From: Matthew Robertson Date: Wed, 31 Jan 2024 14:14:16 -0500 Subject: [PATCH] Make gmpAppId a RegularFileProperty --- .../com/google/gms/googleservices/GoogleServicesTask.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/google-services-plugin/src/main/kotlin/com/google/gms/googleservices/GoogleServicesTask.kt b/google-services-plugin/src/main/kotlin/com/google/gms/googleservices/GoogleServicesTask.kt index 98e1a08..82dc26c 100644 --- a/google-services-plugin/src/main/kotlin/com/google/gms/googleservices/GoogleServicesTask.kt +++ b/google-services-plugin/src/main/kotlin/com/google/gms/googleservices/GoogleServicesTask.kt @@ -24,6 +24,7 @@ import java.util.TreeMap import org.gradle.api.DefaultTask import org.gradle.api.GradleException import org.gradle.api.file.DirectoryProperty +import org.gradle.api.file.RegularFileProperty import org.gradle.api.provider.Property import org.gradle.api.tasks.CacheableTask import org.gradle.api.tasks.Input @@ -54,7 +55,7 @@ abstract class GoogleServicesTask : DefaultTask() { @get:Input abstract val missingGoogleServicesStrategy: Property - @get:OutputFile abstract val gmpAppId: Property + @get:OutputFile abstract val gmpAppId: RegularFileProperty @Throws(GradleException::class) @TaskAction @@ -233,7 +234,7 @@ abstract class GoogleServicesTask : DefaultTask() { "config file that contains a Google App Id") } resValues["google_app_id"] = googleAppIdStr - gmpAppId.get().writeText(googleAppIdStr, Charsets.UTF_8) + gmpAppId.get().asFile.writeText(googleAppIdStr, Charsets.UTF_8) } fun FirebaseClientData.handleWebClientId(resValues: MutableMap) {