private void fallBackToAntIfNecessary(CompileOptions options) { if (options.isUseAnt()) { return; } if (options.getCompiler() != null) { LOGGER.warn( "Falling back to Ant javac task ('CompileOptions.useAnt = true') because 'CompileOptions.compiler' is set."); options.setUseAnt(true); } }
public Compiler<JavaCompileSpec> create(CompileOptions options) { fallBackToAntIfNecessary(options); if (options.isUseAnt()) { return new AntJavaCompiler(antBuilderFactory); } Compiler<JavaCompileSpec> result = createTargetCompiler(options); if (!jointCompilation) { result = new NormalizingJavaCompiler(result); } return result; }