OSDN Git Service

Make javac ant options configurable.
authorXavier Ducrohet <xav@android.com>
Fri, 24 Sep 2010 15:11:12 +0000 (08:11 -0700)
committerXavier Ducrohet <xav@android.com>
Fri, 24 Sep 2010 19:33:29 +0000 (12:33 -0700)
Change-Id: I303acdb4fc8de6ba5d8de7c18e020e97fe01e3de

changes.txt
files/ant/main_rules.xml

index 4fe7cd3..603c3e6 100644 (file)
@@ -7,6 +7,8 @@ Revision 8:
   the Android Manifest.
   "ant debug" will automatically insert debuggable==true, while "ant release"
   will not.
+- new overridable Ant javac properties: java.encoding, java.source, and java.target
+  (default to "ascii", "1.5" and "1.5")
 
 
 Revision 7:
index 96fb0ef..7059f3a 100644 (file)
     <property name="aapt.resource.filter" value="" />
     <property name="filter.abi" value="" />
 
+    <!-- compilation options -->
+    <property name="java.encoding" value="ascii" />
+    <property name="java.target" value="1.5" />
+    <property name="java.source" value="1.5" />
+
     <!-- Verbosity -->
     <property name="verbose" value="false" />
     <!-- This is needed by emma as it uses multilevel verbosity instead of simple 'true' or 'false'
                         else="./libs">
                     <isset property="tested.project.absolute.dir" />
                 </condition>
-                <javac encoding="ascii" target="1.5" debug="true" extdirs=""
+                <javac encoding="${java.encoding}"
+                        source="${java.source}" target="${java.target}"
+                        debug="true" extdirs=""
                         destdir="${out.classes.absolute.dir}"
                         bootclasspathref="android.target.classpath"
                         verbose="${verbose}"