Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flutter create --template=package create directories for all platforms #127491

Closed
2 tasks done
woprandi opened this issue May 24, 2023 · 3 comments
Closed
2 tasks done

flutter create --template=package create directories for all platforms #127491

woprandi opened this issue May 24, 2023 · 3 comments
Labels
r: duplicate Issue is closed as a duplicate of an existing issue

Comments

@woprandi
Copy link
Contributor

woprandi commented May 24, 2023

Is there an existing issue for this?

Steps to reproduce

flutter create --template=package is supposed to be used to create a pure, platform-independent dart package but it now creates directories for all platforms (except web)

  1. flutter create --template=package test_pkg
  2. ls test_pkg

First bad commit is d80e994

Expected results

(Before the issue)

analysis_options.yaml  CHANGELOG.md  lib  LICENSE  pubspec.lock  pubspec.yaml  README.md  test  test_pkg.iml

Actual results

analysis_options.yaml  android  CHANGELOG.md  ios  lib  LICENSE  linux  macos  pubspec.lock  pubspec.yaml  README.md  test  test_pkg.iml  windows

Code sample

No code

Screenshots or Video

No response

Logs

Logs
Building flutter tool...
Downloading package sky_engine...                                1 388ms
Downloading flutter_patched_sdk tools...                         1 208ms
Downloading flutter_patched_sdk_product tools...                 1 193ms
Downloading linux-x64 tools...                                      5,7s
Downloading linux-x64/font-subset tools...                         893ms
Creating project test_pkg...
Running "flutter pub get" in test_pkg...                         1 484ms
Resolving dependencies in test_pkg...
+ async 2.9.0 (2.11.0 available)
+ boolean_selector 2.1.0 (2.1.1 available)
+ characters 1.2.1 (1.3.0 available)
+ clock 1.1.1
+ collection 1.16.0 (1.17.2 available)
+ fake_async 1.3.1
+ flutter 0.0.0 from sdk flutter
+ flutter_lints 2.0.1
+ flutter_test 0.0.0 from sdk flutter
+ lints 2.0.1 (2.1.0 available)
+ matcher 0.12.12 (0.12.16 available)
+ material_color_utilities 0.2.0 (0.5.0 available)
+ meta 1.8.0 (1.9.1 available)
+ path 1.8.2 (1.8.3 available)
+ sky_engine 0.0.99 from sdk flutter
+ source_span 1.9.1 (1.10.0 available)
+ stack_trace 1.10.0 (1.11.0 available)
+ stream_channel 2.1.0 (2.1.1 available)
+ string_scanner 1.1.1 (1.2.0 available)
+ term_glyph 1.2.1
+ test_api 0.4.13 (0.6.0 available)
+ vector_math 2.1.3 (2.1.4 available)
Changed 22 dependencies in test_pkg!
This app is using a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to migrate this app to the V2 embedding.
Take a look at the docs for migrating an app: https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects
Wrote 13 files.

All done!
Your package code is in test_pkg/lib/test_pkg.dart
analysis_options.yaml  android  CHANGELOG.md  ios  lib  LICENSE  linux  macos  pubspec.lock  pubspec.yaml  README.md  test  test_pkg.iml  windows

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.10.1, on Fedora Linux 38 (KDE Plasma) 6.2.14-300.fc38.x86_64, locale fr_FR.UTF-8)
    • Flutter version 3.10.1 on channel stable at /home/william/Documents/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d3d8effc68 (il y a 8 jours), 2023-05-16 17:59:05 -0700
    • Engine revision b4fb11214d
    • Dart version 3.0.1
    • DevTools version 2.23.1

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /home/william/Android/Sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/linux#android-setup for more details.

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

[✓] Linux toolchain - develop for Linux desktop
    • clang version 16.0.3 (Fedora 16.0.3-1.fc38)
    • cmake version 3.26.3
    • ninja version 1.11.1
    • pkg-config version 1.8.0

[✓] Android Studio (version 2022.2)
    • Android Studio at /home/william/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.9971841
    • Flutter plugin version 73.0.1
    • Dart plugin version 221.6103.1
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

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

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Fedora Linux 38 (KDE Plasma) 6.2.14-300.fc38.x86_64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 113.0.5672.126

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

! Doctor found issues in 1 category.
@CalsRanna
Copy link

I met the same issue here.
Flutter (Channel stable, 3.7.12, on macOS 13.3.1 22E772610a darwin-arm64, locale zh-Hans-CN)

@dam-ease dam-ease added the in triage Presently being triaged by the triage team label May 25, 2023
@dam-ease
Copy link

dam-ease commented May 25, 2023

Thanks for filling this issue @woprandi. This issue is similar to #119844 and has been fixed with #125292. The fix is available currently only on the latest master but not on the stable yet due to #119844 (comment)

@dam-ease dam-ease added r: duplicate Issue is closed as a duplicate of an existing issue and removed in triage Presently being triaged by the triage team labels May 25, 2023
@github-actions
Copy link

github-actions bot commented Jun 8, 2023

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
r: duplicate Issue is closed as a duplicate of an existing issue
Projects
None yet
Development

No branches or pull requests

3 participants