-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
45 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
mps.home=/path/to/mps | ||
mps.platform.caches=/path/to/cache | ||
mbeddr.github.core.home=/path/to/mbeddr.core/root | ||
mbeddr.arduino.home=/path/to/mbeddr.arduino/root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,37 @@ | ||
<project name='mbeddr.arduino' default='build'> | ||
<property file='build.properties'/> | ||
<path id='mps.ant.path'> | ||
<pathelement location='${mps.home}/lib/mps-backend.jar'/> | ||
<pathelement location='${mps.home}/lib/jdom.jar'/> | ||
<pathelement location='${mps.home}/lib/log4j.jar'/> | ||
<pathelement location='${mps.home}/lib/mps-core.jar'/> | ||
</path> | ||
<!-- validate if path properties are set in build.properties --> | ||
<fail unless="mbeddr.github.core.home">mbeddr.github.core.home must be set in your build.properties</fail> | ||
<fail unless="mps.platform.caches">mps.platform.caches must be set in your build.properties</fail> | ||
<fail unless="mps.home">mps.home must be set in your build.properties</fail> | ||
|
||
<taskdef resource='jetbrains/mps/build/ant/antlib.xml' classpathref='mps.ant.path'/> | ||
<project name="mbeddr download and deploy plugins" default="build-languages"> | ||
<property file="build.properties"/> | ||
<property name="plugins.folder.name" value="plugins"/> | ||
|
||
<jvmargs id='myargs'> | ||
<arg value='-ea'/> | ||
<arg value='-Xss1024k'/> | ||
<arg value='-Xmx2048m'/> | ||
<arg value='-XX:MaxPermSize=128m'/> | ||
<arg value='-XX:+HeapDumpOnOutOfMemoryError'/> | ||
<arg value='-Didea.system.path=${mps.platform.caches}/system'/> | ||
<arg value='-Didea.config.path=${mps.platform.caches}/config'/> | ||
<arg value='-Didea.plugins.path=${mps.platform.caches}/plugins'/> | ||
</jvmargs> | ||
|
||
<target name="build"> | ||
<antcall target="build-languages"/> | ||
<antcall target="build-solutions"/> | ||
</target> | ||
|
||
<target name='build-languages'> | ||
<mps.generate parallelMode='true' fork='true'> | ||
<jvmargs refid='myargs'/> | ||
<project file='mbeddr.arduino.mpr'/> | ||
<modules dir='./languages'/> | ||
<library name="mbeddr" | ||
dir="${mbeddr.github.core.home}/code/languages"/> | ||
</mps.generate> | ||
</target> | ||
<target name='build-solutions'> | ||
<mps.generate parallelMode='true' fork='true'> | ||
<jvmargs refid='myargs'/> | ||
<project file='mbeddr.arduino.mpr'/> | ||
<modules dir='./solutions'/> | ||
<library name="mbeddr.arduino" dir="./languages"/> | ||
<library name="mbeddr" | ||
dir="${mbeddr.github.core.home}/code/languages"/> | ||
</mps.generate> | ||
<!-- mbeddr.platform --> | ||
<property name="mbeddr.arduino.build-path.postfix" value="${mbeddr.arduino.home}build/build/artifacts/mbeddr.arduino" /> | ||
<property name="mbeddr.arduino.build-file.location" value="${mbeddr.arduino.home}/build/" /> | ||
<property name="mbeddr.arduino.build-file.name" value="build.xml" /> | ||
<property name="mbeddr.arduino.working-dir" value="${mbeddr.arduino.home}" /> | ||
<!-- misc --> | ||
<property name="clean-generated-code.task" value="cleanSources" /> | ||
<property name="clean-plugins.task" value="clean" /> | ||
<property name="generate-code.task" value="generate" /> | ||
<property name="build-plugin.task" value="assemble" /> | ||
<property name="run-tests.task" value="check" /> | ||
<!-- validations --> | ||
<fail unless="mps.home">mps.home must be set in your build.properties</fail> | ||
<fail unless="mbeddr.github.core.home">mbeddr.github.core.home must be set in your build.properties</fail> | ||
<fail unless="mbeddr.arduino.home">mbeddr.arduino.home must be set in your build.properties</fail> | ||
<fail message="Your MPS installation (${mps.home}) doesn't contain a ${plugins.folder.name} folder"> | ||
<condition> | ||
<not> | ||
<resourcecount count="1"> | ||
<dirset dir="${mps.home}" > | ||
<include name="${plugins.folder.name}"/> | ||
</dirset> | ||
</resourcecount> | ||
</not> | ||
</condition> | ||
</fail> | ||
<target name="build-arduino"> | ||
<ant antfile="${mbeddr.arduino.build-file.name}" dir="${mbeddr.arduino.build-file.location}" target="${clean-plugins.task}" /> | ||
<ant antfile="${mbeddr.arduino.build-file.name}" dir="${mbeddr.arduino.build-file.location}" target="${clean-generated-code.task}" /> | ||
<ant antfile="${mbeddr.arduino.build-file.name}" dir="${mbeddr.arduino.build-file.location}" target="${generate-code.task}" /> | ||
<ant antfile="${mbeddr.arduino.build-file.name}" dir="${mbeddr.arduino.build-file.location}" target="${build-plugin.task}" /> | ||
</target> | ||
</project> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters