Target java 1.6 and fix exception on Mac OS due to alias plugin

This commit is contained in:
walterhiggins 2014-01-05 12:23:09 +00:00
parent c591ec06a6
commit 73fdf04bc2
3 changed files with 20 additions and 6 deletions

View file

@ -58,15 +58,17 @@
</target> </target>
<target name="compile" depends="init, server-setup" description="compile bukkit plugin source"> <target name="compile" depends="init, server-setup" description="compile bukkit plugin source">
<javac includeantruntime="false" srcdir="${src}" destdir="${build}" classpath="${minecraft.dir}/craftbukkit.jar" /> <javac includeantruntime="false" srcdir="${src}" source="1.6" target="1.6" destdir="${build}" classpath="${minecraft.dir}/craftbukkit.jar" />
</target> </target>
<target name="gendocs" depends="construct-ypgpm, construct-api-ref" description="Generate API documentation"> <target name="gendocs" depends="construct-ypgpm, construct-api-ref" description="Generate API documentation">
</target> </target>
<target name="generate-api-ref-entries" depends="init"> <target name="compile-docs" depends="init">
<javac includeantruntime="false" srcdir="src/docs/java"/> <javac includeantruntime="false" srcdir="src/docs/java"/>
</target>
<target name="generate-api-ref-entries" depends="compile-docs,init">
<java classname="jscript" failonerror="true" fork="true" output="${dist}/apiref.md"> <java classname="jscript" failonerror="true" fork="true" output="${dist}/apiref.md">
<classpath> <classpath>
<pathelement path="src/docs/java"/> <pathelement path="src/docs/java"/>
@ -94,8 +96,7 @@ Walter Higgins
</concat> </concat>
</target> </target>
<target name="gen-toc-apiref" depends="generate-api-ref-entries, init" description="Generate Table of Contents for API Reference"> <target name="gen-toc-apiref" depends="compile-docs,generate-api-ref-entries, init" description="Generate Table of Contents for API Reference">
<javac includeantruntime="false" srcdir="src/docs/java"/>
<java classname="jscript" failonerror="true" fork="true" output="${dist}/toc-apiref.md"> <java classname="jscript" failonerror="true" fork="true" output="${dist}/toc-apiref.md">
<classpath> <classpath>
<pathelement path="src/docs/java"/> <pathelement path="src/docs/java"/>
@ -105,8 +106,7 @@ Walter Higgins
</java> </java>
</target> </target>
<target name="gen-toc-ypgpm" depends="init" description="Generate Table of Contents for Young Programmers Guide"> <target name="gen-toc-ypgpm" depends="compile-docs,init" description="Generate Table of Contents for Young Programmers Guide">
<javac includeantruntime="false" srcdir="src/docs/java"/>
<java classname="jscript" failonerror="true" fork="true" output="${dist}/toc-ypgpm.md"> <java classname="jscript" failonerror="true" fork="true" output="${dist}/toc-ypgpm.md">
<classpath> <classpath>
<pathelement path="src/docs/java"/> <pathelement path="src/docs/java"/>

View file

@ -1,3 +1,11 @@
# 2014 01 05
Bug Fix: On Mac OS, alias plugin caused Exceptions due to missing
.trim() function on String.
Changed target for compilation to 1.6 so that ScriptCraft will work
with both java 1.6 and 1.7.
# 2014 01 02 # 2014 01 02
Added a warning in console at start-up if legacy directories are detected. Added a warning in console at start-up if legacy directories are detected.

View file

@ -77,3 +77,9 @@ for (var method in formattingCodes){
return function(){return c+this;}; return function(){return c+this;};
}(formattingCodes[method]); }(formattingCodes[method]);
} }
// wph 20140105 trim not availabe in String on Mac OS.
if (!String.prototype.trim){
String.prototype.trim = function(){
return this.replace(/^\s+|\s+$/g,'');
}
}