ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Javac.java
Date Mon, 04 Sep 2000 14:18:52 GMT
bodewig     00/09/04 07:18:52

  Modified:    docs     index.html
               src/main/org/apache/tools/ant/taskdefs Javac.java
  Log:
  Added encoding attribute to <javac>.
  Submitted by:	Hiroaki Nakamura <hnakamur@mc.neweb.ne.jp>,
                  Eric VanLydegraf <ericv@kinzan.com>
  
  Revision  Changes    Path
  1.87      +5 -0      jakarta-ant/docs/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/index.html,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- index.html	2000/09/04 14:06:33	1.86
  +++ index.html	2000/09/04 14:18:51	1.87
  @@ -2337,6 +2337,11 @@
       <td align="center" valign="top">No</td>
     </tr>
     <tr>
  +    <td valign="top">encoding</td>
  +    <td valign="top">encoding of source files.</td>
  +    <td align="center" valign="top">No</td>
  +  </tr>
  +  <tr>
       <td valign="top">debug</td>
       <td valign="top">indicates whether there should be compiled with debug
         information (&quot;on&quot;).</td>
  
  
  
  1.37      +17 -0     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java
  
  Index: Javac.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- Javac.java	2000/09/04 14:06:34	1.36
  +++ Javac.java	2000/09/04 14:18:51	1.37
  @@ -75,6 +75,7 @@
    * <li>extdirs
    * <li>optimize
    * <li>debug
  + * <li>encoding
    * <li>target
    * </ul>
    * Of these arguments, the <b>sourcedir</b> and <b>destdir</b>
are required.
  @@ -100,6 +101,7 @@
       private Path src;
       private File destDir;
       private Path compileClasspath;
  +    private String encoding;
       private Vector classpathReferences = new Vector();
       private boolean debug = false;
       private boolean optimize = false;
  @@ -249,6 +251,13 @@
       }
   
       /**
  +     * Set the Java source file encoding name.
  +     */
  +    public void setEncoding(String encoding) {
  +        this.encoding = encoding;
  +    }
  +
  +    /**
        * Set the debug flag.
        */
       public void setDebug(boolean debug) {
  @@ -515,6 +524,10 @@
                   cmd.createArgument().setValue(target);
               }
           }
  +        if (encoding != null) {
  +            cmd.createArgument().setValue("-encoding");
  +            cmd.createArgument().setValue(encoding);
  +        }
           if (debug) {
               cmd.createArgument().setValue("-g");
           }
  @@ -608,6 +621,10 @@
           cmd.createArgument().setValue("-classpath");
           cmd.createArgument().setPath(classpath);
   
  +        if (encoding != null) {
  +            cmd.createArgument().setValue("-encoding");
  +            cmd.createArgument().setValue(encoding);
  +        }
           if (debug) {
               cmd.createArgument().setValue("-g");
           }
  
  
  

Mime
View raw message