mirror of https://github.com/sbt/sbt.git
Merge pull request #1702 from jsuereth/wip/incremental-compiler-javac-cleanup
Create a new API for calling Java toolchains.
This commit is contained in:
commit
aca3130dea
|
|
@ -2,6 +2,7 @@ package xsbti.compile;
|
|||
|
||||
import java.io.File;
|
||||
import xsbti.Logger;
|
||||
import xsbti.Reporter;
|
||||
|
||||
/**
|
||||
* Interface to a Java compiler.
|
||||
|
|
@ -9,6 +10,17 @@ import xsbti.Logger;
|
|||
public interface JavaCompiler
|
||||
{
|
||||
/** Compiles Java sources using the provided classpath, output directory, and additional options.
|
||||
* Output should be sent to the provided logger.*/
|
||||
* Output should be sent to the provided logger.
|
||||
*
|
||||
* @deprecated 0.13.8 - Use compileWithReporter instead
|
||||
*/
|
||||
void compile(File[] sources, File[] classpath, Output output, String[] options, Logger log);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compiles java sources using the provided classpath, output directory and additional options.
|
||||
*
|
||||
* Output should be sent to the provided logger.
|
||||
* Failures should be passed to the provided Reporter.
|
||||
*/
|
||||
void compileWithReporter(File[] sources, File[] classpath, Output output, String[] options, Reporter reporter, Logger log);
|
||||
}
|
||||
|
|
@ -104,6 +104,7 @@ object Logger {
|
|||
val position = pos
|
||||
val message = msg
|
||||
val severity = sev
|
||||
override def toString = s"[$severity] $pos: $message"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue