invertase / flutterfire_cli

A CLI to help with using FlutterFire in your Flutter applications.
Apache License 2.0
170 stars 47 forks source link

fix: FlutterFire CLI is not able to handle projects that use… #306

Open devNamanG opened 3 months ago

devNamanG commented 3 months ago

… Kotlin DSL for Gradle #305

Description

Added support for updating android/build.gradle.kts, android/settings.gradle.kts and android/app/build.gradle.kts files. Added RegExps, functions to handle Kotlin Gradle DSL files if Groovy Gradle DSL files are not found We assume that the project does not use a mix of Groovy and Kotlin DSL gradle files. We check whether the android/build.gradle file exists or not. If it exists, the existing code handles updating the files. If it does not not exist, we proceed to check whether android/build.gradle.kts file exists. If it does, we use Kotlin DSL configuration. If both configuration files are not found, an Exception is thrown.

Type of Change

CLAassistant commented 3 months ago

CLA assistant check
All committers have signed the CLA.

devNamanG commented 3 months ago

Okay so I tried running the code on a project with Kotlin DSL files, and for some reason, it is not updating the those files, even though it does write google-services.json. Can someone check this out as well? The existing plugin code seems to not even call the updated gradleContentUpdates function. It would be really helpful if a maintainer checks this out, thank you!