System.out.println("ProGuard has successfully finished obfuscation.");
	public void obfuscate(Device device, File sourceFile, File targetFile, String[] preserve, Path bootClassPath) 	throws BuildException 	{		// create the configuration for ProGuard:		Configuration cfg = new Configuration();				// set libraries:		cfg.libraryJars  = getPath( bootClassPath.toString() );		String[] apiPaths = device.getClassPaths();		for (int i = 0; i < apiPaths.length; i++) {			cfg.libraryJars.addAll( getPath( apiPaths[i] ) );		}		        cfg.inJars = getPath( sourceFile );        cfg.outJars = getPath( targetFile );        // do not obfuscate the <keep> classes and the defined midlets:        cfg.keepClassFileOptions = new ArrayList( preserve.length );        for (int i = 0; i < preserve.length; i++) {			String className = TextUtil.replace( preserve[i], '.', '/');			//System.out.println("\npreservering: " + className );	        cfg.keepClassFileOptions.add(	        		new KeepClassFileOption(        				ClassConstants.INTERNAL_ACC_PUBLIC,	                    0,	                    className,	                    null,	                    null,	                    true,	                    false,	                    false));		}        // some devices do not support mixed-case class names:        cfg.useMixedCaseClassNames = false;        // overload names with different return types:        cfg.overloadAggressively = true;        // move all classes to the root package:        cfg.defaultPackage = "";		                ProGuard proGuard = new ProGuard( cfg );		try {			proGuard.execute();		} catch (IOException e) {			// check if all preserve-classes are found:			for (int i = 0; i < preserve.length; i++) {				String className = preserve[i];				String fileName = TextUtil.replace( className, '.', File.separatorChar ) + ".java";				File file = new File( device.getSourceDir() + File.separator + fileName );				if (!file.exists()) {					System.err.println("WARNING: the MIDlet or class [" + className + "] was not found: [" + file.getAbsolutePath() + "] does not exist.");					System.err.println("Please check your <midlet>-setting in the file [build.xml].");				}			}			throw new BuildException("ProGuard was unable to obfuscate: " + e.getMessage(), e );		}	}