Skip to content
Snippets Groups Projects
Commit a0e059a3 authored by jeffliu's avatar jeffliu
Browse files

[111676] Port the api scripts to the new build infrastructure

parent f7c8a7f0
No related branches found
No related tags found
No related merge requests found
...@@ -45,6 +45,7 @@ public class API2ComponentAPI implements IClassVisitor ...@@ -45,6 +45,7 @@ public class API2ComponentAPI implements IClassVisitor
private Collection includes; private Collection includes;
private Collection excludes; private Collection excludes;
private boolean readInterface = false; private boolean readInterface = false;
private boolean skipAPIGen = false;
private Map interface2ImplClasses = new HashMap(0); private Map interface2ImplClasses = new HashMap(0);
public String getApi() public String getApi()
...@@ -107,6 +108,16 @@ public class API2ComponentAPI implements IClassVisitor ...@@ -107,6 +108,16 @@ public class API2ComponentAPI implements IClassVisitor
this.readInterface = readInterface; this.readInterface = readInterface;
} }
public boolean isSkipAPIGen()
{
return skipAPIGen;
}
public void setSkipAPIGen(boolean skipAPIGen)
{
this.skipAPIGen = skipAPIGen;
}
public List getImplClasses(String interfaceName) public List getImplClasses(String interfaceName)
{ {
List implClasses = (List)interface2ImplClasses.get(interfaceName); List implClasses = (List)interface2ImplClasses.get(interfaceName);
...@@ -221,7 +232,7 @@ public class API2ComponentAPI implements IClassVisitor ...@@ -221,7 +232,7 @@ public class API2ComponentAPI implements IClassVisitor
cfe.printStackTrace(); cfe.printStackTrace();
} }
} }
if (isAPI) if (!isSkipAPIGen() && isAPI)
{ {
try try
{ {
......
...@@ -148,17 +148,15 @@ public class CodeCoverageScanner implements ILocationVisitor ...@@ -148,17 +148,15 @@ public class CodeCoverageScanner implements ILocationVisitor
public void execute() public void execute()
{ {
// Generate api-info.xml // Generate api-info.xml
if (!skipAPIGen) api2CompXML = new API2ComponentAPI();
{ api2CompXML.setApi(api);
api2CompXML = new API2ComponentAPI(); api2CompXML.setSrc(src);
api2CompXML.setApi(api); api2CompXML.setOutputDir(outputDir);
api2CompXML.setSrc(src); api2CompXML.setIncludes(includes);
api2CompXML.setOutputDir(outputDir); api2CompXML.setExcludes(excludes);
api2CompXML.setIncludes(includes); api2CompXML.setReadInterface(true);
api2CompXML.setExcludes(excludes); api2CompXML.setSkipAPIGen(skipAPIGen);
api2CompXML.setReadInterface(true); api2CompXML.execute();
api2CompXML.execute();
}
// Visit all .trcxml files that uses APIs // Visit all .trcxml files that uses APIs
Location.createLocation(new File(trcxml)).accept(this); Location.createLocation(new File(trcxml)).accept(this);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment