fdroid-data/schemas/metadata.json

843 lines
26 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://f-droid.org/metadata.yml",
"title": "F-Droid Data metadata",
"description": "For every app on F-Droid a metadata file in the format of <application-id>.yml have to be provided, in order to build an app or check or if it has been updated. See https://f-droid.org/docs/Build_Metadata_Reference for a complete reference of a metadata file.",
"type": "object",
"properties": {
"AntiFeatures": {
"description": "Any number of anti-features the application has.",
"$ref": "#/definitions/anti_features"
},
"Categories": {
"description": "Any number of categories for the application to be placed in.",
"type": "array",
"items": {
"type": "string",
"enum": [
"Connectivity",
"Development",
"Games",
"Graphics",
"Internet",
"Money",
"Multimedia",
"Navigation",
"Phone & SMS",
"Reading",
"Science & Education",
"Security",
"Sports & Health",
"System",
"Theming",
"Time",
"Writing"
]
},
"uniqueItems": true,
"minItems": 1
},
"License": {
"description": "",
"type": "string",
"enum": [
"0BSD",
"AAL",
"AFL-1.1",
"AFL-1.2",
"AFL-2.0",
"AFL-2.1",
"AFL-3.0",
"AGPL-3.0-only",
"AGPL-3.0-or-later",
"APL-1.0",
"APSL-1.0",
"APSL-1.1",
"APSL-1.2",
"APSL-2.0",
"Apache-1.0",
"Apache-1.1",
"Apache-2.0",
"Artistic-1.0",
"Artistic-1.0-Perl",
"Artistic-1.0-cl8",
"Artistic-2.0",
"Beerware",
"BSD-1-Clause",
"BSD-2-Clause",
"BSD-2-Clause-FreeBSD",
"BSD-2-Clause-Patent",
"BSD-3-Clause",
"BSD-3-Clause-Clear",
"BSD-3-Clause-LBNL",
"BSD-4-Clause",
"BSL-1.0",
"BitTorrent-1.1",
"CAL-1.0",
"CAL-1.0-Combined-Work-Exception",
"CATOSL-1.1",
"CC-BY-4.0",
"CC-BY-SA-4.0",
"CC0-1.0",
"CDDL-1.0",
"CECILL-2.0",
"CECILL-2.1",
"CECILL-B",
"CECILL-C",
"CNRI-Python",
"CPAL-1.0",
"CPL-1.0",
"CUA-OPL-1.0",
"ClArtistic",
"Condor-1.1",
"ECL-1.0",
"ECL-2.0",
"EFL-1.0",
"EFL-2.0",
"EPL-1.0",
"EPL-2.0",
"EUDatagrid",
"EUPL-1.1",
"EUPL-1.2",
"Entessa",
"FSFAP",
"FTL",
"Fair",
"Frameworx-1.0",
"GFDL-1.1-only",
"GFDL-1.1-or-later",
"GFDL-1.2-only",
"GFDL-1.2-or-later",
"GFDL-1.3-only",
"GFDL-1.3-or-later",
"GPL-2.0-only",
"GPL-2.0-or-later",
"GPL-3.0-only",
"GPL-3.0-or-later",
"HPND",
"IJG",
"IPA",
"IPL-1.0",
"ISC",
"Imlib2",
"Intel",
"LGPL-2.0-only",
"LGPL-2.0-or-later",
"LGPL-2.1-only",
"LGPL-2.1-or-later",
"LGPL-3.0-only",
"LGPL-3.0-or-later",
"LPL-1.0",
"LPL-1.02",
"LPPL-1.2",
"LPPL-1.3a",
"LPPL-1.3c",
"LiLiQ-P-1.1",
"LiLiQ-R-1.1",
"LiLiQ-Rplus-1.1",
"MIT",
"MIT-0",
"MIT-CMU",
"MPL-1.0",
"MPL-1.1",
"MPL-2.0",
"MPL-2.0-no-copyleft-exception",
"MS-PL",
"MS-RL",
"MirOS",
"Motosoto",
"MulanPSL-2.0",
"Multics",
"NASA-1.3",
"NCSA",
"NGPL",
"NOSL",
"NPL-1.0",
"NPL-1.1",
"NPOSL-3.0",
"NTP",
"Naumen",
"Nokia",
"OCLC-2.0",
"ODbL-1.0",
"OFL-1.0",
"OFL-1.1",
"OFL-1.1-RFN",
"OFL-1.1-no-RFN",
"OGTSL",
"OLDAP-2.3",
"OLDAP-2.7",
"OLDAP-2.8",
"OSET-PL-2.1",
"OSL-1.0",
"OSL-1.1",
"OSL-2.0",
"OSL-2.1",
"OSL-3.0",
"OpenSSL",
"PHP-3.0",
"PHP-3.01",
"PostgreSQL",
"Python-2.0",
"QPL-1.0",
"RPL-1.1",
"RPL-1.5",
"RPSL-1.0",
"RSCPL",
"Ruby",
"SGI-B-2.0",
"SISSL",
"SMLNJ",
"SPL-1.0",
"SimPL-2.0",
"Sleepycat",
"UCL-1.0",
"UPL-1.0",
"Unicode-DFS-2016",
"Unlicense",
"VSL-1.0",
"Vim",
"W3C",
"WTFPL",
"Watcom-1.0",
"X11",
"XFree86-1.1",
"Xnet",
"XSkat",
"YPL-1.1",
"ZPL-2.0",
"ZPL-2.1",
"Zend-2.0",
"Zimbra-1.3",
"Zlib",
"gnuplot",
"iMatix",
"xinetd",
"PublicDomain"
]
},
"AuthorName": {
"description": "The name of the author, either full, abbreviated or pseudonym.",
"type": "string"
},
"AuthorEmail": {
"description": "The e-mail address of the author(s).",
"type": "string",
"pattern": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"
},
"AuthorWebSite": {
"description": "The website url of the author(s).",
"$ref": "#/definitions/url"
},
"WebSite": {
"description": "The URL for the application's web site.",
"$ref": "#/definitions/url"
},
"SourceCode": {
"description": "The URL to view or obtain the application's source code. This should be something human-friendly.",
"$ref": "#/definitions/url"
},
"IssueTracker": {
"description": "The URL for the application's issue tracker.",
"$ref": "#/definitions/url"
},
"Translation": {
"description": "The URL for the application's translation portal or at least a guide.",
"$ref": "#/definitions/url"
},
"Changelog": {
"description": "The URL for the application's changelog.",
"$ref": "#/definitions/url"
},
"Donate": {
"description": "The URL to donate to the project.",
"$ref": "#/definitions/url"
},
"FlattrID": {
"description": "The project's Flattr (https://flattr.com) ID.",
"type": "string",
"pattern": "^[0-9a-z]+$"
},
"Liberapay": {
"description": "The project's Liberapay (https://liberapay.com) user or group name.",
"type": "string"
},
"OpenCollective": {
"description": "The project's OpenCollective (https://opencollective.com) user or group name.",
"type": "string"
},
"Bitcoin": {
"description": "A Bitcoin address for donating to the project.",
"type": "string",
"pattern": "^(bc1|[13])[a-zA-HJ-NP-Z0-9]{25,39}$"
},
"Litecoin": {
"description": "A Litecoin address for donating to the project.",
"type": "string",
"pattern": "^([LM3][a-km-zA-HJ-NP-Z1-9]{26,33}|ltc1[a-km-z0-9]{39})$"
},
"Name": {
"description": "The title of the application, with optional descriptive phrase.",
"type": "string"
},
"AutoName": {
"description": "The name of the application as can best be retrieved from the source code.",
"type": "string"
},
"Summary": {
"description": "DEPRECATED. A brief summary of what the application is. Should rather be provided via Fastlane.",
"type": "string",
"maxLength": 80
},
"Description": {
"description": "DEPRECATED. A full description of the application, relevant to the latest version. Should rather be provided via Fastlane.",
"type": "string",
"maxLength": 4000
},
"AllowedAPKSigningKeys": {
"description": "The lowercase hex value of the SHA-256 fingerprint of the signing certificate of an app. If an APK of that app is not signed by one of these keys, it will not be included in the repository.",
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
}
}
]
},
"MaintainerNotes": {
"description": "This is a multi-line field using the same rules and syntax as the description. It's used to record notes for F-Droid maintainers to assist in maintaining and updating the application in the repository.",
"type": "string",
"maxLength": 4000
},
"RepoType": {
"description": "The type of repository - for automatic building from source.",
"type": "string",
"enum": [
"git",
"svn",
"git-svn",
"hg",
"bzr",
"srclib"
]
},
"Repo": {
"description": "The repository location. Usually a git: or svn: URL, for example.",
"type": "string"
},
"Binaries": {
"description": "The location of binaries used in verification process.",
"$ref": "#/definitions/url"
},
"Builds": {
"description": "Any number of sub-entries can be present, each specifying a version to automatically build from source.",
"type": "array",
"items": {
"type": "object",
"properties": {
"versionName": {
"description": "Specifies to build version xxx, which has a version code of yyy.",
"type": "string"
},
"versionCode": {
"description": "Specifies to build version xxx, which has a version code of yyy.",
"type": "integer"
},
"commit": {
"description": "The commit parameter specifies the tag, commit or revision number from which to build it in the source repository.",
"type": "string"
},
"disable": {
"description": "Disables this build, giving a reason why.",
"type": "string"
},
"subdir": {
"description": "Specifies to build from a subdirectory of the checked out source code. Normally this directory is changed to before building.",
"type": "string"
},
"submodules": {
"description": "Use if the project (git only) has submodules - causes git submodule update --init --recursive to be executed after the source is cloned.",
"const": true
},
"sudo": {
"description": "Specifies a script to be run using sudo bash -x -c \"xxxx\" in the Buildserver VM guest. This script is run with full root privileges, but the state will be reset after each build.",
"$ref": "#/definitions/string_list"
},
"timeout": {
"description": "Time limit for this build (in seconds). After time is up, Buildserver VM is forcefully terminated. The default is 7200 (2 hours); 0 means no limit.",
"type": "integer"
},
"init": {
"description": "Like 'prebuild', but runs on the source code BEFORE any other processing takes place.",
"$ref": "#/definitions/string_list"
},
"oldsdkloc": {
"description": "The sdk location in the repo is in an old format, or the build.xml is expecting such. The 'new' format is sdk.dir while the VERY OLD format is sdk-location.",
"const": true
},
"target": {
"description": "Specifies a particular SDK target for compilation, overriding the value defined in the code by upstream. This has different effects depending on what build system used — this flag currently affects Ant, Maven and Gradle projects only.",
"type": "string"
},
"androidupdate": {
"description": "By default, 'android update' is used in Ant builds to generate or update the project and all its referenced projects. Specifying update=no bypasses that. Note that this is useless in builds that don't use Ant.",
"anyOf": [
{
"const": "auto"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"encoding": {
"description": "Adds a java.encoding property to local.properties with the given value. Generally the value will be 'utf-8'.",
"type": "string"
},
"forceversion": {
"description": "If specified, the package version in AndroidManifest.xml is replaced with the version name for the build as specified in the metadata.",
"const": true
},
"forcevercode": {
"description": "If specified, the package version code in the AndroidManifest.xml is replaced with the version code for the build. See also forceversion.",
"const": true
},
"rm": {
"description": "Specifies the relative paths of files or directories to delete before the build is done.",
"$ref": "#/definitions/string_list"
},
"extlibs": {
"description": "List of external libraries (jar files) from the build/extlib library, which will be placed in the libs directory of the project.",
"$ref": "#/definitions/string_list"
},
"srclibs": {
"description": "Comma-separated list of source libraries or Android projects. Each item is of the form name@rev where name is the predefined source library name and rev is the revision or tag to use in the respective source control.",
"$ref": "#/definitions/string_list"
},
"patch": {
"description": "Apply patch(es). 'x' names one (or more - comma-separated) files within a directory below the metadata, with the same name as the metadata file but without the extension. Each of these patches is applied to the code in turn.",
"$ref": "#/definitions/string_list"
},
"prebuild": {
"description": "Specifies a shell command (or commands - chain with &&) to run before the build takes place.",
"$ref": "#/definitions/string_list"
},
"scanignore": {
"description": "Enables one or more files/paths to be excluded from the scan process. This should only be used where there is a very good reason, and probably accompanied by a comment explaining why it is necessary.",
"$ref": "#/definitions/string_list"
},
"scandelete": {
"description": "When running the scan process, any files that trigger errors - like binaries - will be removed. It acts just like scanignore, but instead of ignoring the files, it removes them.",
"$ref": "#/definitions/string_list"
},
"build": {
"description": "As for 'prebuild', but runs during the actual build phase (but before the main Ant/Maven build). Use this only for actions that do actual building. Any preparation of the source code should be done using 'init' or 'prebuild'.",
"$ref": "#/definitions/string_list"
},
"postbuild": {
"description": "Specifies a single or a list of shell commands to run after the build takes place.",
"$ref": "#/definitions/string_list"
},
"buildjni": {
"description": "Enables building of native code via the ndk-build script before doing the main Ant build.",
"anyOf": [
{
"type": "string",
"enum": [
"yes",
"no"
]
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"ndk": {
"description": "Version of the NDK to use in this build.",
"type": "string"
},
"gradle": {
"description": "Build with Gradle instead of Ant, specifying what flavours to use. Flavours are case sensitive since the path to the output APK is as well.",
"anyOf": [
{
"type": "array",
"items": {
"const": "yes"
},
"maxItems": 1
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"maven": {
"description": "Build with Maven instead of Ant. An extra @<dir> tells F-Droid to run Maven inside that relative subdirectory.",
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"enum": [
"yes",
"yes@"
]
}
]
},
"preassemble": {
"description": "List of Gradle tasks to be run before the assemble task in a Gradle project build.",
"$ref": "#/definitions/string_list"
},
"gradleprops": {
"description": "List of Gradle properties to pass via the command line to Gradle. A property can be of the form foo or of the form key=value.",
"$ref": "#/definitions/string_list"
},
"antcommands": {
"description": "Specify an alternate set of Ant commands (target) instead of the default 'release'. It can't be given any flags, such as the path to a build.xml.",
"$ref": "#/definitions/string_list"
},
"output": {
"description": "Specify a glob path where the resulting unsigned release APK from the build should be.",
"type": "string"
},
"binary": {
"description": "The location of binaries used in verification process.",
"$ref": "#/definitions/url"
},
"novcheck": {
"description": "Don't check that the version name and code in the resulting APK are correct by looking at the build output - assume the metadata is correct.",
"const": true
},
"antifeatures": {
"description": "List of Anti-Features for this specific build. They are described in AntiFeatures.",
"$ref": "#/definitions/anti_features"
}
},
"required": [
"versionName",
"versionCode"
],
"additionalProperties": false
},
"uniqueItems": true,
"minItems": 1
},
"Disabled": {
"description": "If this field is present, the application does not get put into the public index. The value should be a description of why the application is disabled.",
"type": "string"
},
"RequiresRoot": {
"description": "Whether the application requires root privileges to be usable.",
"type": "boolean"
},
"ArchivePolicy": {
"description": "This determines the number of versions to keep. The older versions of the app are moved to the archive repo, if one is configured. Defaults to 3.",
"type": "integer"
},
"AutoUpdateMode": {
"description": "This determines the method used for auto-generating new builds when new releases are available - in other words, adding a new Build Version line to the metadata.",
"type": "string",
"anyOf": [
{
"enum": [
"None",
"Version"
]
},
{
"pattern": "^Version( \\+.+)? [^+].+"
}
]
},
"UpdateCheckMode": {
"description": "This determines the method using for determining when new releases are available - in other words, the updating of the CurrentVersion and CurrentVersionCode fields in the metadata by the fdroid checkupdates process.",
"type": "string",
"anyOf": [
{
"enum": [
"None",
"Static",
"HTTP"
]
},
{
"pattern": "^RepoManifest(/.+)?$"
},
{
"pattern": "^Tags( .*)?$"
}
]
},
"VercodeOperation": {
"description": "A list of operations to be applied to the vercode obtained by the defined UpdateCheckMode. %c will be replaced by the actual vercode, and each string will be passed to python's eval function to calculate a version code.",
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true,
"minItems": 1
},
"UpdateCheckIgnore": {
"description": "When checking for updates (via UpdateCheckMode) this can be used to specify a regex which, if matched against the version name, causes that version to be ignored.",
"type": "string"
},
"UpdateCheckName": {
"description": "When checking for updates (via UpdateCheckMode) this can be used to specify the package name to search for. Useful when apps have a static package name but change it programmatically in some app flavors, by e.g. appending “.open” or “.free” at the end of the package name.",
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"enum": [
"Ignore"
]
}
]
},
"UpdateCheckData": {
"description": "Used in conjunction with UpdateCheckMode for certain modes.",
"type": "string"
},
"CurrentVersion": {
"description": "The name of the version that is the recommended release. There may be newer versions of the application than this (e.g. unstable versions), and there will almost certainly be older ones.",
"type": "string"
},
"CurrentVersionCode": {
"description": "The version code corresponding to the CurrentVersion field.",
"type": "integer"
},
"NoSourceSince": {
"description": "In case we are missing the source code for the CurrentVersion reported by Upstream, or that Non-Free elements have been introduced, this defines the first version that began to miss source code.",
"type": "string"
}
},
"required": [
"Categories",
"License",
"Builds"
],
"allOf": [
{
"anyOf": [
{
"required": [
"Repo",
"RepoType",
"SourceCode"
]
},
{
"required": [
"NoSourceSince"
]
}
]
},
{
"if": {
"anyOf": [
{
"properties": {
"ArchivePolicy": {
"const": 0
}
},
"required": [
"ArchivePolicy"
]
},
{
"required": [
"NoSourceSince"
]
}
]
},
"then": {
"properties": {
"UpdateCheckMode": {
"const": "None"
}
}
}
},
{
"if": {
"anyOf": [
{
"required": [
"Binaries"
]
},
{
"properties": {
"Builds": {
"contains": {
"required": [
"binary"
]
}
}
},
"required": [
"Builds"
]
}
]
},
"then": {
"required": [
"AllowedAPKSigningKeys"
]
}
},
{
"if": {
"properties": {
"UpdateCheckMode": {
"pattern": "^Tags"
}
}
},
"then": {
"properties": {
"AutoUpdateMode": {
"type": "string",
"pattern": "^(None|Version( \\+.+)?)$"
}
}
}
},
{
"if": {
"properties": {
"UpdateCheckMode": {
"const": "HTTP"
}
}
},
"then": {
"properties": {
"AutoUpdateMode": {
"type": "string",
"pattern": "^(None|Version .+)$"
}
},
"required": [
"UpdateCheckData"
]
}
},
{
"if": {
"properties": {
"UpdateCheckMode": {
"anyOf": [
{
"enum": [
"None",
"Static"
]
},
{
"pattern": "^RepoManifest(/.+)?$"
}
]
}
}
},
"then": {
"properties": {
"AutoUpdateMode": {
"const": "None"
}
}
}
}
],
"additionalProperties": false,
"definitions": {
"anti_features": {
"$id": "#antifeatures",
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"Ads",
"ApplicationDebuggable",
"KnownVuln",
"NonFreeAdd",
"NonFreeAssets",
"NonFreeDep",
"NonFreeNet",
"NoSourceSince",
"NSFW",
"UpstreamNonFree",
"TetheredNet",
"Tracking"
]
},
"uniqueItems": true,
"minItems": 1
},
{
"type": "object",
"patternProperties": {
"^(Ads|Tracking|ApplicationDebuggable|KnownVuln|NonFreeAdd|NonFreeAssets|NonFreeDep|NonFreeNet|NoSourceSince|NSFW|UpstreamNonFree|Tracking)$": {
"$ref": "#/definitions/localized_string"
}
},
"additionalProperties": false
}
]
},
"string_list": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"localized_string": {
"type": "object",
"patternProperties": {
"^[a-z]{2,3}(-([A-Z][a-zA-Z]+|\\d+|[a-z]+))*$": {
"type": "string"
}
},
"additionalProperties": false
},
"url": {
"type": "string",
"pattern": "^https?://.*$"
}
}
}