Any number of these fields can be present, each specifying a version to automatically build from source. The value is a comma-separated list. For example:
‘Build:1.2,12’
The above specifies to build version 1.2, which has a version code of 12.
The commit= parameter specifies the tag, commit or revision number from
which to build it in the source repository. It is the only mandatory flag,
which in this case could for example be commit=v1.2.
In addition to the three, always required, parameters described above, further parameters can be added (in name=value format) to apply further configuration to the build. These are (roughly in order of application):
disable=<message>The purpose of this feature is to allow non-buildable releases (e.g. the source
is not published) to be flagged, so the scripts don't generate repeated
messages about them. (And also to record the information for review later).
If an apk has already been built, disabling causes it to be deleted once
fdroid update is run; this is the procedure if ever a version has to
be replaced.
subdir=<path>submodules=yesgit submodule
update --init --recursive to be executed after the source is cloned.
Submodules are reset and cleaned like the main app repository itself before
each build.
init=xxxxYou can use $$SDK$$, $$NDK$$ and $$MVN3$$ to substitute the paths to the
android SDK and NDK directories, and maven 3 executable respectively.
oldsdkloc=yestarget=<target>In the case of an Ant project, it modifies project.properties of the app and
possibly sub-projects. This is likely to cause the whole build.xml to be
rewritten, which is fine if it's a 'standard' android file or doesn't already
exist, but not a good idea if it's heavily customised.
update=<auto/dirs>Default value is 'auto', which recursively uses the paths in
project.properties to find all the subprojects to update.
Otherwise, the value can be a comma-separated list of directories in which to
run 'android update' relative to the application directory.
encoding=xxxxforceversion=yesThis is useful for cases when upstream repo failed to update it for
specific tag; to build an arbitrary revision; to make it apparent that
the version differs significantly from upstream; or to make it apparent
which architecture or platform the apk is designed to run on.
forcevercode=yesrm=relpath1,relpath2,...Multiple files/directories can be specified by separating them with ','.
Directories will be recursively deleted.
extlibs=a,b,...build/extlib library, which will be placed in the libs directory
of the project.
srclibs=[n:]a@r,[n:]b@r1,...For Ant projects, you can optionally append a number with a colon at the
beginning of a srclib item to automatically place it in project.properties as
a library under the specified number. For example, if you specify
1:somelib@1.0, f-droid will automatically do the equivalent of the
legacy practice prebuild=echo "android.library.reference.1=$$somelib$$"
>> project.properties.
Each srclib has a metadata file under srclibs/ in the repository directory,
and the source code is stored in build/srclib/.
Repo Type: and Repo: are specified in the same way as for apps; Subdir: can be
a comma separated list, for when directories are renamed by upstream; Update
Project: updates the projects in the working directory and one level down;
Prepare: can be used for any kind of preparation: in particular if you need to
update the project with a particular target. You can then also use $$name$$ in
the init/prebuild/build command to substitute the relative path to the library
directory, but it could need tweaking if you've changed into another directory.
patch=xprebuild=xxxxThe command runs using bash.
Note that nothing should be built during this prebuild phase - scanning of the code and building of the source tarball, for example, take place after this. For custom actions that actually build things or produce binaries, use 'build' instead.
You can use $$name$$ to substitute the path to a referenced srclib - see
the srclib directory for details of this.
You can use $$SDK$$, $$NDK$$ and $$MVN3$$ to substitute the paths to the
android SDK and NDK directories, and Maven 3 executable respectively e.g.
for when you need to run android update project explicitly.
scanignore=path1,path2,...When scanning the source tree for problems, matching files whose relative
paths start with any of the paths given here are ignored.
scandelete=path1,path2,...build=xxxxAny building that takes place before build= will be ignored, as either Ant, mvn or gradle will be executed to clean the build environment right before build= (or the final build) is run.
You can use $$SDK$$, $$NDK$$ and $$MVN3$$ to substitute the paths to the
android SDK and NDK directories, and Maven 3 executable respectively.
buildjni=[yes|no|<dir list>]The build and scan processes will complain (refuse to build) if this
parameter is not defined, but there is a jni directory present.
If the native code is being built by other means like a Gradle task, you
can specify no here to avoid that. However, if the native code is
actually not required or used, remove the directory instead (using
rm=jni for example). Using buildjni=no when the jni code
isn't used nor built will result in an error saying that native
libraries were expected in the resulting package.
gradle=<flavour>maven=yes[@<dir>]preassemble=<task1> <task2>antcommand=xxxoutput=path/to/output.apknovcheck=yesAnother example, using extra parameters:
‘Build Version:1.09.03,10903,45,subdir=Timeriffic,oldsdkloc=yes’