flutterfire_cli icon indicating copy to clipboard operation
flutterfire_cli copied to clipboard

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

Open devNamanG opened this issue 1 year ago • 2 comments

… 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

  • [ ] ✨ feat -- New feature (non-breaking change which adds functionality)
  • [x] 🛠️ fix -- Bug fix (non-breaking change which fixes an issue)
  • [ ] ❌ ! -- Breaking change (fix or feature that would cause existing functionality to change)
  • [x] 🧹 refactor -- Code refactor
  • [ ] ✅ ci -- Build configuration change
  • [ ] 📝 docs -- Documentation
  • [ ] 🗑️ chore -- Chore

devNamanG avatar Jun 01 '24 07:06 devNamanG

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 01 '24 07:06 CLAassistant

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!

devNamanG avatar Jun 01 '24 12:06 devNamanG

Hello 👋, this PR has been opened for more than 2 months with no activity on it.

If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing!

You have 15 days until this gets closed automatically

github-actions[bot] avatar Sep 30 '24 10:09 github-actions[bot]

Has this been implemented? Still having this issue with my app even with latest dev build.

Henry5775 avatar Nov 09 '24 15:11 Henry5775

Hey @Henry5775 , no i don't think so, last i checked this was still not working. Then I just abandoned using Kotlin DSL and switched to Groovy DSL instead.

devNamanG avatar Nov 16 '24 17:11 devNamanG

Has this been implemented? Still having this issue with my app even with latest dev build.

Same here. Wasted so much time trying to find a solution to this.

jasecoulls avatar Nov 28 '24 16:11 jasecoulls

do we have any update on that one? it's a must,i guess @russellwheatley

IldySilva avatar Feb 11 '25 16:02 IldySilva

Is there anything new? we need these modifications!!

alimaherofficial avatar Feb 15 '25 05:02 alimaherofficial

Let me bring this up internally 👍

Ehesp avatar Feb 15 '25 08:02 Ehesp

this not support flutter 3.29 now flutter use kotlin DSL

the-best-is-best avatar Feb 16 '25 17:02 the-best-is-best

Tests will probably fail as there's a token required which isn't available for forked PRs, I ran locally and they all passed Screenshot 2025-02-17 at 17 08 54

russellwheatley avatar Feb 17 '25 17:02 russellwheatley