Skip to content

Commit

Permalink
Merge pull request #1170 from vmdef/thirdpartylibsfilelocation
Browse files Browse the repository at this point in the history
Update thirdpartylibraries.md
  • Loading branch information
andrewnicols authored Nov 4, 2024
2 parents e1eb430 + 3761801 commit 88c0bab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions general/community/plugincontribution/thirdpartylibraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ A third party library refers to any library where the latest version of the code

## Instructions

The process for including a third party library is the same for core code as it is for a plugin - there are a number of steps to follow.
The process for including a third-party library is the same for both core code and plugins, except for the location of the `thirdpartylibs.xml` file. For core code, this file is located in the lib folder, while for plugins, it is found in the root of the plugins folder. There are several steps to follow.

1. Check the license to make sure the library uses a GPLv3 compatible license - see the [list of compatible licenses](https://www.gnu.org/licenses/license-list.en.html). If a library is not compatible with GPLv3 then it cannot be distributed together with the plugin in one ZIP package and hosted in the Moodle Plugins directory.
1. Check the library is not already shipped by core - we don't want multiple versions of the same library.
1. Download the latest stable release of the code.
1. Perform any build steps required to get a distributable version of the library. This will vary depending on the library - but an example is running less to generate minified css files.
1. Put that library into a sub folder in your plugin. It is best to NOT use version numbers in the foldername ("jquery" not "jquery-1.7.3").
1. Create or update the `lib/thirdpartylibs.xml` file for your plugin, according to the format described in the [documentation](/docs/apis/commonfiles#thirdpartylibsxml).
1. Create or update the `thirdpartylibs.xml` file for your plugin, according to the format described in the [documentation](/docs/apis/commonfiles#thirdpartylibsxml).
1. Create a [`readme_moodle.txt`](/docs/apis/commonfiles#readme_moodletxt) file in the new third party library folder containing detailed instructions on how to complete steps 3-6 above. This should list download urls, build instructions etc.
1. Note any creation, update or deletion of third party libraries in your plugins `upgrade.txt` or [CHANGES](/docs/apis/commonfiles#changes).
1. Run `grunt ignorefiles` to regenerate ignored files path
Expand Down

0 comments on commit 88c0bab

Please sign in to comment.