Exemplo n.º 1
0
  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);
    }
  }
Exemplo n.º 2
0
  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;
  }