代码之家  ›  专栏  ›  技术社区  ›  Mahdi-Malv

警告:你的pubspec。yaml包含一个“作者”部分,不再使用,可能会被删除

  •  1
  • Mahdi-Malv  · 技术社区  · 6 年前

    我想出版我的图书馆,和以前一样,我已经包括了 author 名单上的名字 pubspec 文件
    跑步 flutter pub pub publish --dry-run 给我以下警告:

    Warning: Your pubspec.yaml includes an "author" section which is no longer used and may be removed
    

    我将以我的作者价值授权我使用电子邮件进行发布。如果我删除它,我将如何授权。

    我很高兴能了解更多这方面的情况。

    1 回复  |  直到 6 年前
        1
  •  6
  •   Mahdi-Malv    6 年前

    而不是使用 author authors 为了验证自己,新的方法是让自己成为 验证发布者 .

    根据 documents :

    要创建经过验证的发布服务器,请执行以下步骤:

    • pub.dev .

    • 登录酒吧。dev使用谷歌账号。

    • 在右上角的“用户”菜单中,选择“创建发布者”。

    • 输入要与发布者关联的域名 (例如,dart.dev),然后单击CreatePublisher。

    • 在确认对话框中,选择确定。

    • 如果出现提示,请完成验证流程,这将打开 Google Search Console .

    • 添加DNS记录时,搜索可能需要几个小时 控制台反映了这些变化。验证流程完成后, 返回到步骤4。

        2
  •  4
  •   Rémi Rousselet    6 年前

    你现在应该使用 authors 而不是 author :

    name: my_package
    authors:
      - me@mail.com
      - another_author@mail.com
    ...