Newer Version Available

This content describes an older version of this product. View Latest

Second-Generation Packaging

Second-generation packaging, also called 2GP, lets you create packages in a source-driven development environment. You can use 2GP to create and deploy packages in your own Salesforce org or to develop and distribute packages to your customers.
With second-generation packaging, you can take advantage of these helpful features.
  • The Salesforce command-line interface lets you work efficiently with your second-generation packages, scratch orgs, and an integrated development cycle.
  • Options for enterprise customers to organize and deploy metadata to production orgs.
  • Multiple packages per namespace, so you can better organize your source and easily share Apex code. You can use public Apex classes across packages rather than global Apex classes.
  • Feature branch development and testing.
  • Fully API-driven functionality.
  • Packages that are source-driven, not org-based.
  • Ease of development and distribution of dependent packages.