Skip to content

Generating an API Report

yishayw edited this page Dec 11, 2019 · 4 revisions

The Royale compiler can generate a list of APIs used by an application. This is helpful in determining the optimal migration strategy and effort.

To generate an API Report for your application, it is best if you can build your application from the command line. So you may need to determine the compiler options being used by your IDE, or your Maven or Ant configurations. So step 1 is to use your Flex SDK's mxmlc compiler to successfully build your application. So from the command line, you might type something like:

<path to Flex SDK>/bin/mxmlc -library-path+=<third-party-library>.swc <path to main MXML File>/MyApp.mxml

Once you get a successful compile, then download and set up a Royale SDK by following the instructions on this page. Then run the same compiler in the Royale SDK but with the -api-report option, such as:

<path to Royale SDK>/royale-asjs/bin/mxmlc -library-path+=<third-party-library>.swc -api-report=<file to contain report output> -load-config=<path to Apache Flex SDK>/frameworks/flex-config.xml <path to main MXML File>/MyApp.mxml

If you get errors, fix them in your code or comment out that code if it won't impact the report. The Royale Compiler may find errors that the Flex SDK compiler did not detect.

Then the file you specified in the -api-report option should contain the information about your app. If your app as other projects like modules or libraries (SWCs) then you will need to do the same thing to get API reports for those projects as well. Use compc instead of mxmlc to compile SWCs.

Clone this wiki locally