Skip to content

Commit

Permalink
Merge pull request #285 from google/gmpAppIdAsRegularFile
Browse files Browse the repository at this point in the history
Make gmpAppId a RegularFileProperty
  • Loading branch information
mrober authored Jan 31, 2024
2 parents 1496576 + 6aae713 commit 40f7ff6
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -54,7 +55,7 @@ abstract class GoogleServicesTask : DefaultTask() {

@get:Input abstract val missingGoogleServicesStrategy: Property<MissingGoogleServicesStrategy>

@get:OutputFile abstract val gmpAppId: Property<File>
@get:OutputFile abstract val gmpAppId: RegularFileProperty

@Throws(GradleException::class)
@TaskAction
Expand Down Expand Up @@ -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<String, String?>) {
Expand Down

0 comments on commit 40f7ff6

Please sign in to comment.