protected void runStatements ( Reader reader , PrintStream out ) throws IOException { log . debug ( "runStatements()" ) ; StringBuilder txt = new StringBuilder ( ) ; String line = "" ; BufferedReader in = new BufferedReader ( reader ) ; while ( ( line = in . readLine ( ) ) != null ) { line = getProject ( ) . replaceProperties ( line ) ; if ( line . indexOf ( "--" ) >= 0 ) { txt . append ( "\n" ) ; } } // Catch any statements not followed by ; if ( ! txt . toString ( ) . equals ( "" ) ) { execGroovy ( txt . toString ( ) , out ) ; } }
Read in lines and execute them .