Last updated June 18, 2015.
This is the policy for 3rd party code libraries in Drupal's contribution repositories.
In general 3rd party libraries are forbidden, so do not commit any. Instead, document for your users how to find and install the library themselves.
Exceptions can be made if the 3rd party library:
- had to be modified to work with Drupal, and the modifications were not accepted by the original author;
- is generally difficult to find, or the specific version needed is hard to find;
- is no longer maintained by the original author.
Any of the above exceptions needs approval by Drupal Licensing Working Group (LWG). Exception requests should be posted in the LWG's issue queue with the component "Exception Request". (Upfront: 90% of all exception requests are moot. Only ask for an exception if it is really required.)
For any exception to be made, the 3rd party library MUST be licensed under GPLv2+ or have a permissive license that allows it to be re-licensed under the GPLv2+.
This policy does not apply to original code written by a project maintainer. For example, if you write an integration library to connect a Drupal module to another API, you may include it in a repository (licensed under the GPLv2+), since this will be the original version of the library. The same policy applies to third party content, including media files (fonts, images, videos and sound) and text. Please note that the current Drupal Git Repository Usage policy only allows assets (i.e. data) under GNU/GPL version 2 and later. Specifically:
All files checked into the repository (code and assets) must be licensed under GPL version 2 and later.
Third party assets can not be part of a project's repository unless the following conditions are met:
An explicit permission from its rights-holder (permission statement must be included in README.txt) to re-license the asset under GPLv2+.
A free and permissive public license that clearly permits reuse and distribution of the asset as a mere aggregate [we need a whitelist of permitted licenses].
A status of being in the Public domain.
Maintainers who violate this policy or refuse to correct violations brought to their attention may have their project unpublished or Git access revoked. For more discussion see: http://drupal.org/node/418844. Related: http://drupal.org/node/66113.