Commit a9185571 authored by Evan W. Patton's avatar Evan W. Patton Committed by Jeffrey Schiller

Implement a release flag for builds

Change-Id: I5338ee15a316828495e3782491a90785b46cdb1b
parent 58dd96be
......@@ -167,7 +167,21 @@ Before entering or scanning the QR code in the Companion, check the box labeled
The automated tests depend on [Phantomjs](http://phantomjs.org/). Make sure you install it and add it to your path. After that, you can run all tests by typing the following in a terminal window:
$ ant tests
### Building Release Code
Release builds with optimizations turned on for the web components of the system can be done by passing `-Drelease=true` to `ant`, e.g.:
```
ant -Drelease=true noplay
```
The release configuration sets the following additional options:
- Blockly Editor is compiled with SIMPLE optimizations (instead of RAW)
- App Engine YaClient module is compiled without `<collapse-all-properties/>` to create per-language/browser builds
- App Engine YaClient module is compiled with optimization tuned to 9 and with 8 threads
### Hot-reloading GWT code with 'Super Dev Mode'
1. Run `ant devmode`
2. [Run the main server](#running-the-main-server).
......
......@@ -25,6 +25,20 @@
Definition for generating a Unique ID.
===================================================================== -->
<property name="release" value="false"/>
<condition property="client.module"
value="com.google.appinventor.YaClient"
else="com.google.appinventor.YaClient-dev">
<equals arg1="${release}" arg2="true" />
</condition>
<condition property="client.flags"
value="-optimize 9 -localWorkers 8"
else="-style pretty">
<equals arg1="${release}" arg2="true" />
</condition>
<scriptdef name="generateguid" language="javascript">
<attribute name="property" />
<![CDATA[
......@@ -594,8 +608,8 @@
<jvmarg value="-Dfile.encoding=UTF-8" />
<arg line="-war"/>
<arg value="${build.war.dir}"/>
<arg line="-logLevel INFO -extra ${build.extra.dir} -style pretty"/>
<arg value="com.google.appinventor.YaClient"/>
<arg line="-logLevel INFO -extra ${build.extra.dir} ${client.flags}"/>
<arg value="${client.module}"/>
</java>
</target>
......@@ -630,7 +644,7 @@
</classpath>
<jvmarg value="-Xmx1G" />
<arg line="-style PRETTY -logLevel INFO" />
<arg value="com.google.appinventor.YaClient" />
<arg value="com.google.appinventor.YaClient-dev" />
<arg value="-bindAddress"/>
<arg value="0.0.0.0"/>
</java>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.3.0//EN" "http://www.gwtproject.org/doctype/2.8.1/gwt-module.dtd">
<module rename-to='ode'>
<inherits name="com.google.appinventor.YaClient" />
<collapse-all-properties/>
</module>
......@@ -149,6 +149,4 @@
<extend-property name="locale" values="lt"/>
<set-property-fallback name="locale" value="en"/>
<collapse-all-properties/>
</module>
......@@ -17,6 +17,14 @@
In-browser blocks editor for App Inventor based on Blockly
</description>
<property name="release" value="false"/>
<condition property="blockly.config"
value="ploverConfig.js"
else="ploverConfig-dev.js">
<equals arg1="${release}" arg2="true"/>
</condition>
<target name="all"
depends="BlocklyTranslationGenerator">
</target>
......@@ -99,8 +107,7 @@
<srcfiles dir="src/" includes="**/*.js" />
<srcfiles dir="${blockly.src.dir}/" includes="core/**/*.js" />
<srcfiles dir="${lib.dir}/closure-library/" includes="closure/goog/**/*.js" />
<srcfiles dir="${basedir}" includes="ploverConfig.js" />
<!-- <mapper type="merge" to="${public.build.dir}/blockly-all.js" /> -->
<srcfiles dir="${basedir}" includes="${blockly.config}" />
</uptodate>
</target>
......@@ -109,7 +116,7 @@
depends="init,CheckBlocklyCompile"
unless="BlocklyCompile.uptodate">
<java failonerror="true" fork="true" jar="${lib.dir}/plovr/plovr-eba786b34df9.jar">
<arg line="build ploverConfig.js" />
<arg line="build ${blockly.config}" />
</java>
</target>
......
{
"id": "blockly-config-dev",
"inherits": "ploverConfig.js",
"mode": "RAW"
}
......@@ -155,9 +155,7 @@
// will be included, so when test-raw.html loads each input in RAW mode,
// it is important that the proper charset be used.
"output-charset": "UTF-8",
"mode": "RAW",
// "mode": "SIMPLE",
// "mode" : "WHITESPACE_ONLY",
"mode": "SIMPLE",
"experimental-compiler-options": {
"languageIn": "ECMASCRIPT5"
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment