Skip to content

flutter packages get creates android and ios folders in package projects #22348

@filleduchaos

Description

@filleduchaos

Steps to Reproduce

  1. Create a package. flutter create -t package minimal
  2. As expected, there is no android or ios folder in minimal
  3. Run flutter packages get in minimal
  4. Now there are android and ios folders with GeneratedPluginRegistrants in them, even though the package doesn't rely on any platform-specific code.

Logs

N/A

flutter doctor -v

[✓] Flutter (Channel beta, v0.8.2, on Mac OS X 10.13.3 17D102, locale en-US)
    • Flutter version 0.8.2 at [redacted]
    • Framework revision 5ab9e70727 (3 weeks ago), 2018-09-07 12:33:05 -0700
    • Engine revision 58a1894a1c
    • Dart version 2.1.0-dev.3.1.flutter-760a9690c2

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.1)
    • Android SDK at [redacted]
    • Android NDK at [redacted]
    • Platform android-28, build-tools 28.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.4.1, Build version 9F2000
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 28.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] VS Code (version 1.27.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.18.0

[!] Connected devices
    ! No devices available

! Doctor found issues in 1 category.

Is this behaviour normal/by design? It certainly hasn't been the case in the past, and it's pretty annoying to have to delete the unnecessary android and ios folders every time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    toolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions