Packages are required to have licenses to ensure no violation of Terms of Service occurs when a user uses an asset contained in the package in a certain way (e.g. if an asset can be used commercially.) There are three ways for you to include a license in the package you are creating.
Method 1: License in a Webpage
You can put your license in a webpage and store the URL in the package. In this scenario, when the user installs your package and they click on the “View License” link on the package information screen, they will be taken to the page where the license is located. The good thing about doing this method is that you can update your license anytime you like.
Method 2: License in a Separate File
This is the most common way to store the license information of the package. The license can be in one of the following file formats: *.txt, *.pdf, *.doc, *.docx and *.rtf. The path to the license file is stored on the package itself and when the user installs your package and clicks on the “View License” link on the package information screen, the license file will be opened using the default program.
The catch is that some users won’t be able to open the license file as they might not have the necessary program installed. It is recommended that you use plain *.txt file to prevent this from happening.
Method 3: Plain License Text in the Package
You can also just embed the license itself in the package. When the user installs your package and clicks on the “View License” link on the package information screen, a message box showing the package license will appear. The problem with this method is it only supports plain text so you cannot stylize your text or add web links, etc.