<ceylon-doc>
Ant task
Usage
Note: You must declare the tasks with a <typedef>
.
To compile the documentation for module com.example.foo
whose
source code is in the src
directory to a module repository in
the build
directory:
<target name="documentation" depends="ceylon-ant-taskdefs">
<ceylon-doc src="src" out="build">
<module name="com.example.foo"/>
</ceylon-doc>
</target>
To compile the documentation for version 1.1 of module com.example.foo
whose source code is in the build
directory to a module repository in
the build
directory:
<target name="documentation" depends="ceylon-ant-taskdefs">
<ceylon-doc out="build">
<module name="com.example.foo" version="1.1"/>
</ceylon-doc>
</target>
Description
Generates Ceylon API documentation from Ceylon source files
The <ceylon-doc>
ant task wraps the ceylon doc
command.
Attributes
Attribute | Description | Required |
---|---|---|
cacheRep |
Equivalent to the |
No |
config |
Equivalent to the |
No |
cwd |
Equivalent to the |
No |
doc |
Equivalent to the |
No |
encoding |
Equivalent to the |
No |
errorProperty |
The ant property to set to true in the event of an error |
No |
executable |
The location of the ceylon executable script. |
No |
failOnError |
Whether an error in executing this task should fail the ant build |
No |
fork |
Whether the task should be run in a separate VM (default: |
No |
ignoreBrokenLink |
Equivalent to the |
No |
ignoreMissingDoc |
Equivalent to the |
No |
ignoreMissingThrows |
Equivalent to the |
No |
includeNonShared |
No | |
includeSourceCode |
Equivalent to the |
No |
inheritAll |
Whether a task should inherit environment and properties. Only applies when |
No |
noDefaultRepositories |
Equivalent to the |
No |
noMtimeCheck |
When |
No |
offline |
Equivalent to the |
No |
out |
Equivalent to the |
No |
overrides |
Equivalent to the |
No |
pass |
Equivalent to the |
No |
resultProperty |
The ant property to set to the Ceylon program exit code |
No |
stacktraces |
Equivalent to the |
No |
sysRep |
Equivalent to the |
No |
user |
Equivalent to the |
No |
verbose |
Equivalent to the |
No |
Nested elements
<define>
A <define>
element is used to set system properties for the ant task being executed.
Equivalent to the --define
command line option.
Set a system property
The value for the system property can either be passed as a value
attribute:
<define key="org.example.helloworld.greeting" value="Hi"/>
or it can be the text between the begin and end tags:
<define key="org.example.helloworld.greeting">Hi</define>
Alternatively, it is posible to dispense with the attributes and use the syntax
<define>org.example.helloworld.greeting=Hi</define>
Element | Description | Required |
---|---|---|
key |
The property to be defined |
No |
value |
The value of the define |
No |
<link>
Specifies a URL or path to a module repository containing external API documentation.
Equivalent to the --link
command line option.
The URL or path of a module repository containing documentation for external dependencies.
The URL must use one of the supported protocols (http://, https:// or file://) or be a path to a directory. The argument can start with a module name prefix, separated from the URL by a =
character, so that only those external modules whose name begins with the prefix will be linked using that URL.
Can be specified multiple times.
Examples:
--link https://modules.ceylon-lang.org/repo/1
--link ceylon.math=https://modules.ceylon-lang.org/repo/1
--link com.example=http://example.com/ceylondoc/
Element | Description | Required |
---|---|---|
pattern |
A module name prefix limiting the applicability of the URL to modules whose name matches the prefix. |
No |
refid |
A reference to a |
No |
url |
A URL or path of a module repository containing documentation for external dependencies. |
No |
<linkset>
Specifies a set of external link URLs.
Equivalent to the --link
command line option.
May contain <link>
and/or <linkset>
nested elements. Alternatively make reference to a linkset defined elsewhere using the refid
attribute.
Element | Description | Required |
---|---|---|
refid |
A reference to a |
No |
<module>
A module to document.
A <module>
element must specify a name, and may specify a version. If the relevant ceylon task don't require a version it will be ignored.
Element | Description | Required |
---|---|---|
name |
The module name. |
Yes |
version |
The module version. Whether this is required depends on the task |
No |
<moduleset>
A set of modules to document.
A <moduleset>
containing a number of <sourcemodule>
s and/or <module>
subelements. It can be defined at the top level and then used by reference using the refid
attribute, so you don't have to repeat the same list of modules all the time.
Element | Description | Required |
---|---|---|
refid |
A reference to a |
No |
<rep>
A module repository containing dependencies. Can be specified multiple times. Defaults to <rep url="./modules"/>
.
Element | Description | Required |
---|---|---|
url |
The URL or path of the module repository. |
Yes, unless a `refid` is given |
refid |
A reference to a |
No |
<reposet>
A set of module repositories containing dependencies. Can be specified multiple times. Default to modules
.
A <reposet>
element contains a number of <repo>
and/or <reposet>
elements. It can be defined at the top level, and then used by reference using the refid
attribute so you don't have to repeat the same list of repositories all the time.
Element | Description | Required |
---|---|---|
refid |
A reference to a |
No |
<source>
A <source>
path, specifying a source path, for example:
<source>my/src/directory</source>
or
<source value="/src/directory"/>
Equivalent to the --src
command line option.
A directory containing Ceylon and/or Java source code (default: ./source
)
Element | Description | Required |
---|---|---|
value |
The source path. |
No |
<sourceModules>
A set of modules to document.
Includes all the ceylon modules in a given source directory, as specified by the dir
attribute. This saves you having to explicitly list all the modules to be compiled, you can instead just compile all the modules in a given directory.
Element | Description | Required |
---|---|---|
dir |
The directory containing module source files |
No |
<src>
Synonymous with <source>
Element | Description | Required |
---|---|---|
value |
The source path. |
No |