Skip to content

Commit

Permalink
Project setup
Browse files Browse the repository at this point in the history
  • Loading branch information
quintesse committed Apr 11, 2012
0 parents commit 42b2cdb
Show file tree
Hide file tree
Showing 9 changed files with 527 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="test-src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/build/
/target/
/modules/
.settings/
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ceylon-common</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
347 changes: 347 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

Ceylon common
=============

License
-------

The content of this repository is released under the GPL v2 + Classpath Exception
as provided in the LICENSE 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.

Directory structure
-------------------

* `src` - the Ceylon common module sources
* `test-src` - the Ceylon common module unit tests

Build the module
----------------

To build the module run

ant clean publish

To run the tests type

ant test

Once built, the module lives in this jar:

~/.ceylon/repo/com/redhat/ceylon/common/0.2/com.redhat.ceylon.common-0.2.jar

10 changes: 10 additions & 0 deletions build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ----- Version Control Flags -----
module.com.redhat.ceylon.common.version=0.2

base.path=${basedir}/lib

# ----- ANother Tool for Language Recognition version 3.4 or later ---
antlr.version=3.4
antlr.jar=antlr-${antlr.version}-complete.jar
antlr.url=http://www.antlr.org/download/antlr-${antlr.version}-complete.jar
antlr.lib=${base.path}/${antlr.jar}
98 changes: 98 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<project name="Ceylon Common module" default="publish" basedir=".">
<property file="build.properties"/>

<!-- Set build directories for all formats. -->
<property name="build.dir" value="${basedir}/build"/>
<property name="build.dist" value="${build.dir}/dist"/>
<property name="build.classes" location="${build.dir}/classes"/>

<property name="src" location="src"/>

<!-- Local repository -->
<property name="ceylon.repo.dir" location="${user.home}/.ceylon/repo"/>
<property name="ceylon.common.dir" value="com/redhat/ceylon/common/${module.com.redhat.ceylon.common.version}"/>
<property name="ceylon.common.jar" value="${ceylon.common.dir}/com.redhat.ceylon.common-${module.com.redhat.ceylon.common.version}.jar"/>
<property name="ceylon.common.lib" location="${ceylon.repo.dir}/${ceylon.common.jar}"/>
<property name="ceylon.common.repo" value="${ceylon.repo.dir}/${ceylon.common.dir}"/>
<property name="ceylon.common.dist" value="${build.dist}/${ceylon.common.dir}"/>

<!-- Classpath for the build tools. -->
<path id="classpath">
</path>

<!-- ################################################################## -->

<target name="clean">
<delete dir="${build}"/>
</target>

<!-- project compilation -->
<target name="compile" description="compile the type checker">
<javac
srcdir="${src}"
destdir="${build.classes}"
debug="true"
classpathref="classpath">
<include name="**/*.java"/>
</javac>
</target>

<!-- constant to declare a file binary for checksumsum -->
<property name="checksum.binary-prefix" value=" *" />
<!-- Helper target, used to create a sha1 checksum file -->
<!-- Requires 'file' as a parameter. -->
<target name="sha1sum">
<fail unless="file"/>
<fail if="filename"/>
<fail if="value"/>
<basename file="${file}" property="filename"/>
<checksum file="${file}" property="value" algorithm="sha1"/>
<echo file="${file}.sha1" message="${value}${checksum.binary-prefix}${filename}"/>
</target>

<!-- Repository targets -->
<target name="init.repo"
description="Init local ceylon repository and add ceylon.language">
<mkdir dir="${ceylon.common.repo}"/>
</target>

<target name="clean.repo"
description="Clean local ceylon repository">
<delete dir="${ceylon.common.repo}"/>
</target>

<target name="dist" depends="compile">
<mkdir dir="${build.dist}"/>
<zip destfile="${build.dist}/${ceylon.common.jar}">
<fileset dir="${build.classes}">
<include name="**/*.class"/>
</fileset>
</zip>
<antcall target="sha1sum">
<param name="file" value="${build.dist}/${ceylon.common.jar}" />
</antcall>
</target>

<target name="publish.common" depends="dist,clean.repo,init.repo">
<copy todir="${ceylon.common.repo}">
<fileset dir="${ceylon.common.dist}"/>
</copy>
</target>

<target name="publish"
depends="publish.common"
description="Publish both type checker and ceylon.language template module">

</target>

<target name="test"
depends="publish"
description="Run rudimentary tests">
<java classname="MainForTest">
<classpath>
<pathelement location="${build.classes}"/>
<path refid="classpath"/>
</classpath>
</java>
</target>
</project>
5 changes: 5 additions & 0 deletions src/com/redhat/ceylon/common/CeylonConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.redhat.ceylon.common;

public class CeylonConfig {

}
5 changes: 5 additions & 0 deletions src/com/redhat/ceylon/common/ConfigParser.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.redhat.ceylon.common;

public class ConfigParser {

}

0 comments on commit 42b2cdb

Please sign in to comment.