Ceylon distribution
December 7, 2017 ยท View on GitHub
Here you can find out how to build a Ceylon distribution from code.
Distribution layout
bin- Unix/Windows commandscontrib- Sample Ceylon command-line pluginsdoc- Documentation about Ceylon including the spec in HTML and PDF formatlib- Required libraries for the Ceylon commandsrepo- Required bootstrap Ceylon modules (language, tools)samples- Sample Ceylon modulestemplates- Templates for new Ceylon projectsLICENSE-ASL- The Ceylon ASL licenseLICENSE-GPL-CP- The Ceylon GPL/CP licenseREADME.md- This file
Building the distribution
To begin, make sure you have:
- the Java 7 JDK or Java 8 JDK and Ant 1.8+ installed and that both are working
correctly (if you installed Ant using your platform's package manager make
sure it installed the
ant-junit.jaras well, which can be found in a package namedant-junitorant-optionaldepending on your distribution) - Git set up correctly
- created a new directory for the Ceylon project
- opened a terminal and changed to the newly created directory
And now you either set things up for HTTPS access (recommended for most people):
- Clone ceylon:
$ git clone https://github.com/ceylon/ceylon.git
(If you encounter an issue like "fatal: unable to access 'https://github.com/ceylon/ceylon.git/': Failed connect to github.com:443; No error", make sure you've set up your proxy as git config, ie:
$ git config --global http.proxy http://userName:password@proxyServer:port
that should fix it.)
- Go into the newly created
ceylondirectory and build the complete distribution by running:
$ ant clean dist
After this you'll have a newly built distribution in the dist/dist
folder of your current directory. You can run the ceylon command
without any further setup or installation by simply running
$ dist/dist/bin/ceylon
But it's advisable to add the ceylon command to your PATH
environment variable (either by adding the bin folder to your
PATH or by creating a symbolic link to it in an appropriate place
like ~/bin/).
If at any time you want to update the distribution to the latest code from GitHub just run
$ git pull --rebase
$ ant clean dist
NB: The git pull --rebase command assumes that your projects are "clean",
that is you don't have uncommitted changes. If that's not the case
you'll have to manually update those projects or first stash your
changes (using git stash).
After the build finishes the command line tools will be located in
the bin directory.
bin/ceylon- The ceylon tool which provides at least the following subcommands:browse- Open module documentation in the browserclasspath- Print a classpath suitable for passing to Java tools to run a given Ceylon modulecompile- Compile a Ceylon program for the Java backendcompile-js- Compile a Ceylon program for the JavaScript backendconfig- Manage Ceylon configuration filescopy- Copy modules from one module repository to anotherdoc- Document a Ceylon programhelp- Display help about another toolinfo- Print information about modules in repositoriesimport-jar- Import a Java.jarfile into a Ceylon module repositorynew- Generate a new Ceylon projectplugin- Package or install command-line pluginsrun- Run a Ceylon program on the Java VMrun-js- Run a Ceylon program on node.js (JavaScript)src- Fetch source archives from a repository and extract themtest- Test a Ceylon program on the Java VMtest-js- Test a Ceylon program on node.js (JavaScript)version- Show and update version numbers in module descriptorswar- Generate a WAR file from a compiled.carfile
The API documentation for the language module ceylon.language may
be found here:
repo/ceylon/language/1.2.3/module-doc/api
Running the sample programs
To compile and run the samples, read the README.md contained in
the samples sub folder for instructions.
Tool usage
To see a list of command line options for a particular subcommand,
use the help subcommand. For example, to get help on the compile
tool:
ceylon help compile
Setting up Eclipse
See README.eclipse for the instructions in setting up your Eclipse environment for Ceylon development.
Ant tasks for Ceylon
We include support for Ceylon ant tasks which are documented at http://ceylon-lang.org/documentation/1.2/reference/tool/ant/.
To run the "hello world" program using ant, type:
cd samples/helloworld
ant
Repository
The content of this code repository, available here on GitHub,
is released under the ASL v2.0 as provided in the LICENSE-ASL file
that accompanied this code.
By submitting a "pull request" or otherwise contributing to this repository, you agree to license your contribution under the license mentioned above.