Build files
Every project has a build.markup.code at its top. It says what the project builds, names it, and lists the libraries
it depends on. This is a program's, as New Project writes it with the Raspberry Pi library chosen:
(IsolateAssemblyBuild
name={"robot"}
group={"com.me"}
version={"0.1.0"}
(+dependencies : RepositoryDependency coordinate={"com.grandtheorem:raspberry-pi:0.1.0"} /)
/IsolateAssemblyBuild)
A build file is markup: a tag in parentheses, with attributes, and tags inside it. Every attribute's value is a string
in braces, name={"robot"}.
What it builds
The outer tag says what the project makes:
IsolateAssemblyBuildbuilds a program, which runs as an isolate.LibraryAssemblyBuildbuilds a library, for other projects to use.
(LibraryAssemblyBuild
name={"sensors"}
group={"com.me"}
version={"0.1.0"}
/LibraryAssemblyBuild)
Naming it
name,groupandversionare required. Together they're the project's coordinate,com.me:robot:0.1.0, which is how a library is found and named.versionis a semantic version: three numbers, such as0.1.0.descriptionis optional.
Dependencies
Each dependency is a +dependencies tag. Four kinds say where the library comes from:
RepositoryDependency, withcoordinate: from the library repository, by its coordinate.GitDependency, withurl, at most one ofbranch,tagorcommit, and an optionalpath: from a Git repository, built from source.ProjectDependency, withpath: another project on your computer, built from source.FileDependency, withpath: a library file that's already built.
You rarely write these by hand: Tools | Nylon | Add Nylon Library… writes the line for you. Libraries has the details.
Modules
A project has one module, main, at src/main, unless the build file names its modules itself:
(IsolateAssemblyBuild
name={"robot"}
group={"com.me"}
version={"0.1.0"}
(+modules let main : IsolateAssemblyModule /)
/IsolateAssemblyBuild)
A module's code is at src/<name>/code, or at the folder its path attribute names. In a library, a module is a
LibraryAssemblyModule.