Zenko
Zenko

Reputation: 2559

Flutter Pubspec.yaml Warning: Publishable packages can't have git dependencies

I'm using Sembast Cloud Firestore type adapters in my pubspec.yaml:

  sembast_cloud_firestore_type_adapters:
    git:
      url: git://github.com/tekartik/sembast_flutter_more.dart
      path: cloud_firestore_type_adapters
      ref: dart2
      version: '>=0.1.0'

and loading adapters:

  loading:
    git:
      url: git://github.com/leonzone/loading.git
      path: loading
      ref: 8f5a63f

I got this error for both of the above lines: warning: Publishable packages can't have git dependencies.

Here is my flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 1.24.0-7.0.pre.71, on Mac OS X 10.15.7 19H2 darwin-x64,
    locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.50.1)
[✓] Connected device (3 available)

• No issues found!

Upvotes: 28

Views: 12831

Answers (2)

alextk
alextk

Reputation: 6239

My guess is that it helps you preventing publishing dummy/old package by doing extra check on package that are set to be published. You should add (at the root of the document, for example after the version field):

publish_to: none

to your pubspec.yaml

Upvotes: 57

xbadal
xbadal

Reputation: 1375

Adding your SSH in git account will solve your problem. visit Here to know how to generate SSH key

Upvotes: 1

Related Questions