flutterfire_cli icon indicating copy to clipboard operation
flutterfire_cli copied to clipboard

[bug]: FlutterFire CLI is not able to handle projects that use Kotlin DSL for Gradle

Open devNamanG opened this issue 1 year ago • 2 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues.

CLI Version

1.0.0

Firebase Tools version

13.3.0

Flutter Doctor Output

[✓] Flutter (Channel stable, 3.22.1, on Fedora Linux 40 (Workstation Edition) 6.8.10-300.fc40.x86_64, locale en_IN.UTF-8) • Flutter version 3.22.1 on channel stable at /mnt/hdd/Development/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision a14f74ff3a (9 days ago), 2024-05-22 11:08:21 -0500 • Engine revision 55eae6864b • Dart version 3.4.1 • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /mnt/hdd/Development/SDKs/android-sdk • Platform android-34, build-tools 34.0.0 • Java binary at: /opt/android-studio/jbr/bin/java • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160) • All Android licenses accepted.

[✓] Chrome - develop for the web • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop • clang version 18.1.6 (Fedora 18.1.6-3.fc40) • cmake version 3.28.2 • ninja version 1.11.1 • pkg-config version 2.1.0

[✓] Android Studio (version 2023.3) • Android Studio at /opt/android-studio • Flutter plugin version 79.0.2 • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

[✓] VS Code (version 1.89.1) • VS Code at /usr/share/code • Flutter extension version 3.90.0

[✓] Connected device (2 available) • Linux (desktop) • linux • linux-x64 • Fedora Linux 40 (Workstation Edition) 6.8.10-300.fc40.x86_64 • Chrome (web) • chrome • web-javascript • Google Chrome 125.0.6422.112

[✓] Network resources • All expected network resources are available.

• No issues found!

Description

PathNotFoundException: Cannot open file, path = '/mnt/hdd/projects/repro/android/build.gradle' (OS Error: No such file or directory, errno = 2)

Steps to reproduce

Create A Flutter Project, Migrate it to use Kotlin DSL. Run flutterfire configure

Expected behavior

The CLI should complete the configuration without errors.

Screenshots

No response

Additional context and comments

No response

devNamanG avatar May 31 '24 11:05 devNamanG

I am working for a fix for this right now, will test it out and submit a PR If I am able to fix it.

devNamanG avatar May 31 '24 17:05 devNamanG

I have fixed this issue, but I cannot submit Tests in my PR since Flutter doesn't allow creating a project with the Android Kotlin DSL for Gradle at the moment. Hence to test this, it'll involve us needing to create files like build.gradle.kts, settings.gradle.kts and app/build.gradle.kts.

devNamanG avatar Jun 01 '24 06:06 devNamanG

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

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

Same issue when using flutter 3.28

PS D:\Projects\untitled> flutterfire configure --project=example-1b63e i Found 4 Firebase projects. Selecting project example-1b63e. ✔ Which platforms should your configuration support (use arrow keys & space to select)? · android, ios, macos, web, windows ✔ Which Android application id (or package name) do you want to use for this configuration, e.g. 'com.example.app'? · com.example.untitled i Firebase android app com.example.untitled registered. i Firebase ios app com.example.untitled registered. i Firebase macos app com.example.untitled registered. i Firebase web app untitled (web) registered. i Firebase windows app untitled (windows) registered. PathNotFoundException: Cannot open file, path = 'D:\Projects\untitled\android\build.gradle' (OS Error: The system cannot find the file specified. , errno = 2)

bennajah avatar Dec 21 '24 09:12 bennajah