私が見たすべてのことから、ビルド時にこの情報を取得する唯一の方法は、Flexコンパイラクラスを呼び出す独自のJavaプログラムを作成することであるように思われました。実際にはいくつかの異なる方法がありますが、私が行った方法は、次のpdfの10ページから始まるレポートの例に基づいていました。
http://blogs.adobe.com/flexdoc/files/flexdoc/oem/oem_guide.pdf
私が知りたいのは、ビルドのファイル依存関係だけでした。これにより、バージョン管理でこれらをソースバージョンにリンクできるようになりました。そのため、参照されている例の定義、依存関係、および前提条件のセクションを省略しました。基本的な考え方は、flex2.tools.oem.Applicationオブジェクトを作成し、そのオブジェクトで「build」メソッドを実行してから、getReportメソッドを使用してコンパイルの厄介な詳細をすべて取得することです。これが私のソリューションコードの簡略版です。
File file = new File ("C:/MyFlexApp/main.mxml");
File outputFile = new File("C:/MyFlexApp/bin/Foo.swf");
Application application = new Application(file);
application.setOutput(outputFile);
Configuration config = application.getDefaultConfiguration();
File[] libFile = new File[] {new File("C:/MyFlexApp/bin/baz.swc")};
config.addLibraryPath(libFile);
application.setConfiguration(config);
application.build(true);
report = application.getReport();
Message[] m = report.getMessages();
if (m != null)
{
for (int i=0; i<m.length; i++)
{
System.out.println(m[i].getLevel().toUpperCase() +
" MESSAGE " + i + ": " + m[i]);
}
}
// Lists the image files that are embedded.
System.out.println("\n\nEMBEDDED ASSETS: ");
String[] assetnames = report.getAssetNames(Report.COMPILER);
if (assetnames != null)
{
for (int i=0; i<assetnames.length; i++)
{
System.out.println(assetnames[i]);
}
}
// Lists the libraries that are used.
System.out.println("\nLIBRARIES: ");
String[] compilerLibs = report.getLibraryNames(Report.COMPILER);
if (compilerLibs != null)
{
for (int i=0; i<compilerLibs.length; i++)
{
System.out.println(compilerLibs[i]);
}
}
System.out.println("\nSOURCE NAMES: ");
String[] src = report.getSourceNames(Report.COMPILER);
if (src != null)
{
for (int i=0; i<src.length; i++) {
// Lists source files.
System.out.println(src[i]);
}
}
この解決策に私を導いてくれたすべての助けをくれたShaunに感謝します。