diff options
Diffstat (limited to 'anttasks')
-rw-r--r-- | anttasks/src/com/android/ant/LintExecTask.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/anttasks/src/com/android/ant/LintExecTask.java b/anttasks/src/com/android/ant/LintExecTask.java index 64a6c00..3d687cb 100644 --- a/anttasks/src/com/android/ant/LintExecTask.java +++ b/anttasks/src/com/android/ant/LintExecTask.java @@ -28,6 +28,8 @@ public class LintExecTask extends ExecTask { private String mExecutable; private String mHtml; private String mXml; + private Path mSourcePath; + private Path mClassPath; /** * Sets the value of the "executable" attribute. @@ -37,6 +39,16 @@ public class LintExecTask extends ExecTask { mExecutable = TaskHelper.checkSinglePath("executable", executable); } + /** Sets the path where Java source code should be found */ + public void setSrc(Path path) { + mSourcePath = path; + } + + /** Sets the path where class files should be found */ + public void setClasspath(Path path) { + mClassPath = path; + } + /** * Sets the value of the "html" attribute: a path to a file or directory name * where the HTML report should be written. @@ -80,6 +92,16 @@ public class LintExecTask extends ExecTask { task.createArg().setValue(mXml); } + if (mSourcePath != null) { + task.createArg().setValue("--sources"); + task.createArg().setValue(mSourcePath.toString()); + } + + if (mClassPath != null) { + task.createArg().setValue("--classpath"); + task.createArg().setValue(mClassPath.toString()); + } + task.createArg().setValue(getProject().getBaseDir().getAbsolutePath()); task.execute(); } |