-
-
Notifications
You must be signed in to change notification settings - Fork 10
PackageDefinition
A package defines a library and it's dependencies.
- version
- location
- dependencies
- Android manifest additions
- iOS Info Additions and Entitlements
- required configuration variables to be inserted into the above
A package is a single package file comprised of a series of files in a structure with a main "package definition" file.
A package is a zip file containing the following structure:
|____ package.json
|____ README.md
|____ CHANGELOG.md
|____ swc /
|____ [ANY SWC LIBRARIES CONTAINED IN THIS PACKAGE]
|____ src /
|____ [ANY AS3 SOURCE CONTAINED IN THIS PACKAGE]
|____ ane /
|____ [ANY EXTENSIONS CONTAINED IN THIS PACKAGE]
All of the content is optional, except the package definition json (package.json
), the ANE/SWC/AS3 file(s) associated with this package and a README.md
file which will be displayed on your packages information page in the repository.
A package should contain only one of the directories: swc
, src
, ane
which must correspond with the type
set in the package.json
.
We highly recommend including a CHANGELOG.md
file with a list detailing the changes in your package. All of the content packaged will be included in a build so don't include the source for a swc alongside the swc or you will end up with duplicate definitions. (You should create two different packages if you wish to create a source and compiled version of your package).
A file(s) containing information about the library.
package.json
:
{
"id": "com.package.example",
"name": "Example package definition",
"url": "https://example.com/package/",
"docUrl": "https://example.com/package/asdocs",
"description": "An example of a package definition",
"type": "swc",
"version": "1.0.0",
"sourceUrl": "https://github.com/ORG/REPO/releases/download/v1.0.0/com.package.example_1.0.0.airpackage",
"publishedAt": "2021-05-17T00:00:00.000Z",
"status": "release",
"purchaseUrl": "",
"license": {
"type": "MIT",
"url": "https://example.com/package/license",
"public": true
},
"dependencies": [
{
"id": "com.package.dependency.a",
"version": "2.4.0"
},
{
"id": "com.package.dependency.b",
"version": "3.1.0"
},
"com.package.dependency.c:4.0.0"
],
"parameters": [
"packageParam",
"requiredParam:required",
{
"name": "paramName",
"required": "true",
"defaultValue": "someValue",
"description": "A description of the value, can contain links to documentation: https://docs.example.com/package/paramName"
}
],
"tags": ["android", "ios"]
}
Background
Client
Development